Documentation
¶
Index ¶
- type Pool
- func (p *Pool) CallTool(ctx context.Context, server, tool string, argsJSON json.RawMessage) (*mcp.CallToolResult, error)
- func (p *Pool) Close(server string)
- func (p *Pool) CloseAll()
- func (p *Pool) ListTools(ctx context.Context, server string) ([]ToolInfo, error)
- func (p *Pool) Reset(cfg *config.Config)
- func (p *Pool) ToolInfoByName(ctx context.Context, server, tool string) (*ToolInfo, error)
- func (p *Pool) ToolSchema(ctx context.Context, server, tool string) (json.RawMessage, error)
- type ToolInfo
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Pool ¶
type Pool struct {
// contains filtered or unexported fields
}
Pool manages MCP server connections, creating them on demand.
func (*Pool) CallTool ¶
func (p *Pool) CallTool(ctx context.Context, server, tool string, argsJSON json.RawMessage) (*mcp.CallToolResult, error)
CallTool invokes a tool on a server.
func (*Pool) Reset ¶ added in v0.1.6
Reset swaps the underlying config and drops all active connections.
func (*Pool) ToolInfoByName ¶
ToolInfoByName returns metadata and schemas for a specific tool.
func (*Pool) ToolSchema ¶
ToolSchema returns the input schema for a specific tool.
type ToolInfo ¶
type ToolInfo struct {
Name string
Description string
InputSchema json.RawMessage
OutputSchema json.RawMessage
}
ToolInfo is a simplified tool descriptor returned by ListTools.
Click to show internal directories.
Click to hide internal directories.