Skip to main content

Module tool

Module tool 

Source
Expand description

Tool definitions, calls, and the Tool trait.

Mirrors AgentTool / AgentToolResult from pi-agent-core.

Structs§

InvokeContext
Per-invocation context handed to a tool’s Tool::execute.
ParameterSchema
JSON-Schema-ish parameter description for a tool.
ToolCall
A tool call extracted from a model response.
ToolDefinition
A tool’s static definition (name, schema, description).
ToolResult
A tool’s result returned to the model.

Traits§

Tool
The trait every tool implements.

Functions§

validate_input
Validate input against a tool’s parameters schema.

Type Aliases§

JsonValue
A JSON value, aliased for ergonomic imports.