Documentation
¶
Overview ¶
Package serverwire is the sole go-sdk adapter for the bounded MCP server.
Index ¶
Constants ¶
View Source
const ( CodeInvalidParams = jsonrpc.CodeInvalidParams CodeInternalError = jsonrpc.CodeInternalError )
Variables ¶
View Source
var ErrBatchUnsupported = errors.New("batch requests are not supported")
View Source
var ErrClosed = errors.New("server closed")
View Source
var ErrInputEnvelope = errors.New("input envelope exceeds limit")
View Source
var ErrInputLimit = errors.New("input exceeds limit")
View Source
var ErrInvalidArgument = errors.New("invalid argument")
View Source
var ErrOutputLimit = errors.New("output exceeds limit")
View Source
var NewClient = mcp.NewClient
Functions ¶
This section is empty.
Types ¶
type Adapter ¶
type Adapter struct {
// contains filtered or unexported fields
}
func (*Adapter) RegisterTool ¶
func (*Adapter) Serve ¶
func (a *Adapter) Serve(ctx context.Context, r io.ReadCloser, w io.WriteCloser) error
Serve owns both endpoints. Cancellation closes them before waiting for the SDK session.
type CallToolParams ¶
type CallToolParams = mcp.CallToolParams
type ClientSession ¶
type ClientSession = mcp.ClientSession
type FrameReader ¶
type FrameReader struct {
// contains filtered or unexported fields
}
func NewFrameReader ¶
func NewFrameReader(r io.Reader, max int, idmax ...int) *FrameReader
type FrameWriter ¶
type FrameWriter struct {
// contains filtered or unexported fields
}
func NewFrameWriter ¶
func NewFrameWriter(w io.Writer, max int) *FrameWriter
type IOTransport ¶
type IOTransport = mcp.IOTransport
type Implementation ¶
type Implementation = mcp.Implementation
type JSONRPCError ¶
type Result ¶
type Result struct {
Content []Content
StructuredContent json.RawMessage
IsError bool
}
type TextContent ¶
type TextContent = mcp.TextContent
type Tool ¶
type Tool struct {
Name, Title, Description string
InputSchema, OutputSchema json.RawMessage
Handler Handler
}
type ToolResult ¶
type ToolResult = mcp.CallToolResult
Click to show internal directories.
Click to hide internal directories.