## 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


``` python
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](#captain_hook.ToolCallBase.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


``` python
ReadCall()
```


## BashCall


A Bash/Execute shell invocation.


Usage


``` python
BashCall()
```


#### Attributes

| Name | Description |
|----|----|
| [command_line](#captain_hook.BashCall.command_line) | The command parsed into a `~CommandLine`. |


##### command_line


The command parsed into a `~CommandLine`.


`command_line: `<a href="files-commands.html#captain_hook.CommandLine" class="gdls-link gdls-code"><code>CommandLine</code></a>


## EditCall


An Edit replacement of `old` with `new` in one file.


Usage


``` python
EditCall()
```


## MultiEditCall


A MultiEdit applying `edits` to one file, in order.


Usage


``` python
MultiEditCall()
```


## WriteCall


A Write/Create of a whole file.


Usage


``` python
WriteCall()
```


## NotebookEditCall


A NotebookEdit replacing a cell's source.


Usage


``` python
NotebookEditCall()
```


## GlobCall


A Glob file-pattern search.


Usage


``` python
GlobCall()
```


## GrepCall


A Grep content search.


Usage


``` python
GrepCall()
```


## SkillCall


A Skill invocation.


Usage


``` python
SkillCall()
```


## TaskCall


An Agent/Task subagent dispatch.


Usage


``` python
TaskCall()
```


## TaskCreateCall


A TaskCreate tracker entry.


Usage


``` python
TaskCreateCall()
```


## TaskUpdateCall


A TaskUpdate tracker change.


Usage


``` python
TaskUpdateCall()
```


## ExitPlanModeCall


An ExitPlanMode/ExitSpecMode plan submission.


Usage


``` python
ExitPlanModeCall()
```


## OtherCall


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


Usage


``` python
OtherCall()
```


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


#### Attributes

| Name | Description |
|----|----|
| [error](#captain_hook.OtherCall.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`
