Expand description
Mock tools for testing tool-calling scenarios.
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§
- Dangerous
Input - Input for
DangerousTool. - Dangerous
Output - Output from
DangerousTool. - Dangerous
Tool - A mock “dangerous” tool for testing hook-based interception.
- Deny
Guard - A guard that unconditionally denies all actions.
- Echo
Input - Input for
EchoTool: a single text field. - Echo
Output - Output from
EchoTool: the echoed text. - Echo
Tool - A simple tool that echoes its text input.
- Fail
Input - Input for
FailTool: an optional message. - Fail
Tool - A tool that always fails with an error.