Documentation
¶
Overview ¶
Package command implements a registry for Model Context Protocol (MCP) servers. It provides integration with MCP tools, allowing agents to dynamically discover and invoke tools exposed by MCP servers.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Registry ¶
type Registry struct {
// contains filtered or unexported fields
}
func (*Registry) Attach ¶ added in v0.3.0
Attach MCP server to the registry, making its tools available to the agent. The server is identified by a unique prefix, which is used to namespace tool names (e.g., fs_read). Tool names use underscore separator (prefix_toolname) due to AWS Bedrock constraints which only allow [a-zA-Z0-9_-] characters. The first token before underscore is always the server prefix. Each server runs independently, and its tools are registered with the prefix to avoid naming conflicts.
type Server ¶ added in v0.3.0
type Server interface {
ListTools(ctx context.Context, params *mcp.ListToolsParams) (*mcp.ListToolsResult, error)
CallTool(ctx context.Context, params *mcp.CallToolParams) (*mcp.CallToolResult, error)
Close() error
}
MCP Server interface