Re-exports§
pub use builder::ToolsBuilder;pub use ffi::Language;pub use ffi::RawToolDef;pub use once_cell;
Modules§
- builder
- Typestate-based builder for
ToolCollection. - ffi
- FFI adapter types for scripting-language tool definitions.
Structs§
- CallId
- Collection
Builder - Builder for
ToolCollectionwith support for shared context injection. Construct viaToolCollection::builder(). - Deserialization
Error - Specific deserialization errors
- Function
Call - Represents a function call with name and arguments
- Function
Decl - Function declaration for LLM consumption
- Function
Response - Represents a function response with name and arguments
- Meta
Validation Error - Per-tool attribute validation error. Reported by
validate_tool_attrsandvalidate_tool_attrs_for. - NoMeta
- Default metadata type for
ToolCollection. Empty struct that deserializes from any JSON object, ignoring all fields. Use this when you don’t care about per-tool attributes. - Tool
- Represents a tool that can be called
- Tool
Collection - Collection of registered tools, parameterized by a metadata type
M. - Tool
Entry - One entry in a
ToolCollection: callable function, schema, and the metadata typed against the collection’sMparameter. - Tool
Metadata - Metadata about a tool function
- Tool
Registration - Tool registration for inventory collection. Constructed via struct literal in macro-generated code; field additions are minor-version breaking changes.
- Type
Signature - Runtime type signature information
Enums§
- Tool
Error - Errors that can occur during tool operations
Traits§
- MetaArg
- Helper trait that lets
ToolCollection::registeraccept either a realMor()whenM = NoMeta. Passing()to a typed collection fails at compile time — there’s no silent default. - Tool
Schema - Trait for types that can generate a JSON Schema representation of themselves.
Functions§
- validate_
tool_ attrs - Validate every registered tool’s
#[tool(...)]attributes againstM, accumulating all failures. Use in CI tests to catch attribute typos before they hitcollect_toolsat runtime. - validate_
tool_ attrs_ for - Like
validate_tool_attrsbut only checks the named subset. Useful for workspaces with multiple metadata schemas, each gating a different group of tools. Returns an error for any name that does not match a registered tool — typos in the test list are as bad as typos in the attributes.
Type Aliases§
- Tool
Func - Function signature for tools