ToolInvoke
Execute external tool and observe result
Mechanism
The actor emits a structured tool call (function name + arguments), validated by InputGuard, execution is delegated to an external runtime, and the observation (result or error) is fed back into the actor's Context. This is the atomic unit of agent-environment interaction. The pattern enables capabilities beyond text generation: code execution, API calls, file operations, web search.
Invariants
- Context Inheritance: Tool Execution Context permissions MUST be <= Task Constraints. Elevation forbidden.
- Observation Integration: Result must be incorporated into subsequent reasoning
- Sandboxing: Tool execution must respect the capability boundary of its Sandbox — the boundary is what makes the permission ceiling enforceable rather than advisory
- Schema Conformance: Tool call must match declared function signature
Failure modes
- Hallucinated Tools: Actor invokes a tool that doesn't exist.
- Argument Mismatch: Tool call has wrong parameter types or missing required fields.
- Observation Blindness: Actor ignores or misinterprets tool output.
Caution
Tool results are untrusted input — text inside an observation can carry instructions that steer the agent; treat it as data, never as commands.
Where this came from
—
Builds on
- InputGuard composes_with
- Sandbox references
- Context references
- Task references
Used by
- PolymorphicSolver composes_with
- PromptChain composes_with
- ReAct composes_with
- ToolDiscovery composes_with
Related
Identity
- Ref:
ToolInvoke#1096 - Hash: sema:ToolInvoke#mh:SHA-256:1096039316801cc8ef6e2855a6300574bb8596bb8e57c2764fd3bee741fa217e
- Library: bootstrap 0.11.0, root a6a3d1ff0f98
- License: Not stated; check the repository