Documentation
¶
Overview ¶
Package wireerr builds and recognizes the JSON-RPC errors that vMCP's tool handlers return to the MCP SDK to put on the wire as-is. It is the only vMCP package that imports go-sdk's jsonrpc package, so the SDK rule below lives in one place.
The rule: go-sdk puts a handler's error on the wire with its code and data only when the error is a bare *jsonrpc.Error. For a wrapped one it keeps the code but drops the data. A handler must therefore return what URLElicitationRequired builds, or what FindURLElicitationRequired finds, without wrapping it.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FindURLElicitationRequired ¶
FindURLElicitationRequired returns the bare -32042 error in err's chain, or nil when there is none. A handler that receives a wrapped -32042 from an inner handler returns the result unwrapped, so the data reaches the wire.
func URLElicitationRequired ¶
func URLElicitationRequired(data json.RawMessage) error
URLElicitationRequired returns the MCP 2025-11-25 URLElicitationRequiredError (code -32042) carrying data, which the caller builds as {"elicitations": [...]}. Return it from a tool handler unwrapped.
Types ¶
This section is empty.