Documentation
¶
Index ¶
Constants ¶
View Source
const NameSeparator = "__"
Variables ¶
This section is empty.
Functions ¶
func CompactParamsFromSchema ¶
func CompactParamsFromSchema(schema json.RawMessage) string
CompactParamsFromSchema generates a compact parameter summary from a JSON Schema. Format: "param1:type*, param2:type" where * marks required params.
func ParsePrefixedName ¶
ParsePrefixedName splits "server__tool" into (server, tool). Splits on the first occurrence of "__".
func PrefixedName ¶
PrefixedName returns "server__tool".
Types ¶
type ProxyConfig ¶
type ProxyConfig struct {
GeminiAPIKey string `json:"gemini_api_key,omitempty"`
Search SearchConfig `json:"search,omitempty"`
IdleTimeoutMinutes int `json:"idle_timeout_minutes,omitempty"`
CallTimeoutSeconds int `json:"call_timeout_seconds,omitempty"`
MCPServers map[string]ServerConfig `json:"mcpServers"`
}
ProxyConfig is the full proxy configuration.
type SearchConfig ¶
type SearchConfig struct {
DefaultLimit int `json:"default_limit,omitempty"`
Model string `json:"model,omitempty"`
}
SearchConfig holds search engine settings.
type SearchResult ¶
type SearchResult struct {
Name string `json:"name"` // prefixed name
Description string `json:"description"` // first sentence
CompactParams string `json:"compact_params"` // param summary
}
SearchResult is returned by the search engine.
type ServerConfig ¶
type ServerConfig struct {
Type string `json:"type,omitempty"` // "stdio" or "http" (default: "stdio")
Command string `json:"command,omitempty"` // for stdio
Args []string `json:"args,omitempty"` // for stdio
Env map[string]string `json:"env,omitempty"` // for stdio
URL string `json:"url,omitempty"` // for http
}
ServerConfig defines how to connect to an upstream MCP server.
func (ServerConfig) EffectiveType ¶
func (s ServerConfig) EffectiveType() string
EffectiveType returns the server type, defaulting to "stdio".
type ServerStatus ¶
type ServerStatus struct {
Name string `json:"name"`
Connected bool `json:"connected"`
ToolCount int `json:"tool_count"`
LastRefresh string `json:"last_refresh"`
Error string `json:"error,omitempty"`
}
ServerStatus reports health info for an upstream server.
type ToolEntry ¶
type ToolEntry struct {
Name string `json:"name"` // prefixed: "servername__toolname"
ServerName string `json:"server_name"` // which upstream server
OriginalName string `json:"original_name"` // unprefixed tool name
Description string `json:"description"` // tool description
InputSchema json.RawMessage `json:"input_schema"` // full JSON Schema
CompactParams string `json:"compact_params"` // "chat_id:string*, message:string*"
}
ToolEntry represents a cached tool from an upstream MCP server.
Click to show internal directories.
Click to hide internal directories.