Documentation
¶
Overview ¶
Package gateway provides the MCP gateway tools (list_servers, list_tools, invoke_tool) of the `serve` TCP front end. Ranked tool search lives in pkg/toolsearch, served by `server run --stdio` as search_tools.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type GatewayTools ¶
type GatewayTools interface {
ListTools() []Tool
InvokeTool(ctx context.Context, params InvokeToolParams) (interface{}, error)
ListServers(ctx context.Context) ([]ServerInfo, error)
}
func NewGatewayTools ¶
func NewGatewayTools(serverReg registry.Registry, toolReg router.ToolRegistry, router router.Router, logger *slog.Logger) GatewayTools
type InvokeToolParams ¶
type InvokeToolParams struct {
ServerName string `json:"server_name"`
ToolName string `json:"tool_name"`
Arguments json.RawMessage `json:"arguments,omitempty"`
}
InvokeToolParams are the invoke_tool arguments. Arguments stays raw JSON end to end so the tool's arguments are relayed byte for byte: decoding them into a map would turn every number into a float64 and corrupt integers above 2^53 (9007199254740993 would become ...992).