Documentation
¶
Index ¶
- Constants
- Variables
- func ParseArguments(raw string) (map[string]any, error)
- func Save(path string, state State) error
- type CallResult
- type CallToolOptions
- type Client
- func (c *Client) CallTool(ctx context.Context, serverName, toolName string, args map[string]any) (CallResult, error)
- func (c *Client) CallToolWithOptions(ctx context.Context, serverName, toolName string, args map[string]any, ...) (CallResult, error)
- func (c *Client) ListTools(ctx context.Context, serverName string, opts ListToolsOptions) (ListToolsResult, error)
- func (c *Client) Servers() []Server
- type FileStore
- type ListToolsOptions
- type ListToolsResult
- type MutateResult
- type Server
- type Service
- type Snapshot
- type State
- type Store
- type ToolSummary
Constants ¶
const ( OutcomeCreated = "created" OutcomeUnchanged = "unchanged" OutcomeReplaced = "replaced" OutcomeConflict = "conflict" OutcomeRemoved = "removed" )
const ( TransportCommand = "command" TransportSSE = "sse" TransportStreamableHTTP = "streamable-http" DefaultTimeoutMS = 30000 DefaultMaxBytes = 20000 )
Variables ¶
var ErrExternalEdit = errors.New("downstream MCP state changed on disk")
Functions ¶
Types ¶
type CallResult ¶
type CallResult struct {
Server string `json:"server"`
Tool string `json:"tool"`
IsError bool `json:"is_error,omitempty"`
Content string `json:"content,omitempty"`
StructuredContent any `json:"structured_content,omitempty"`
Truncated bool `json:"truncated,omitempty"`
// FullContent is available only to the in-process run evidence store.
FullContent string `json:"-"`
}
type CallToolOptions ¶ added in v0.1.27
type CallToolOptions struct {
MaxBytes int
}
CallToolOptions overrides the response budget for one call. Zero uses the server's configured max_bytes; it never means an unlimited response.
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func (*Client) CallToolWithOptions ¶ added in v0.1.27
func (c *Client) CallToolWithOptions(ctx context.Context, serverName, toolName string, args map[string]any, opts CallToolOptions) (CallResult, error)
func (*Client) ListTools ¶
func (c *Client) ListTools(ctx context.Context, serverName string, opts ListToolsOptions) (ListToolsResult, error)
type FileStore ¶ added in v0.1.22
type FileStore struct {
// contains filtered or unexported fields
}
func NewFileStore ¶ added in v0.1.22
type ListToolsOptions ¶
type ListToolsResult ¶ added in v0.1.19
type ListToolsResult struct {
Tools []ToolSummary `json:"tools"`
Total int `json:"total"`
Truncated bool `json:"truncated,omitempty"`
}
ListToolsResult reports the bounded tool inventory plus the true total so callers (and the models reading their output) can tell when the list was cut by MaxTools.
type MutateResult ¶ added in v0.1.22
type Server ¶
type Server struct {
Name string `yaml:"name" json:"name"`
Transport string `yaml:"transport" json:"transport"`
Command string `yaml:"command,omitempty" json:"command,omitempty"`
Args []string `yaml:"args,omitempty" json:"args,omitempty"`
EnvRefs map[string]string `yaml:"env_refs,omitempty" json:"env_refs,omitempty"`
URL string `yaml:"url,omitempty" json:"url,omitempty"`
HeaderRefs map[string]string `yaml:"header_refs,omitempty" json:"header_refs,omitempty"`
TimeoutMS int `yaml:"timeout_ms,omitempty" json:"timeout_ms,omitempty"`
MaxBytes int `yaml:"max_bytes,omitempty" json:"max_bytes,omitempty"`
Description string `yaml:"description,omitempty" json:"description,omitempty"`
}
type Service ¶ added in v0.1.22
type Service struct {
// contains filtered or unexported fields
}
func NewService ¶ added in v0.1.22
func NewServiceWithStore ¶ added in v0.1.22
func (*Service) AddOrUpdate ¶ added in v0.1.22
type State ¶
type State struct {
Servers []Server `yaml:"servers" json:"servers"`
}