Documentation
¶
Index ¶
- Variables
- func GetAgentMCPServers(cfg *config.Config, agentName string) ([]string, error)
- func GetServerConfig(cfg *config.Config, serverName string) (*config.MCPServer, error)
- func IsConfigError(err error) bool
- func IsConnectionError(err error) bool
- func ValidateConfig(cfg *config.Config) error
- type ApprovalInfo
- type ApprovalResult
- type Client
- func (c *Client) Close() error
- func (c *Client) GetToolList() []tool.BaseTool
- func (c *Client) GetToolListForServers(serverNames []string) []tool.BaseTool
- func (c *Client) GetTools() map[string]tool.BaseTool
- func (c *Client) GetToolsForServers(serverNames []string) map[string]tool.BaseTool
- func (c *Client) Initialize(ctx context.Context) error
- func (c *Client) InitializeForChat(ctx context.Context, chat config.Chat) error
- type InvokableApprovableTool
- type MCPError
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrMCPNotInitialized MCP manager not initialized ErrMCPNotInitialized = errors.New("MCP manager not initialized") // ErrServerNotFound MCP server not found ErrServerNotFound = errors.New("MCP server not found") // ErrToolNotFound MCP tool not found ErrToolNotFound = errors.New("MCP tool not found") // ErrInvalidConfig Invalid MCP configuration ErrInvalidConfig = errors.New("Invalid MCP configuration") // ErrConnectionFailed MCP connection failed ErrConnectionFailed = errors.New("MCP connection failed") )
MCP related error definitions
Functions ¶
func GetAgentMCPServers ¶
GetAgentMCPServers gets MCP server list for specified agent
func GetServerConfig ¶
GetServerConfig gets configuration for specified server
func IsConfigError ¶
IsConfigError checks if it's a configuration error
func IsConnectionError ¶
IsConnectionError checks if it's a connection error
func ValidateConfig ¶
ValidateConfig validates MCP configuration
Types ¶
type ApprovalInfo ¶
func (*ApprovalInfo) String ¶
func (ai *ApprovalInfo) String() string
type ApprovalResult ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client MCP client structure
func (*Client) GetToolList ¶
func (*Client) GetToolListForServers ¶
func (*Client) GetToolsForServers ¶
GetToolsForServers gets tools from specified MCP servers
func (*Client) Initialize ¶
Initialize initializes the MCP client
type InvokableApprovableTool ¶
type InvokableApprovableTool struct {
tool.InvokableTool
}
func (InvokableApprovableTool) InvokableRun ¶
Click to show internal directories.
Click to hide internal directories.