# ToolCallId
Source: https://docs.maelstrom-ai.co/dev/reference/protocol/variables/toolcallid/
Documentation revision: 89a8f5e9d10cedcf0b30376d7846113f06f26120
SDK manifests in this build: @maelstrom-co/react@0.2.1, @maelstrom-co/client@0.2.1, @maelstrom-co/connectors@0.2.1, @maelstrom-co/protocol@0.2.1, @maelstrom-co/engine@0.2.1
These docs follow this source revision. Manifest versions do not prove release compatibility; verify the installed package exports before using an API.

> **ToolCallId**: (`value`) => [`ToolCallId`](https://docs.maelstrom-ai.co/dev/reference/protocol/type-aliases/toolcallid/)

Defined in: [packages/protocol/src/lib/tool-call-id.ts:11](https://github.com/maelstrom-co/maelstrom/blob/89a8f5e9d10cedcf0b30376d7846113f06f26120/packages/protocol/src/lib/tool-call-id.ts#L11)

Creates or brands a ToolCallId. Smart constructor — the identifier `ToolCallId` refers to both the type (for type annotations) and the factory (for runtime creation), exploiting TypeScript’s separate type/value namespaces.

Unlike [SessionId](https://docs.maelstrom-ai.co/dev/reference/protocol/type-aliases/sessionid/), a ToolCallId always comes from the provider (it correlates an in-flight tool call with its result), so this constructor never generates one — it only brands an existing string.

## Parameters

### value

`string`

## Returns

[`ToolCallId`](https://docs.maelstrom-ai.co/dev/reference/protocol/type-aliases/toolcallid/)

## Example

```ts
const callId = ToolCallId(event.call_id); // brands a provider-assigned id
```
