mcp

package
v1.0.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 23, 2026 License: MIT Imports: 12 Imported by: 0

Documentation

Index

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)

func NewServer

func NewServer(e *engine.Engine) *server.MCPServer

NewServer creates an MCP server wired to the given engine.

func Serve

func Serve(e *engine.Engine) error

Serve starts the MCP server on stdio.

func StringArg

func StringArg(req gomcp.CallToolRequest, key, def string) string

StringArg pulls a string argument from a tool request with a default.

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL