Tool Calls

ToolCall

ToolCall=(
    BashCall
    | EditCall
    | MultiEditCall
    | WriteCall
    | ReadCall
    | NotebookEditCall
    | GrepCall
    | GlobCall
    | TaskCall
    | WorkflowCall
    | SkillCall
    | TaskCreateCall
    | TaskUpdateCall
    | ExitPlanModeCall
    | CodeModeCall
    | ApplyPatchCall
    | UpdatePlanCall
    | WriteStdinCall
    | SpanEditCall
    | OtherCall
)

ToolCallBase

Common shape of every typed tool call.

Usage

ToolCallBase()

Attributes

name: builtins.str

The tool name exactly as invoked (aliases are not normalized — the digest must match what the hook saw).

raw: collections.abc.Mapping[str, Any] | str | None
The verbatim input value — a mapping for structured calls, a plain string for Codex calls, or None when absent. The only digest substrate.

Attributes

Name Description
digest The cross-language content digest of this call.
digest

The cross-language content digest of this call.

digest: ids.ToolDigest

ReadCall

A Read of a file, optionally windowed.

Usage

ReadCall()

BashCall

A Bash/Execute shell invocation.

Usage

BashCall()

Attributes

Name Description
command_line The command parsed into a ~CommandLine.
command_line

The command parsed into a ~CommandLine.

command_line: CommandLine

EditCall

An Edit replacement of old with new in one file.

Usage

EditCall()

MultiEditCall

A MultiEdit applying edits to one file, in order.

Usage

MultiEditCall()

WriteCall

A Write/Create of a whole file.

Usage

WriteCall()

NotebookEditCall

A NotebookEdit replacing a cell’s source.

Usage

NotebookEditCall()

GlobCall

A Glob file-pattern search.

Usage

GlobCall()

GrepCall

A Grep content search.

Usage

GrepCall()

SkillCall

A Skill invocation.

Usage

SkillCall()

TaskCall

An Agent/Task subagent dispatch.

Usage

TaskCall()

TaskCreateCall

A TaskCreate tracker entry.

Usage

TaskCreateCall()

TaskUpdateCall

A TaskUpdate tracker change.

Usage

TaskUpdateCall()

ExitPlanModeCall

An ExitPlanMode/ExitSpecMode plan submission.

Usage

ExitPlanModeCall()

OtherCall

A tool the platform does not type: unknown names, MCP tools, and — under

Usage

OtherCall()

on_error='other' — known tools whose input failed to parse.

Attributes

Name Description
error The strict-parse failure this call degraded from; None when the payload was well-formed but the tool has no typed model.
error

The strict-parse failure this call degraded from; None when the payload was well-formed but the tool has no typed model.

error: builtins.str | None