Documentation
¶
Index ¶
- type Config
- type MCPTool
- type MCPToolWrapper
- type Manager
- func (m *Manager) CallTool(ctx context.Context, serverName, toolName string, args map[string]any) (string, error)
- func (m *Manager) Close()
- func (m *Manager) Connect(ctx context.Context) error
- func (m *Manager) GetTools() []MCPTool
- func (m *Manager) HealthStatus() map[string]string
- func (m *Manager) LoadConfig() error
- func (m *Manager) Reconnect(ctx context.Context, serverName string) error
- func (m *Manager) RegisterToToolRegistry(registry *tools.Registry)
- type ServerConfig
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct {
MCPServers map[string]ServerConfig `json:"mcpServers"`
}
Config は ~/.xelyon/mcp.json の構造
type MCPTool ¶
type MCPTool struct {
ServerName string
Name string
Description string
InputSchema json.RawMessage
Session *mcp.ClientSession
}
MCPTool は外部MCPサーバーから取得したツール
type MCPToolWrapper ¶
type MCPToolWrapper struct {
// contains filtered or unexported fields
}
MCPToolWrapper はMCPツールをTool interfaceにラップ
func (*MCPToolWrapper) Name ¶
func (w *MCPToolWrapper) Name() string
Name はツール名を返す(mcp_<server>_<tool> 形式、特殊文字を置換)
func (*MCPToolWrapper) Run ¶
func (w *MCPToolWrapper) Run(args map[string]string) (string, *tools.FileChange, error)
Run はツールを実行
type Manager ¶
type Manager struct {
// contains filtered or unexported fields
}
Manager はMCPサーバーの接続を管理
func (*Manager) CallTool ¶
func (m *Manager) CallTool(ctx context.Context, serverName, toolName string, args map[string]any) (string, error)
CallTool はMCPツールを呼び出す(リトライ付き)
func (*Manager) HealthStatus ¶
HealthStatus はサーバーのヘルスステータスを返す
func (*Manager) LoadConfig ¶
LoadConfig は ~/.xelyon/mcp.json を読み込む
func (*Manager) RegisterToToolRegistry ¶
RegisterToToolRegistry はMCPツールをTool Registryに登録
Click to show internal directories.
Click to hide internal directories.