Skip to main content

Crate agentic_tools_core

Crate agentic_tools_core 

Source
Expand description

Core traits and types for the agentic-tools library family.

This crate provides:

  • Tool trait: Native-first tool definition with no serde bounds
  • ToolCodec trait: Serialization boundary for protocol integration
  • ToolRegistry: Type-safe tool storage with native and JSON dispatch
  • SchemaEngine: Runtime schema transforms for provider flexibility
  • TextFormat trait: Transport-agnostic text formatting for tool outputs
  • Provider renderers: OpenAI, Anthropic, and MCP schema generation

Re-exports§

pub use context::ToolContext;
pub use error::ToolError;
pub use fmt::ErasedFmt;
pub use fmt::TextFormat;
pub use fmt::TextOptions;
pub use fmt::TextStyle;
pub use fmt::fallback_text_from_json;
pub use registry::FormattedResult;
pub use registry::ToolHandle;
pub use registry::ToolRegistry;
pub use registry::ToolRegistryBuilder;
pub use schema::FieldConstraint;
pub use schema::SchemaEngine;
pub use schema::SchemaTransform;
pub use tool::Tool;
pub use tool::ToolCodec;

Modules§

context
Tool execution context.
error
Unified error type for agentic tools.
fmt
Transport-agnostic text formatting for tool outputs.
providers
Provider-specific schema renderers.
registry
Tool registry for dynamic dispatch and type-safe native calls.
schema
Schema engine for runtime transforms.
tool
Core tool traits for native-first tool definitions.

Type Aliases§

BoxFuture
An owned dynamically typed Future for use in cases where you can’t statically type your result or need to add some indirection.