Infrastructure · Primitives
ToolInvoke
Execute external tool and observe result
Definition
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
Risks
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.
Relationships
Builds on
Composes with
Input validation and sanitization
Used by
Composes with
Mind
Solver implementing the five-surface contract (polymorphic across substrates)
Society
Sequential LLM calls with validation gates
Mind
Interleaved thought-action-observation cycle
Society
Discover and invoke external tools via structured capability manifests
Reference
