Skip to main content

agentic_tools_core/
lib.rs

1//! Core traits and types for the agentic-tools library family.
2//!
3//! This crate provides:
4//! - [`Tool`] trait: Native-first tool definition with no serde bounds
5//! - [`ToolCodec`] trait: Serialization boundary for protocol integration
6//! - [`ToolRegistry`]: Type-safe tool storage with native and JSON dispatch
7//! - [`SchemaEngine`]: Runtime schema transforms for provider flexibility
8//! - [`TextFormat`] trait: Transport-agnostic text formatting for tool outputs
9//! - Provider renderers: OpenAI, Anthropic, and MCP schema generation
10
11pub mod context;
12pub mod error;
13pub mod fmt;
14pub mod providers;
15pub mod registry;
16pub mod schema;
17pub mod tool;
18
19pub use context::ToolContext;
20pub use error::ToolError;
21pub use fmt::ErasedFmt;
22pub use fmt::TextFormat;
23pub use fmt::TextOptions;
24pub use fmt::TextStyle;
25pub use fmt::fallback_text_from_json;
26pub use registry::FormattedResult;
27pub use registry::ToolHandle;
28pub use registry::ToolRegistry;
29pub use registry::ToolRegistryBuilder;
30pub use schema::FieldConstraint;
31pub use schema::SchemaEngine;
32pub use schema::SchemaTransform;
33pub use tool::Tool;
34pub use tool::ToolCodec;
35
36// Re-export BoxFuture to support macro-generated signatures without exposing futures crate
37pub use futures::future::BoxFuture;