Documentation
¶
Overview ¶
Package mcp provides a thread-safe registry for discovered MCP tools.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ToolEntry ¶
type ToolEntry struct {
ServerID string `json:"server_id"`
ToolName string `json:"tool_name"`
Description string `json:"description,omitempty"`
InputSchema any `json:"input_schema,omitempty"`
}
ToolEntry describes a tool discovered from an MCP server.
type ToolRegistry ¶
type ToolRegistry struct {
// contains filtered or unexported fields
}
ToolRegistry provides thread-safe storage for discovered MCP tools.
func NewToolRegistry ¶
func NewToolRegistry() *ToolRegistry
NewToolRegistry creates a new ToolRegistry.
func (*ToolRegistry) AllTools ¶
func (r *ToolRegistry) AllTools() []ToolEntry
AllTools returns all registered tools.
func (*ToolRegistry) RegisterTools ¶
func (r *ToolRegistry) RegisterTools(serverID string, tools []ToolEntry)
RegisterTools adds a batch of tools from an MCP server.
func (*ToolRegistry) Reset ¶
func (r *ToolRegistry) Reset()
Reset clears all tools from the registry.
Click to show internal directories.
Click to hide internal directories.