Skip to main content

Crate motosan_agent_tool

Crate motosan_agent_tool 

Source
Expand description

motosan-agent-tool — the Tool trait, runtime tool execution context, and a registry, plus a catalogue of built-in tools.

In 0.4 this crate is wired to motosan-agent-primitives for the wire-format types (ToolCall, ToolResult, ToolAnnotations, ContentBlock). See tool for the layering / migration story.

Re-exports§

pub use error::Error;
pub use error::Result;
pub use registry::ToolRegistry;
pub use tool::Tool;
pub use tool::ToolContext;
pub use tool::ToolDef;
pub use tool::ToolOutput;

Modules§

error
registry
tool
The Tool trait, execution context, and runtime tool output type.
tools
Built-in tool implementations.

Structs§

ToolAnnotations
Capability metadata a tool publishes about itself.
ToolCall
An assistant-issued request to invoke a named tool.
ToolResult
The reply pairing for a ToolCall.
ToolSchema
Canonical LLM-facing tool declaration shared across the workspace: the name, human-readable description, and JSON-Schema input_schema the model sees. Layer-specific fields live on the wrappers — motosan_agent_tool::ToolDef adds the host-side internal_name, and motosan_ai::Tool adds the provider cache flag — both via #[serde(flatten)] so the on-the-wire shape is {name, description, input_schema, ...}.

Enums§

ContentBlock
One slice of multimodal content inside a Message.
Value
Represents any valid JSON value.