Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RegisterTool ¶
func RegisterTool[In, Out any](r *Registry, name, description string, handler ToolHandlerFor[In, Out])
RegisterTool は新しいツールを登録する ツールが無効化されている場合でも登録はするが、呼び出し時にチェックされる
Types ¶
type Registry ¶
type Registry struct {
// contains filtered or unexported fields
}
Registry はツールの登録と管理を行う
func (*Registry) CheckToolEnabled ¶
CheckToolEnabled はツールが有効でない場合にエラーを返す
func (*Registry) GetEnabledTools ¶
GetEnabledTools は有効なツールの名前リストを返す
func (*Registry) IsRegistered ¶
IsRegistered はツールが登録されているかを返す
func (*Registry) IsToolEnabled ¶
IsToolEnabled はツールが有効かどうかを返す
type ToolHandlerFor ¶
type ToolHandlerFor[In, Out any] func(ctx context.Context, req *mcp.CallToolRequest, input In) (*mcp.CallToolResult, Out, error)
ToolHandlerFor is a type alias for MCP tool handlers
Click to show internal directories.
Click to hide internal directories.