Expand description
Tool layer for the harness.
In the recursive architecture the Tool trait is the universal call
boundary that makes recursion uniform: a tool can be a plain function, but it
can equally be an entire other agent —
crate::harness::subagent::SubAgentTool implements Tool, so “a model
calling a model” is just “a model calling a tool”. Everything the agent loop
can invoke flows through this layer and its ToolRegistry.
See [types] for definitions. This module provides constructors and the
ToolRegistry logic for registering and looking up tools by name.
Structs§
- Schema
Cleanr - JSON Schema cleaner optimized for model tool-calling declarations.
- Tool
Access - Access requirements a tool declares before it can be exposed or run.
- Tool
Call - A request from the model to invoke a tool.
- Tool
Delta - An incremental progress update emitted while a tool runs (streaming).
- Tool
Display - Human-facing presentation metadata for a tool invocation.
- Tool
Execution Context - Live run context visible to a tool invoked by an agent loop.
- Tool
Policy - SDK-owned safety and runtime metadata attached to a
Tool. - Tool
Registry - A name-keyed registry of tools available to the harness.
- Tool
Result - The outcome of executing a
ToolCall. - Tool
Runtime - Runtime requirements a tool declares for safe execution.
- Tool
Schema - A model-visible declaration of a tool: its name, description, JSON-schema-compatible parameter shape, and preferred tool-call format.
- Tool
Side Effects - Declared side effects a tool may cause.
Enums§
- Cleaning
Strategy - Schema cleaning strategies for different LLM providers.
- Sandbox
Mode - How strictly a tool must be sandboxed when it executes.
- Tool
Format - The model-visible syntax a tool declaration prefers.
- Tool
Timeout - How the harness should bound a single tool invocation in wall-clock time.
- Workspace
Access - How a tool is allowed to reach the caller’s workspace / filesystem root.
Constants§
- GEMINI_
UNSUPPORTED_ KEYWORDS - Keywords that Gemini rejects for tool schemas.
Traits§
- Tool
- A tool the harness can invoke during an agent loop.
Functions§
- context_
detail_ from_ args - Extracts a compact human-facing detail from common tool argument keys.
- humanize_
tool_ name - Derives a title-cased human-readable label from a raw tool name.