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

  1. Context Inheritance: Tool Execution Context permissions MUST be <= Task Constraints. Elevation forbidden.
  2. Observation Integration: Result must be incorporated into subsequent reasoning
  3. Sandboxing: Tool execution must respect the capability boundary of its Sandbox — the boundary is what makes the permission ceiling enforceable rather than advisory
  4. Schema Conformance: Tool call must match declared function signature

Risks

Failure modes

  1. Hallucinated Tools

    Actor invokes a tool that doesn't exist.

  2. Argument Mismatch

    Tool call has wrong parameter types or missing required fields.

  3. 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

References

Context

Portable execution environment with inherited constraints

Task

The atomic unit of intent

Used by

Composes with

Mind

PolymorphicSolver

Solver implementing the five-surface contract (polymorphic across substrates)

Society

PromptChain

Sequential LLM calls with validation gates

Mind

ReAct

Interleaved thought-action-observation cycle

Society

ToolDiscovery

Discover and invoke external tools via structured capability manifests

Reference

Identity

Ref
ToolInvoke#1096
Sema ID
sema:ToolInvoke#mh:SHA-256:1096039316801cc8ef6e2855a6300574bb8596bb8e57c2764fd3bee741fa217e
Ring
0
Tier
2
Updated
2026-11-11
Supersedes
  • sema:ToolInvoke#mh:SHA-256:643c8651a44f1d33cb98580b8b456c5ec1cdb3b94f3d6ae30e3465fc0e6d45b2
  • sema:ToolInvoke#mh:SHA-256:cf0ae58828cde9f495b09af3e4519c3f05162066991d34d5f2505d13c32ba416
  • sema:ToolInvoke#mh:SHA-256:011f50770f2599f5017df648ad5920ddb732f7681a9a3b7576cdcf3798ce6baa
  • sema:ToolInvoke#mh:SHA-256:aafcc41012592030d7d1e83e91115fbaff1d238b5fc88827efda1649c7a7b502
  • sema:ToolInvoke#mh:SHA-256:75cc12a769885fb63993dbb0ffbf0b0878c7e780fe89d6a0d49bd0bc550e60b5