Documentation
¶
Overview ¶
Package mcp defines outbound MCP capabilities using protocol contracts rather than any concrete MCP implementation. Clients are borrowed from providers.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CallOptions ¶
CallOptions contains explicit per-call transport metadata. Header values are forwarded unchanged during initialization, discovery, and tool invocation; implementations must isolate sessions with different header sets.
type Client ¶
type Client interface {
CallTool(ctx context.Context, request *schema.CallToolRequest, options CallOptions) (*schema.CallToolResult, error)
}
Client invokes an MCP tool and preserves its native result semantics. A tool's isError result is distinct from a transport or protocol error. Lifecycle and session cleanup belong to the provider's owner.
type Options ¶
type Options struct {
URL string `json:"url"`
Transport string `json:"transport,omitempty"`
ProtocolVersion string `json:"protocolVersion,omitempty"`
Tool string `json:"tool"`
Header map[string]string `json:"header,omitempty"`
MaxSessions int `json:"maxSessions,omitempty"`
client.Limits
}
Options describes an MCP server, protocol, tool and session bounds. Per-call credentials are supplied explicitly through CallOptions rather than inferred.