8 releases
| 0.2.6 | Feb 20, 2026 |
|---|---|
| 0.2.5 | Feb 17, 2026 |
| 0.1.5 | Jan 27, 2026 |
#1315 in Development tools
330 downloads per month
Used in 11 crates
(7 directly)
520KB
13K
SLoC
serdes-ai-tools
Tool system for serdes-ai agents
This crate provides the tool system for SerdesAI agents:
Tooltrait for defining callable toolsToolDefinitionfor JSON schema-based tool descriptionsSchemaBuilderfor easy parameter schema constructionToolReturnfor structured tool responses
Installation
[dependencies]
serdes-ai-tools = "0.1"
Usage
use serdes_ai_tools::{Tool, ToolDefinition, ToolReturn, ToolResult, SchemaBuilder};
struct MyTool;
impl Tool<()> for MyTool {
fn definition(&self) -> ToolDefinition {
ToolDefinition::new("my_tool", "Does something useful")
.with_parameters(
SchemaBuilder::new()
.string("input", "The input value", true)
.build()
.unwrap()
)
}
async fn call(
&self,
_ctx: &RunContext<()>,
args: serde_json::Value,
) -> ToolResult {
Ok(ToolReturn::text("Done!"))
}
}
Part of SerdesAI
This crate is part of the SerdesAI workspace.
For most use cases, you should use the main serdes-ai crate which re-exports these types.
License
MIT License - see LICENSE for details.
Dependencies
~12–22MB
~311K SLoC