Documentation
¶
Overview ¶
Package tool provides utilities for creating and registering MCP tools.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BaseTool ¶
type BaseTool struct {
// contains filtered or unexported fields
}
BaseTool provides a base implementation of ToolHandler.
func NewBaseTool ¶
NewBaseTool creates a new base tool with the given name and description.
type ToolHandler ¶
type ToolHandler interface {
// Tool returns the tool definition.
Tool() protocol.Tool
// Handler returns the tool's handler function.
Handler() func(ctx context.Context, progressToken *protocol.ProgressToken, arguments any) ([]protocol.Content, bool)
}
ToolHandler is the interface that tool implementations should satisfy.
Click to show internal directories.
Click to hide internal directories.