Documentation
¶
Index ¶
- func BoolArg(req gomcp.CallToolRequest, key string, def bool) bool
- func IntArg(req gomcp.CallToolRequest, key string, def int) int
- func JsonResult(v any) (*gomcp.CallToolResult, error)
- func NewServer(e *engine.Engine) *server.MCPServer
- func Serve(e *engine.Engine) error
- func StringArg(req gomcp.CallToolRequest, key, def string) string
- type ToolHandler
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BoolArg ¶
func BoolArg(req gomcp.CallToolRequest, key string, def bool) bool
BoolArg pulls a bool argument from a tool request with a default.
func IntArg ¶
func IntArg(req gomcp.CallToolRequest, key string, def int) int
IntArg pulls an int argument from a tool request with a default.
func JsonResult ¶
func JsonResult(v any) (*gomcp.CallToolResult, error)
Types ¶
type ToolHandler ¶
type ToolHandler = func(ctx context.Context, req gomcp.CallToolRequest) (*gomcp.CallToolResult, error)
func Traced ¶
func Traced(e *engine.Engine, toolName, sessionID string, handler ToolHandler) ToolHandler
Traced wraps a tool handler to emit events to the relay. sessionID is the default agent identity (cwd:pid); an explicit agent_id argument in the tool call overrides it. Exported so protrove can reuse the same tracing pattern for premium tools.
Click to show internal directories.
Click to hide internal directories.