For the full discovery response schema and field-by-field semantics, see MCP discovery.
Available Tools
Tools are prefixed by skill name. Shipped tools are grouped below by skill (Midnight blockchain, Platform, Docs) plus a Meta section for the shroud_batch virtual tool.
Block & Chain Tools
Tool
Description
CU Cost
midnight_getBlock
Get block by height or hash
1.0
midnight_getBlockDecoded
Get block with decoded extrinsics and events
2.0
midnight_getHealth
Get Midnight node health status
0.1
midnight_getNodeInfo
Get node info (chain name, node name, version)
0.1
midnight_getChainStats
Get aggregated chain statistics
0.5
State & Storage Tools
Tool
Description
CU Cost
midnight_getStorage
Query runtime storage by key
0.2
midnight_queryStorage
Query storage for multiple keys
0.2 per key
midnight_getAccount
Get account info (balance, nonce)
0.5
midnight_getEvents
Get events from a block
1.5
RPC Tools
Tool
Description
CU Cost
midnight_rpc
Generic whitelisted RPC proxy call
1.0
midnight_listMethods
List available RPC methods
0.1
Platform Tools
Tool
Description
CU Cost
platform_listModels
List Cocoon inference models across networks with current per-token pricing in milli-CU.
0.1
platform_getAttestationQuote
Fetch a fresh TEE attestation quote (base64) plus the pre-computed image hash (hex SHA-256) from the Cocoon confidential compute environment.
0.1
Docs Tools
Tool
Description
CU Cost
docs_search
Search Shroud platform documentation; returns matching paragraphs with titles, URLs, and BM25 relevance scores.
Filter to a specific Cocoon network (cocoon-classic, cocoon-alpha). Omit for all networks.
Input schema:
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"network": {
"type": "string",
"description": "Filter to a specific Cocoon network (e.g. cocoon-classic, cocoon-alpha). Omit for all networks."
}
},
"additionalProperties": false
}
Request:
{
"tool": "platform_listModels",
"input": {}
}
Response is an array of model entries; each entry carries network, model_id, active_workers, and per-token milli-CU prices (prompt, completion, cached).
platform_getAttestationQuote
Parameter
Type
Required
Description
report_data
string
No
Optional 64-byte hex-encoded report data (128 hex chars) bound into the quote. Omit for image-only verification.
Input schema:
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"report_data": {
"type": "string",
"pattern": "^[0-9a-fA-F]{128}$",
"description": "Optional 64-byte hex-encoded report data to bind into the attestation quote. Omit for image-only verification."
}
},
"additionalProperties": false
}
Returns the raw TEE attestation quote (base64) and a pre-computed image hash (hex SHA-256) for identity verification. See How attestation works for the verification flow.
docs_search
Parameter
Type
Required
Description
query
string
Yes
Search query string (non-empty).
limit
integer
No
Maximum number of results to return (1-25, default 10).
Returns matching paragraphs with titles, URLs, and BM25 relevance scores against the embedded Shroud documentation index.
Agent Headers
Shroud recognizes optional agent metadata headers for tracking and analytics:
Header
Description
Example
X-Agent-Name
Agent name
my-agent
X-Agent-Version
Agent version
1.0.0
X-Agent-Session-ID
Session correlation ID
sess_abc123
X-Agent-Provider
Agent provider
langchain
X-Agent-Capabilities
Agent capabilities
tools,streaming
Batch Calls
Use shroud_batch to execute up to 20 sequential tool calls in a single request. Each call in the batch is executed independently with its own usage tracking.
Credit units consumed by this call, in milli-CU. Divide by 1000 for whole CU.
toolName
string
Echo of the tool that was invoked.
timestamp
string (RFC 3339)
Server timestamp at which the response was produced.
latencyMs
integer
End-to-end server processing time in milliseconds.
genAIRequestModel
string
Model identifier used for the call. Populated for AI inference tools; empty string for non-inference tools like midnight_getBlock.
genAIUsageInputTokens
integer
Prompt token count reported by the inference worker. Zero for non-inference tools.
genAIUsageOutputTokens
integer
Completion token count reported by the inference worker. Zero for non-inference tools.
The three genAI* fields follow the OpenTelemetry GenAI semantic conventions and are present on every successful tool call response. They carry meaningful values only when the underlying tool runs an LLM; for purely RPC-shaped tools they are zero/empty so the response shape stays uniform.
Error Handling
MCP returns errors as a tool result with isError: true and a structured SHROUD code in _meta.errorCode: