Skip to main content

motosan_agent_tool/
lib.rs

1//! `motosan-agent-tool` — the `Tool` trait, runtime tool execution context,
2//! and a registry, plus a catalogue of built-in tools.
3//!
4//! In 0.4 this crate is wired to `motosan-agent-primitives` for the
5//! wire-format types (`ToolCall`, `ToolResult`, `ToolAnnotations`,
6//! `ContentBlock`). See [`tool`] for the layering / migration story.
7
8pub mod error;
9pub mod registry;
10pub mod tool;
11pub mod tools;
12
13pub use error::{Error, Result};
14pub use registry::ToolRegistry;
15pub use serde_json::Value;
16pub use tool::{Tool, ToolContext, ToolDef, ToolOutput};
17
18// Convenience re-exports of the wire-format types from primitives so
19// downstream callers can `use motosan_agent_tool::*` without separately
20// depending on `motosan-agent-primitives` for these types.
21pub use motosan_agent_primitives::{
22    ContentBlock, ToolAnnotations, ToolCall, ToolResult, ToolSchema,
23};