agentmcp

package
v0.2.0-rc.1 Latest Latest
Warning

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

Go to latest
Published: Oct 7, 2026 License: GPL-3.0 Imports: 11 Imported by: 0

Documentation

Overview

Package agentmcp exposes the bounded agent service through MCP tools.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DecodeRequest

func DecodeRequest(data []byte, operation string) (agent.Request, error)

DecodeRequest validates a bounded CLI request with the same narrow schemas as MCP. An explicit operation may fill an absent operation, but cannot override it. Returned errors are sanitized; the request's operation is usable on failure.

func Failure

func Failure(op, code, message string) agent.Response

Failure creates a public failure without echoing unknown operation names. Callers must supply fixed, non-sensitive codes and messages.

func NewServer

func NewServer(service *agent.Service, version string) *mcp.Server

NewServer creates an MCP server. The caller owns the service and must close it after all sessions end. Trust is exclusively configured when creating service.

func Schema

func Schema() map[string]any

Schema returns standalone request, response, batchRequest, and batchResponse schemas, plus input/output unions for a complete CLI invocation. Data schemas are inferred from each operation's concrete DTO, including nested results.

func StdioTransport

func StdioTransport() *mcp.IOTransport

StdioTransport bounds each incoming JSON-RPC frame to 128 KiB, including its newline, before the SDK decodes it. Invalid/oversized frames end the session with a fixed error and are never partially forwarded to the SDK.

Types

This section is empty.

Jump to

Keyboard shortcuts

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