Documentation
¶
Overview ¶
Package tools defines the Tool interface for LLM agents, including registration, parameter schema, and MCP integration. Tools enable agents to interact with external systems and APIs in a structured, extensible way.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetDescriptions ¶
Types ¶
type IMCPTool ¶ added in v0.1.9
type IMCPTool interface {
ITool
RegisterMCP(registrator McpServerRegistrator) error
}
IMCPTool is an interface that extends ITool to include functionality for registering the tool with an MCP server. The RegisterMCP method allows the tool to be registered with a given MCP Server.
type ITool ¶
type ITool interface {
// Name returns the name of the Tool.
Name() string
// Description returns the description of the tool, to be used in the prompt.
// Should not exceed LLM model limit.
Description() string
// Parameters returns the parameters definition of the function, to be used in the prompt.
Parameters() *jsonschema.Schema
// Call executes the tool with the given input and returns the result.
// If the tool fails to parse the input, it should return ErrFailedUnmarshalInput error.
Call(context.Context, string) (string, error)
}
ITool is a tool for the llm agent to interact with different applications.
type McpServerRegistrator ¶ added in v0.1.9
Click to show internal directories.
Click to hide internal directories.