Skip to main content

Module tool

Module tool 

Source
Expand description

Tool: external capabilities an agent can invoke.

This file is where Tool is defined: the Tool trait defines the interface agents use to execute tools, ToolSchema describes the definition exposed to the model, ToolError describes why a call fails; it contains no concrete tools — those are implemented by agent applications (see examples/tool_agent.rs).

Companion component:

Structs§

SharedState
Shared state: a heterogeneous container accessed by type.
ToolContext
Context passed to a tool call.
ToolNamespace
Namespace assigned to a tool by the host application or extension layer.
ToolOutput
Model-visible output produced by a tool.
ToolPolicy
Tool policy metadata declared by the tool author.
ToolSchema
The definition of a tool.
ToolSource
Host-facing metadata describing where a provider-visible tool came from.

Enums§

SideEffectLevel
Declared side-effect level for a tool.
ToolError
Reasons a tool call fails.
ToolMemoryPolicy
Memory handling policy for model-visible tool/effect output.
ToolNamespaceKind
Kind of tool namespace.
ToolResult
Result of a tool call.
ToolTrustLevel
Trust level assigned to a tool source.

Traits§

Tool
A tool an agent can invoke.