Skip to main content

Module tools

Module tools 

Source
Expand description

Internal tool execution: the runtime is the single place internal tools run — for a turn worker’s ToolRequest (answered with ToolResult), for a workflow step (tool / memory.* / … kinds) and for A2A commands. Keeping them here means every state change is made by the state owner. Arguments are validated against the contract’s input schema before dispatch and results against the output schema after (schema failure ⇒ a tool error, never a panic). Some tools are deferred (sleep, subagent.run sync, subagent.await, await, think, context.compact, workflow.run wait, workflow.wait): the request is parked in pending and answered when its wait resolves. Mapped tools (overrides) run on an executor thread against the runtime’s own MCP connection.