Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ToolDeps ¶
type ToolDeps struct { Client *codersdk.Client AgentClient *agentsdk.Client Logger *slog.Logger AppStatusSlug string }
ToolDeps contains all dependencies needed by tool handlers
type ToolHandler ¶
type ToolHandler struct { Tool mcp.Tool MakeHandler func(ToolDeps) server.ToolHandlerFunc }
ToolHandler associates a tool with its handler creation function
type ToolRegistry ¶
type ToolRegistry []ToolHandler
ToolRegistry is a map of available tools with their handler creation functions
func (ToolRegistry) Register ¶
func (r ToolRegistry) Register(srv *server.MCPServer, deps ToolDeps)
Register registers all tools in the registry with the given tool adder and dependencies.
func (ToolRegistry) WithOnlyAllowed ¶
func (r ToolRegistry) WithOnlyAllowed(allowed ...string) ToolRegistry
WithOnlyAllowed returns a new ToolRegistry containing only the tools specified in the allowed list.
Click to show internal directories.
Click to hide internal directories.