Skip to main content

Module tools

Module tools 

Source
Expand description

Mock tools for testing tool-calling scenarios.

  • EchoTool — echoes its text input back as output
  • FailTool — always returns an error on execution

Both tools are designed for use with AgentRuntime to test tool-calling flows deterministically.

§Example

use traitclaw_test_utils::tools::{EchoTool, FailTool};
use traitclaw_core::traits::tool::Tool;

assert_eq!(EchoTool.name(), "echo");
assert_eq!(FailTool.name(), "fail");

Structs§

DangerousInput
Input for DangerousTool.
DangerousOutput
Output from DangerousTool.
DangerousTool
A mock “dangerous” tool for testing hook-based interception.
DenyGuard
A guard that unconditionally denies all actions.
EchoInput
Input for EchoTool: a single text field.
EchoOutput
Output from EchoTool: the echoed text.
EchoTool
A simple tool that echoes its text input.
FailInput
Input for FailTool: an optional message.
FailTool
A tool that always fails with an error.