Documentation
¶
Overview ¶
package tools provides the tools used by LLMs.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type FileTools ¶
type FileTools struct {
// contains filtered or unexported fields
}
FileTools provides the tools/functions related to files (read/write/update/search). It is guarded under a certain directory (typically the current directory of the command started).
type MCPTool ¶
type MCPTool struct {
// contains filtered or unexported fields
}
MCPTool is a tool provided by MCP.
func NewCommandMCP ¶
NewCommandMCP creates a new MCPTool using the command-line.
func NewHTTPMCP ¶
NewHTTPMCP creates a new MCPTool with the given HTTP endpoint.
type Manager ¶
type Manager interface {
// ToolDefs returns the list of tools it can support.
ToolDefs(ctx context.Context) ([]ToolDefinition, error)
// Close closes the session.
Close() error
}
Manager manages the multiple tools.
type ToolDefinition ¶
type ToolDefinition interface {
// The name of the tool.
Name() string
// The description of the tool.
Description() string
// Schema of the request object.
RequestSchema() *jsonschema.Schema
// Schema of the response object.
ResponseSchema() *jsonschema.Schema
// contains filtered or unexported methods
}
ToolDefinition is a definition of a tool.
type ToolError ¶
type ToolError struct {
// contains filtered or unexported fields
}
ToolError is a type of error that should be reported to agent.
type ToolRunner ¶
type ToolRunner struct {
// contains filtered or unexported fields
}
ToolRunner keeps the list of the tools and accepts the tool requests and conducts their invocations.
func NewToolRunner ¶
func NewToolRunner(defs []ToolDefinition) (*ToolRunner, error)
NewToolRunner creates a new ToolRunner instance.