Standard requests and responses for the MCP protocol
Summary
Functions
Invalid request due to no streaming connection being available
Duplicate JSON-RPC request id for a session
Elicitation complete notification
An empty response
Response error
The HTTP routing headers (Mcp-Method, Mcp-Name) do not match the
request body, or a required header is missing (SEP-2243, MCP 2026-07-28).
Server encountered an issue
Invalid request
Invalid request due to bad parameters
A request omitted a client capability required to process it.
The request did not declare the Tasks extension
(io.modelcontextprotocol/tasks), such as when a tool only runs as a task.
See Phantom.Tasks.
The method is not implemented or found
A generic notifiation
Progress notifiation
Invalid request due to parsing error
Ping request
Prompts List updated notification
The resource is not found.
Resource updated notification
Resources List updated notification
Protocol versions that use the stateless core (no initialize or session).
Every protocol version Phantom supports.
Task status notification
Tools List updated notification
The requested MCP protocol version is unsupported.
Error indicating URL mode elicitation is required before retrying
Annotate a JSON-RPC result with MCP 2026-07-28 cache hints.
Types
Functions
Invalid request due to no streaming connection being available
Duplicate JSON-RPC request id for a session
Elicitation complete notification
An empty response
Response error
The HTTP routing headers (Mcp-Method, Mcp-Name) do not match the
request body, or a required header is missing (SEP-2243, MCP 2026-07-28).
Server encountered an issue
Invalid request
Invalid request due to bad parameters
A request omitted a client capability required to process it.
Capabilities are named by path, such as "sampling" or "elicitation.url",
and reported to the client as a ClientCapabilities object. Pass that
object directly when a name contains dots, such as an extension.
The request did not declare the Tasks extension
(io.modelcontextprotocol/tasks), such as when a tool only runs as a task.
See Phantom.Tasks.
The method is not implemented or found
A generic notifiation
Progress notifiation
Invalid request due to parsing error
Ping request
Prompts List updated notification
The resource is not found.
Under MCP 2026-07-28 (SEP-2164) the JSON-RPC code is the standard
-32602 Invalid Params. Under earlier protocol versions it remains
the MCP-custom -32002 so legacy clients continue to match.
Resource updated notification
Resources List updated notification
Protocol versions that use the stateless core (no initialize or session).
Every protocol version Phantom supports.
Task status notification
Tools List updated notification
The requested MCP protocol version is unsupported.
Error indicating URL mode elicitation is required before retrying
Annotate a JSON-RPC result with MCP 2026-07-28 cache hints.
These are advisory — the server doesn't cache; the hints tell the client
(and any intermediate CDN / gateway) how to treat the result. Modeled on
HTTP Cache-Control.
Options:
:ttl_ms— how long the client may consider the result fresh, in milliseconds (becomes top-levelttlMson the result):scope—:public(shareable across users) or:private(per-session); becomes top-levelcacheScope
Works on any result map — tools/call, resources/read, prompts/get,
list responses, completions:
Tool.text("...") |> Request.with_cache(ttl_ms: 60_000, scope: :public)
Resource.list(links, nil) |> Request.with_cache(ttl_ms: 300_000, scope: :public)