Mcp Protocol
MCP protocol constants and response builders.
All methods are pure functions that produce Gson JsonObject structures conforming to the MCP JSON-RPC protocol.
Properties
Functions
Link copied to clipboard
Builds the initialize result object including protocol version, capabilities, and server info.
Link copied to clipboard
Builds the ping result.
Link copied to clipboard
Builds the tools array for a tools/list response from the given tool registry.
Link copied to clipboard
Wraps an error tool result into the MCP content envelope.
Link copied to clipboard
Wraps a successful tool result into the MCP content envelope.
Link copied to clipboard
Creates a JSON-RPC error response with the given message.
Link copied to clipboard
Wraps a result payload into a JSON-RPC success response.