Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateToolHandler ¶
func CreateToolHandler(executor CommandExecutor, cfg *config.ConfigData) func(ctx context.Context, req mcp.CallToolRequest) (*mcp.CallToolResult, error)
CreateToolHandler creates an adapter that converts CommandExecutor to the format expected by MCP server
func CreateToolHandlerWithName ¶ added in v0.0.5
func CreateToolHandlerWithName(executor CommandExecutor, cfg *config.ConfigData, toolName string) func(ctx context.Context, req mcp.CallToolRequest) (*mcp.CallToolResult, error)
CreateToolHandlerWithName creates an adapter for tools that need the tool name injected
Types ¶
type CommandExecutor ¶
type CommandExecutor interface {
Execute(params map[string]interface{}, cfg *config.ConfigData) (string, error)
}
CommandExecutor defines the interface for executing commands This ensures all command executors follow the same pattern and signature
Click to show internal directories.
Click to hide internal directories.