Skip to main content

Function: resolveToolReplay()

resolveToolReplay(tool): ToolReplay

Defined in: packages/core/src/utils/tool-durability.ts:29

The tool's replay rule, from its declarations, first match wins:

  1. An explicit replay.
  2. requiresApproval or needsApproval set and not false: unsafe.
  3. MCP metadata.annotations.readOnlyHint === true: safe.
  4. MCP metadata.annotations.destructiveHint === true: unsafe.
  5. MCP metadata.annotations.idempotentHint === true: safe.
  6. A Processable tool: safe. Its child resumes from the journal.
  7. Anything else: unsafe.

Parameters​

tool​

unknown

Returns​

ToolReplay