---
url: 'https://adk.nht.io/api/@nhtio/adk/forge/classes/ToolCall.md'
description: 'An immutable, validated tool call record associated with a turn.'
---

# Class: ToolCall

Defined in: [lib/classes/tool\_call.ts:225](https://github.com/NHTIO/ADK/blob/v1.20260605.0/src/lib/classes/tool_call.ts#L225)

An immutable, validated tool call record associated with a turn.

## Remarks

Represents a completed tool invocation from the conversation history — `results`,
`completedAt`, `isComplete`, and `isError` are all present and required.
Temporal fields are normalised to Luxon `DateTime` instances at construction time.

## Constructors

### Constructor

```ts
new ToolCall(raw: RawToolCall): ToolCall;
```

Defined in: [lib/classes/tool\_call.ts:306](https://github.com/NHTIO/ADK/blob/v1.20260605.0/src/lib/classes/tool_call.ts#L306)

#### Parameters

| Parameter | Type                                          | Description                                                    |
| --------- | --------------------------------------------- | -------------------------------------------------------------- |
| `raw`     | [`RawToolCall`](../interfaces/RawToolCall.md) | The raw tool call input validated against `rawToolCallSchema`. |

#### Returns

`ToolCall`

#### Throws

[@nhtio/adk!E\_INVALID\_INITIAL\_TOOL\_CALL\_VALUE](../../exceptions/variables/E_INVALID_INITIAL_TOOL_CALL_VALUE.md) when `raw` does not satisfy the schema.

## Properties

| Property                                                  | Modifier   | Type                                                                                                               | Default value       | Description                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 | Defined in                                                                                                        |
| --------------------------------------------------------- | ---------- | ------------------------------------------------------------------------------------------------------------------ | ------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------- |
|  `args`                         | `readonly` | [`Record`](https://www.typescriptlang.org/docs/handbook/utility-types.html#recordkeys-type)<`string`, `unknown`> | `undefined`         | Arguments the model supplied for this tool call, always as a plain object.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  | [lib/classes/tool\_call.ts:253](https://github.com/NHTIO/ADK/blob/v1.20260605.0/src/lib/classes/tool_call.ts#L253) |
|  `checksum`                 | `readonly` | `string`                                                                                                           | `undefined`         | Integrity checksum over `tool` and `args`.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  | [lib/classes/tool\_call.ts:255](https://github.com/NHTIO/ADK/blob/v1.20260605.0/src/lib/classes/tool_call.ts#L255) |
|  `completedAt`           | `readonly` | `DateTime`                                                                                                         | `undefined`         | When the tool call completed.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               | [lib/classes/tool\_call.ts:287](https://github.com/NHTIO/ADK/blob/v1.20260605.0/src/lib/classes/tool_call.ts#L287) |
|  `createdAt`               | `readonly` | `DateTime`                                                                                                         | `undefined`         | When this tool call was first created.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      | [lib/classes/tool\_call.ts:283](https://github.com/NHTIO/ADK/blob/v1.20260605.0/src/lib/classes/tool_call.ts#L283) |
|  `fromArtifactTool` | `readonly` | `boolean`                                                                                                          | `undefined`         | `true` when this tool call originated from an [@nhtio/adk!ArtifactTool](ArtifactTool.md) invocation. Used by `SpooledArtifact.forgeTools(ctx)` to filter out forged-tool results from the `callId` enum it builds.                                                                                                                                                                                                                                                                                                                                                                                                                                          | [lib/classes/tool\_call.ts:276](https://github.com/NHTIO/ADK/blob/v1.20260605.0/src/lib/classes/tool_call.ts#L276) |
|  `id`                             | `readonly` | `string`                                                                                                           | `undefined`         | Stable unique identifier for this tool call; correlates the request with its result.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        | [lib/classes/tool\_call.ts:249](https://github.com/NHTIO/ADK/blob/v1.20260605.0/src/lib/classes/tool_call.ts#L249) |
|  `inline`                     | `readonly` | `boolean`                                                                                                          | `undefined`         | `true` (default) renders this tool call's result inline in the prompt; `false` instructs LLM adapters to surface the result as a handle reference. See [RawToolCall.inline](../interfaces/RawToolCall.md#property-inline).                                                                                                                                                                                                                                                                                                                                                                                                                                  | [lib/classes/tool\_call.ts:281](https://github.com/NHTIO/ADK/blob/v1.20260605.0/src/lib/classes/tool_call.ts#L281) |
|  `isComplete`             | `readonly` | `boolean`                                                                                                          | `undefined`         | `true` once the tool call has finished (successfully or not).                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               | [lib/classes/tool\_call.ts:257](https://github.com/NHTIO/ADK/blob/v1.20260605.0/src/lib/classes/tool_call.ts#L257) |
|  `isError`                   | `readonly` | `boolean`                                                                                                          | `undefined`         | `true` when the tool execution produced an error; inspect `results` for detail.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             | [lib/classes/tool\_call.ts:259](https://github.com/NHTIO/ADK/blob/v1.20260605.0/src/lib/classes/tool_call.ts#L259) |
|  `results`                   | `readonly` | [`ToolCallResults`](../../common/type-aliases/ToolCallResults.md)                                                  | `undefined`         | Result returned by the tool, or error detail when `isError` is `true`. **Remarks** One of three silos — see [ToolCallResults](../../common/type-aliases/ToolCallResults.md). [@nhtio/adk!SpooledArtifact](../../spooled_artifact/classes/SpooledArtifact.md) or `SpooledArtifact[]` for normal text-output [@nhtio/adk!Tool](Tool.md) calls; [@nhtio/adk!Media](../../common/classes/Media.md) or `Media[]` for tool calls whose handler returned binary modality output; [@nhtio/adk!Tokenizable](../../common/classes/Tokenizable.md) for [@nhtio/adk!ArtifactTool](ArtifactTool.md) calls (see [ToolCall.fromArtifactTool](#property-fromartifacttool)). | [lib/classes/tool\_call.ts:270](https://github.com/NHTIO/ADK/blob/v1.20260605.0/src/lib/classes/tool_call.ts#L270) |
|  `tool`                         | `readonly` | `string`                                                                                                           | `undefined`         | Name of the tool the model has requested.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   | [lib/classes/tool\_call.ts:251](https://github.com/NHTIO/ADK/blob/v1.20260605.0/src/lib/classes/tool_call.ts#L251) |
|  `updatedAt`               | `readonly` | `DateTime`                                                                                                         | `undefined`         | When this tool call was last modified.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      | [lib/classes/tool\_call.ts:285](https://github.com/NHTIO/ADK/blob/v1.20260605.0/src/lib/classes/tool_call.ts#L285) |
|  `schema`                     | `static`   | `ObjectSchema`<[`RawToolCall`](../interfaces/RawToolCall.md)>                                                    | `rawToolCallSchema` | Validator schema that accepts a [RawToolCall](../interfaces/RawToolCall.md) object. **Remarks** Reusable fragment for any schema that needs to validate or nest a tool call entry.                                                                                                                                                                                                                                                                                                                                                                                                                                                                          | [lib/classes/tool\_call.ts:232](https://github.com/NHTIO/ADK/blob/v1.20260605.0/src/lib/classes/tool_call.ts#L232) |

## Methods

### isToolCall()

```ts
static isToolCall(value: unknown): value is ToolCall;
```

Defined in: [lib/classes/tool\_call.ts:244](https://github.com/NHTIO/ADK/blob/v1.20260605.0/src/lib/classes/tool_call.ts#L244)

Returns `true` if `value` is a ToolCall instance.

#### Parameters

| Parameter | Type      | Description        |
| --------- | --------- | ------------------ |
| `value`   | `unknown` | The value to test. |

#### Returns

`value is ToolCall`

`true` when `value` is a ToolCall instance.

#### Remarks

Uses [@nhtio/adk!isInstanceOf](../../guards/functions/isInstanceOf.md) for cross-realm safety — `instanceof` would fail for instances
created in a different module copy or VM context.
