Skip to main content

Module tool

Module tool 

Source
Expand description

Tool contract shared by the tool node, the agent node and tool providers (native Rust tools, MCP servers, HTTP tools…).

Structs§

ToolError
Error calling a tool (transport, unknown tool…).
ToolImageError
A tool result image that breaks a limit.
ToolOutput
Result of a tool call.
ToolRegistry
Service registered in crate::node::Services: named tool providers (e.g. builtin, mcp:github). Nodes reference tools as provider/tool.
ToolSpec
Description of a callable tool, exposed to models for tool calling.

Enums§

ToolImage
An image returned by a tool.

Constants§

MAX_TOOL_IMAGES
Most images one tool result may carry.
MAX_TOOL_IMAGE_BYTES
Largest decoded size of one tool result image, in bytes (5 MiB).
TOOL_IMAGE_MEDIA_TYPES
Media types accepted for tool result images (supported by every built-in provider).

Traits§

ToolRuntime
A source of tools.

Functions§

check_images
Check the images of one tool result: at most MAX_TOOL_IMAGES, each passing ToolImage::check.