Module tools
Expand description
Tool subsystem for agent-callable capabilities.
Re-exports§
pub use cron_add::CronAddTool;pub use cron_list::CronListTool;pub use cron_remove::CronRemoveTool;pub use cron_run::CronRunTool;pub use cron_runs::CronRunsTool;pub use cron_update::CronUpdateTool;pub use delegate::DelegateTool;pub use deliver_file::DeliverFileTool;pub use deliver_file::MAX_DELIVER_FILE_BYTES;pub use deliver_file::attachment_deliver_uri;pub use deliver_file::read_delivered_artifact_bounded;pub use file_read::FileReadTool;pub use model_switch::ModelSwitchTool;pub use read_skill::ReadSkillTool;pub use schedule::ScheduleTool;pub use security_ops::SecurityOpsTool;pub use send_message_to_peer::SendMessageToPeerTool;pub use shell::ShellTool;pub use skill_http::SkillHttpTool;pub use skill_tool::SkillBuiltinTool;pub use skill_tool::SkillShellTool;pub use sop_advance::SopAdvanceTool;pub use sop_approve::SopApproveTool;pub use sop_execute::SopExecuteTool;pub use sop_list::SopListTool;pub use sop_status::SopStatusTool;pub use sop_workshop::SopWorkshopTool;pub use spawn_subagent::SpawnSubagentTool;pub use todo_write::TodoWriteTool;pub use verifiable_intent::VerifiableIntentTool;
Modules§
- attribution
- cron_
add - cron_
list - cron_
remove - cron_
run - cron_
runs - cron_
update - delegate
- deliver_
file - file_
read - mcp_
context - Helpers that format MCP resource/prompt content for safe injection into the
model context. All server-origin content is wrapped with an
trust="untrusted-external"provenance marker and run through the existing secret-scrubbing/length-bounding used elsewhere for server-controlled text. - model_
switch - param_
options - Runtime resolution of tool parameter option domains.
- read_
skill - schedule
- scoped
ScopedToolRegistry- the one gated seam that mints the per-agent tool set.- security_
ops - Security operations tool for managed cybersecurity service (MCSS) workflows.
- send_
message_ to_ peer - Agent-loop tool that sends a message to a configured peer on a shared channel.
- shell
- skill_
http - HTTP-based tool derived from a skill’s
[[tools]]section. - skill_
manage - Skill management tools for the background review fork.
- skill_
tool - Shell-based tool derived from a skill’s
[[tools]]section. - sop_
advance - sop_
approve - sop_
execute - sop_
list - sop_
status - sop_
workshop - spawn_
subagent - Agent-loop tool that spawns an ephemeral SubAgent inheriting the
parent’s identity, security policy, and memory allowlist, runs a
focused prompt, and returns the response. Cron’s
JobType::Agentdispatch is the other SubAgent spawn site; both funnel through - todo_
write - verifiable_
intent - Verifiable Intent primitives exposed as a tool.
Structs§
- A2aCancel
Tool a2a_cancel— cancel an in-flight task.- A2aDiscover
Tool a2a_discover— list available peer agents and their capabilities.- A2aGet
Task Tool a2a_get_task— retrieve the state/artifacts of an in-flight task.- A2aHttp
Client - Outbound A2A HTTP client. Holds only the reqwest client and the live config
handle — no peer list copy. Constructed once, shared by all
a2a_*tools behind anArc. - A2aSend
Tool a2a_send— delegate a task to a peer agent (blocking on the result).- AcpSession
Read View - Agent-scoped access to the durable ACP session store.
- Activated
Tool Set - Per-conversation MCP activation and built-in schema selection.
- AllTools
Result - Bundled return values from tool registry construction. Named struct to avoid an ever-growing positional tuple that’s painful to destructure across many callers.
- ArcTool
Ref - Thin wrapper that makes an
Arc<dyn Tool>usable asBox<dyn Tool>. - AskUser
Tool - Agent-callable tool for sending a question to a user and waiting for their response.
- Backup
Tool - Shared-data backup tool: create, list, verify, and restore timestamped backups with SHA-256 manifest integrity checking.
- Calculator
Tool - Canvas
Store - Shared canvas store — holds all active canvases.
Thread-safe and cheaply cloneable (wraps
Arc). - Canvas
Tool CanvasTool— agent-callable tool for the Live Canvas (A2UI) system.- Channel
Room Tool - Cloud
OpsTool - Read-only cloud operations advisory tool.
Actions:
review_iac,assess_migration,cost_analysis,architecture_review. - Cloud
Patterns Tool - Tool that suggests cloud patterns given a workload description.
- Content
Search Tool - Data
Management Tool - Shared-data lifecycle tool: retention status, purge preview, and storage statistics. Confirmed purge is currently unavailable.
- Deferred
McpTool Set - Collection of all deferred MCP tool stubs discovered at startup.
Provides keyword search for
tool_search. - Discord
Search Tool - Search Discord message history stored in discord.db.
- Discovered
Cli - A discovered CLI tool with metadata.
- Escalate
ToHuman Tool - Agent-callable tool for escalating situations to a human operator with urgency routing.
- File
Download Ssrf Policy - File
Download Tool - File
Edit Tool - File
Upload Bundle Tool - File
Upload Tool - File
Write Tool - Write file contents with path sandboxing
- GitForge
Tool - Agent-callable tool exposing forge operations as a resource/action grid plus a raw catch-all, all over the git channel’s single forge transport.
- GitOperations
Tool - Git operations tool for structured repository management. Provides safe, parsed git operations with JSON output.
- Glob
Search Tool - Search for files by glob pattern within the workspace.
- Hardware
Board Info Tool - Tool: return full board info (chip, architecture, memory map) for agent/Telegram.
- Hardware
Memory MapTool - Tool: report hardware memory map for connected boards.
- Hardware
Memory Read Tool - Tool: read memory at address from connected Nucleo via probe-rs.
- Http
Request Tool - HTTP request tool for API interactions. Supports GET, POST, PUT, DELETE methods with configurable security.
- Image
Info Tool - Knowledge
Tool - Tool for managing a knowledge graph of patterns, decisions, lessons, and experts.
- LlmTask
Tool - Tool that runs a single prompt through an LLM and optionally validates the response against a JSON Schema. No tools are provided to the LLM — this is a pure text-in, text-out (or JSON-out) call.
- McpPrompts
Tool - Generic MCP prompt access tool. Routes through
McpRegistry. - McpRegistry
- Registry of all connected MCP servers, with a flat tool index.
- McpResources
Tool - Generic MCP resource access tool. Routes through
McpRegistry. - McpServer
- A live connection to one MCP server (any transport).
- McpTool
Wrapper - A zeroclaw
Toolbacked by an MCP server tool. Theprefixed_name(e.g.filesystem__read_file) is what the agent loop sees. The registry knows how to route it to the correct server. - Memory
Export Tool - Bulk-export memories as a JSON array for GDPR Art. 20 data portability.
- Memory
Forget Tool - Let the agent forget/delete a memory entry
- Memory
Purge Tool - Let the agent bulk-delete memories by namespace or session
- Memory
Recall Tool - Let the agent search its own memory
- Memory
Store Tool - Let the agent store memories — its own brain writes
- Model
Routing Config Tool - Path
Guarded Tool - Pipeline
Tool - The execute_pipeline tool that runs multi-step tool chains.
- Poll
Tool - Proxy
Config Tool - Rate
Limited Tool - Reaction
Tool - Agent-callable tool for adding or removing emoji reactions on messages.
- Schema
Cleanr - JSON Schema cleaner optimized for LLM tool calling.
- Send
ViaTool - Agent-callable tool for per-turn output routing and channel fanout.
- Session
Delete Tool - Permanently deletes a session and all its messages. The session key becomes invalid and must be recreated for new conversations.
- Session
Reset Tool - Resets a session by clearing its message history. The session key remains valid for new messages. Useful for cleaning up stale conversations without deleting the session entry itself.
- Sessions
Current Tool - Returns the session key and metadata for the currently active session.
Reads the session key from the
TOOL_LOOP_SESSION_KEYtask-local, which is scoped around gateway and channel agent turns. - Sessions
History Tool - Reads the message history of a specific session by ID.
- Sessions
List Tool - Lists active sessions with their channel, last activity time, and message count.
- Sessions
Send Tool - Deprecated compatibility tool that appends content to Chat session history.
- Tool
Output - Typed tool output. The LLM-facing string is derived from the structured
value exactly once, at construction, so the two can never drift.
Dereftostrkeeps every text read site working on the rendered form. - Tool
Result - Result of a tool execution
- Tool
Search Tool - Fetches full schemas for admitted deferred built-ins and MCP tools.
- Tool
Spec - WebFetch
Tool
Enums§
- Cleaning
Strategy - Schema cleaning strategies for different LLM model_providers.
Constants§
- ALLOWED_
CONTENT_ TYPES - Allowed content types for canvas frames via the REST API.
- BUILTIN_
TOOL_ INTEGRATIONS - MAX_
CONTENT_ SIZE - Maximum content size per canvas frame (256 KB).
- REENTRANT_
AGENT_ TOOLS - Re-entrant agent-spawning tools that must never be collapsed by the per-turn duplicate-call guard: launching several with the same prompt (redundancy, sampling, fan-out) is intentional, not an accidental repeat. Unioned with config-provided exemptions in the tool-call loop.
Statics§
Traits§
- GitCommand
Boundary - Runtime-owned boundary applied to write-classified Git subprocesses.
- Tool
Functions§
- all_
tools - Create full tool registry including memory tools and optional Composio
- all_
tools_ with_ runtime - Create the full tool registry on a dedicated builder thread.
- all_
tools_ with_ runtime_ and_ acp_ sessions - Create the full tool registry with an optional ACP session read view.
- all_
tools_ with_ runtime_ and_ execution_ capability - Create the managed registry while carrying the authority-backed execution capability into tools that can start work for another target alias.
- build_
deferred_ tools_ section - Build the
<available-deferred-tools>section for the system prompt. Lists tool names with a one-line summary each (the first non-empty line of the description, capped) so the LLM knows what is available without consuming context window on full schemas or full docstrings. Includes an instruction block that tells the LLM to calltool_searchto activate them. - build_
deferred_ tools_ section_ excluding - build_
deferred_ tools_ section_ filtered - build_
mcp_ capability_ tools - Build the two generic MCP capability tools (
mcp_resources,mcp_prompts), including each only when the accesspolicyadmits its name. ANonepolicy admits both. Returned asArc<dyn Tool>ready to register and/or expose to delegates. - collect_
mcp_ elevation_ arcs - composio_
tool_ available - Whether the Composio tool is registered for
config: compiled in and enabled. Prompt builders consult this so the model is never told about a tool this build does not carry. - default_
tools - Create the default tool registry
- default_
tools_ with_ runtime - Create the default tool registry with explicit runtime adapter.
- discover_
cli_ tools - Discover available CLI tools on the system. Scans PATH for known tools and returns metadata for each found.
- register_
skill_ tools_ with_ context_ and_ runtime - shell_
tool_ for_ runtime - Assemble a shell tool through the same runtime/sandbox ownership seam used by the production registry.
Type Aliases§
- Agent
Peer Group Resolver - Resolves the peer groups that include the active agent, read live from config
at call time so a config reload (membership /
external_peers/ channel alias /output_modality) takes effect without rebuilding the tool registry. - Channel
MapHandle - Shared handle giving tools late-bound access to the live channel map.
- Delegate
Parent Tools Handle - Shared handle to the delegate tool’s parent-tools list. Callers can push additional tools (e.g. MCP wrappers) after construction.
- Forwarded
Environment - One immutable, session-scoped client environment shared by shell execution and RPC admission. Only the handles are cloned; values are neither copied into admission state nor persisted. Eligibility is resolved from live grants.
- PerTool
Channel Handle - Turn
Routing Handle - Handle to one turn’s routing state. The orchestrator creates a fresh handle
before each
run_tool_call_loopcall, scopes it intoTURN_ROUTINGfor the duration of the loop, and reads it back after the loop completes.