Documentation
¶
Index ¶
- type Handler
- type Registry
- func (r *Registry) CallTool(ctx context.Context, name string, arguments map[string]interface{}) (*protocol.ToolResult, error)
- func (r *Registry) ListTools(_ context.Context, cursor string) ([]protocol.Tool, string, error)
- func (r *Registry) RegisterTool(tool tools.Tool)
- func (r *Registry) RegisterToolWithHandler(tool tools.Tool, handler Handler)
- func (r *Registry) UnregisterTool(name string)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Handler ¶
type Handler func(ctx context.Context, tool tools.Tool, arguments map[string]interface{}) (*protocol.ToolResult, error)
Handler is a function that executes a tool with given arguments
type Registry ¶
type Registry struct {
// contains filtered or unexported fields
}
Registry provides a simple way to register individual tools
func (*Registry) CallTool ¶
func (r *Registry) CallTool(ctx context.Context, name string, arguments map[string]interface{}) (*protocol.ToolResult, error)
CallTool implements ToolProvider interface
func (*Registry) RegisterTool ¶
RegisterTool adds a tool to the registry
func (*Registry) RegisterToolWithHandler ¶
RegisterToolWithHandler adds a tool with a custom handler
func (*Registry) UnregisterTool ¶
UnregisterTool removes a tool from the registry
Click to show internal directories.
Click to hide internal directories.