Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ApprovalRequiredTool ¶
type ApprovalRequiredTool interface {
Tool
// ApprovalRequired reports whether the tool requires user approval before invocation.
ApprovalRequired() bool
}
ApprovalRequiredTool indicates whether a tool requires user approval before invocation.
type FuncTool ¶
type FuncTool interface {
SchemaTool
// Call invokes the tool with raw JSON arguments.
Call(ctx context.Context, args string) (any, error)
}
FuncTool describes a schema-aware tool that can be invoked by an agent.
func ApprovalRequiredFunc ¶
ApprovalRequiredFunc wraps a tool to indicate that it requires user approval before invocation. If the tool already requires approval, it is returned as-is. Not all tools support approval, in which case the original tool is returned.
type SchemaTool ¶
type SchemaTool interface {
Tool
// Schema returns the tool input schema.
Schema() any
// ReturnSchema returns the tool output schema.
ReturnSchema() any
}
SchemaTool describes a tool that exposes input and output schemas.
type Tool ¶
type Tool interface {
// Name returns the provider-facing tool name.
Name() string
// Description returns the provider-facing tool description.
Description() string
}
Tool describes a tool that can be made available to an agent.
type ToolMode ¶
type ToolMode string
ToolMode represents how tools should be used by the agent.
func RequireTools ¶
RequireTools returns a ToolMode that requires the named tools to be used.
Directories
¶
| Path | Synopsis |
|---|---|
|
Package hostedtool provides definitions for hosted tools.
|
Package hostedtool provides definitions for hosted tools. |
|
Package mcp provides integration with the Model Context Protocol (MCP).
|
Package mcp provides integration with the Model Context Protocol (MCP). |
|
Package shelltool provides a shell command execution tool that can be registered with an agent.
|
Package shelltool provides a shell command execution tool that can be registered with an agent. |