Protocol
tools/call
Understand MCP tools/call, including argument validation, tool routing, structured results, and hosted runtime safeguards.
Definition
tools/call is the MCP method used to invoke a named tool with arguments. It is the action boundary where model intent becomes a concrete upstream request, computation, website read, or generated SDK operation.
How Astrail Uses It
Astrail routes tools/call through schema validation, runtime permissions, auth checks, endpoint-map dispatch, observability, credential redaction, and rate limits. That keeps model-requested actions bounded and auditable.
Example
{
"jsonrpc": "2.0",
"id": 2,
"method": "tools/call",
"params": {
"name": "list_pets",
"arguments": { "limit": 10 }
}
}Implementation Checklist
Validate arguments against the same schema advertised in tools/list.
Reject blocked or unknown tool names before reaching upstream code.
Return structured errors that agents can reason about.
Log trace IDs and policy decisions without leaking secrets.
FAQ
Who decides whether a tool call is allowed?
The server must enforce policy. Clients can ask to invoke a tool, but the hosted runtime should still check auth, schemas, network policy, and server configuration.
Should tools/call expose raw upstream errors?
No. Errors should be structured and useful, but secrets, credentials, internal stack traces, and sensitive upstream payloads should be redacted.