Documentation
¶
Overview ¶
Package mcp provides an Adapter that parses MCP tools/list responses.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Adapter ¶
type Adapter struct{}
Adapter converts MCP tools/list payloads into []model.UnifiedTool.
func (*Adapter) Protocol ¶
func (a *Adapter) Protocol() model.ProtocolType
Protocol implements adapter.Adapter.
type FlexType ¶ added in v0.1.15
type FlexType string
FlexType is a JSON Schema "type" value that accepts either a plain string ("string") or an array of strings (["string", "null"]). When an array is encountered the first non-"null" element is used; if all elements are "null" the value is set to "null".
func (*FlexType) UnmarshalJSON ¶ added in v0.1.15
UnmarshalJSON implements json.Unmarshaler for FlexType.
type InputSchema ¶
type InputSchema struct {
Type FlexType `json:"type,omitempty"`
Properties map[string]SchemaProperty `json:"properties,omitempty"`
Required []string `json:"required,omitempty"`
Description string `json:"description,omitempty"`
}
InputSchema is the JSON Schema fragment embedded in an MCP Tool.
type ListToolsResponse ¶
type ListToolsResponse struct {
Tools []Tool `json:"tools"`
}
ListToolsResponse is the top-level MCP tools/list wire format.
type SchemaProperty ¶
type SchemaProperty struct {
Type FlexType `json:"type,omitempty"`
Description string `json:"description,omitempty"`
}
SchemaProperty describes a single property within an InputSchema.
type Tool ¶
type Tool struct {
Name string `json:"name"`
Description string `json:"description"`
InputSchema InputSchema `json:"inputSchema"`
}
Tool is a single tool entry in the MCP tools/list response.