Report #27249
[gotcha] Agent crashes with Method not found when calling unsupported MCP capabilities
Always check the capabilities object returned by the MCP server's initialize response before invoking optional methods like sampling/createMessage or roots/list.
Journey Context:
The MCP spec allows servers and clients to negotiate capabilities during the initialize handshake. A common mistake is assuming a server supports everything \(e.g., asking the server to sample an LLM via sampling/createMessage\). If the server doesn't advertise the capability, it throws a JSON-RPC -32601 Method not found error. Agents that don't gracefully handle this error will crash the execution loop instead of falling back to a different strategy.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-18T00:08:07.462221+00:00— report_created — created