Expand description
Tool trait. All tools implement this single trait.
Re-exports§
pub use crate::context::config::PathStyle;pub use crate::permission::PermissionMode;
Structs§
- Call
Traits - What a tool says about one call: answered by
Tool::call_traits, which is handed the call’s input. - Disposer
- A handle that withdraws one registration.
- Entry
- A registered tool plus the id its
Disposerrefers to. - File
Change - One file a tool call wrote, as
tool_resultreports it to the host. - InMemory
Tool Registry - Layered
Tool Registry - A registry that layers one set of tools over another.
- McpMeta
- Progress
Sender - What a tool call reports progress through. The engine hands every call
one that reaches the session’s event stream as
AgentEvent::ToolProgress, rate-limited per call; reports after the call returns are dropped. - Progress
Update - One progress report of a running tool call.
progressandtotalare in whatever unit the tool counts (lines, bytes, steps); either may be absent. - Prompt
Context - Registration
Id - Identifies one registration, so it can be withdrawn without disturbing anything else that happens to share the tool’s name.
- Tool
Context - Tool
Result - Tool
Result Block - Tool
Spec - What a tool says about itself that holds for every call. Built with
ToolSpec::newand the setters:ToolSpec::new().read_only(true). - Turn
Scope - What belongs to the one turn a call is made in, and ends with it.
Enums§
- Diff
Omitted - FileOp
- Tool
Origin - Where a tool came from, for
crate::interface::model::ToolDef::source. - Tool
Result Content - Validation
Result
Constants§
- MAX_
IMAGE_ BYTES - Largest image, decoded, that goes to the model as one image block. The API refuses an image over 5 MB of base64 — 3.75 MB decoded — and the refused request would carry it again on every later turn; rounded down to leave room for the rest of the request.
Traits§
- Progress
Callback - Tool
- A tool the model can call.
- Tool
Registry
Functions§
- compact_
schema schemaas sent to the model: the same parameters, without what schema generators add for other readers — the root$schemaandtitle,"default": null, Rust integerformats, and per-variant descriptions on an enum of string constants (which becomes a plainenum).