klieo-tools 2.1.0

Tool dispatch + JSON-schema arg validation + timeout enforcement for klieo-core.
Documentation

klieo-tools

Tool dispatch + JSON-schema arg validation + timeout enforcement for klieo-core.

Part of the klieo Rust agent framework.

Features

  • ToolInvoker implementation that dispatches to registered Arc<dyn Tool>
  • JSON-schema validation on tool arguments before invoke
  • Per-tool configurable timeouts with ToolError::Timeout on expiry
  • Duplicate-name detection: add_tool / with_tool return Err(InvokerError::DuplicateTool) instead of panicking

Usage

[dependencies]
klieo-tools = "2"
use klieo_tools::ChainedInvoker;

let invoker = ChainedInvoker::new()
    .with_tool_owned(MyToolA::new())?
    .with_tool_owned(MyToolB::new())?;

let mut invoker = ChainedInvoker::new();
invoker.add_tool(Arc::new(my_tool))?;

Use with_tool(Arc<dyn Tool>) when you need to share the Arc across other dispatch paths.

add_tool and with_tool return Err(InvokerError::DuplicateTool) if a tool with the same name is already registered.

Status

2.x — stable. See docs/SEMVER.md.

License

MIT — see LICENSE.