Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type JSONRPCNotification ¶
type JSONRPCNotification struct {
JSONRPC string `json:"jsonrpc"`
Method string `json:"method"`
Params any `json:"params,omitempty"`
}
JSONRPCNotification represents an outgoing JSON-RPC 2.0 notification (no id).
type JSONRPCRequest ¶
type JSONRPCRequest struct {
JSONRPC string `json:"jsonrpc"`
ID json.RawMessage `json:"id,omitempty"`
Method string `json:"method"`
Params json.RawMessage `json:"params,omitempty"`
}
JSONRPCRequest represents an incoming JSON-RPC 2.0 request.
type JSONRPCResponse ¶
type JSONRPCResponse struct {
JSONRPC string `json:"jsonrpc"`
ID json.RawMessage `json:"id,omitempty"`
Result any `json:"result,omitempty"`
Error *RPCError `json:"error,omitempty"`
}
JSONRPCResponse represents an outgoing JSON-RPC 2.0 response.
type RPCError ¶
type RPCError struct {
Code int `json:"code"`
Message string `json:"message"`
Data any `json:"data,omitempty"`
}
RPCError represents a JSON-RPC 2.0 error object.
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
Server is a stdio-based MCP server that bridges JSON-RPC messages to the engine.
type ToolDef ¶
type ToolDef struct {
Name string
Description string
InputSchema map[string]any
Handler ToolHandler
}
ToolDef describes a single MCP tool.
type ToolHandler ¶
ToolHandler processes a tool call and returns a text result or an error.
Click to show internal directories.
Click to hide internal directories.