Documentation
¶
Index ¶
- func GetIdFromServerNameAndToolName(ServerName, toolName string) string
- func GetMCPClientMap(config string, toolsMap map[string]bool) (map[string]*client.Client, error)
- func GetServerNameAndToolNameFromId(id string) (string, string)
- func ResolveMcpToolTarget(mcpTools []*McpTools, toolKey string) (serverName, nativeToolName string, err error)
- func TestMcpToolCall(mcpServers string, mcpTools []*McpTools, toolKey string, ...) (string, error)
- type AgentClients
- type AgentProvider
- type McpAgentProvider
- type McpTools
- type ServerConfig
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetMCPClientMap ¶
func ResolveMcpToolTarget ¶
func ResolveMcpToolTarget(mcpTools []*McpTools, toolKey string) (serverName, nativeToolName string, err error)
ResolveMcpToolTarget resolves MCP server name and native tool name. toolKey may be "serverName__toolName" (see GetIdFromServerNameAndToolName) or a bare tool name that appears in exactly one enabled server's tool list.
Types ¶
type AgentClients ¶
type AgentClients struct {
Clients map[string]*client.Client
Tools []*protocol.Tool
BuiltinToolReg *builtin_tool.ToolRegistry
WebSearchEnabled bool
}
type AgentProvider ¶
type AgentProvider interface {
GetAgentClients() (*AgentClients, error)
}
func GetAgentProvider ¶
type McpAgentProvider ¶
func NewMcpAgentProvider ¶
func (*McpAgentProvider) GetAgentClients ¶
func (p *McpAgentProvider) GetAgentClients() (*AgentClients, error)
type McpTools ¶
type McpTools struct {
ServerName string `json:"serverName"`
Tools string `json:"tools"`
IsEnabled bool `json:"isEnabled"`
}
func GetToolsList ¶
type ServerConfig ¶
type ServerConfig struct {
// Stdio config
Command string `json:"command"`
Args []string `json:"args"`
Env map[string]string `json:"env"`
// SSE config
URL string `json:"url"`
// Transport type: "sse", "stdio", "streamablehttp"
// If not specified, auto-detected based on URL field:
// - URL not empty -> SSE
// - URL empty -> Stdio
Type string `json:"type,omitempty"`
}
Click to show internal directories.
Click to hide internal directories.