Open History to see the last commit
1---
2id: ToolCallStartEvent
3title: ToolCallStartEvent
4---
5
6Defined in: [packages/ai/src/types.ts:1704](https://github.com/TanStack/ai/blob/main/packages/ai/src/types.ts#L1704)
7
8Emitted when a tool call starts.
9
10@ag-ui/core provides: `toolCallId`, `toolCallName`, `parentMessageId?`,
11`subagentRunId?`
12
13## Extends
14
15- `Omit`\<`AGUIToolCallStartEvent`, `"type"`\>
16
17## Properties
18
19### metadata?
20
21```ts
22optional metadata?: Record<string, any>;
23```
24
25Defined in: [packages/ai/src/types.ts:1712](https://github.com/TanStack/ai/blob/main/packages/ai/src/types.ts#L1712)
26
27Provider-specific metadata to carry into the ToolCall.
28
29#### Overrides
30
31```ts
32Omit.metadata
33```
34
35***
36
37### toolName?
38
39```ts
40optional toolName?: string;
41```
42
43Defined in: [packages/ai/src/types.ts:1710](https://github.com/TanStack/ai/blob/main/packages/ai/src/types.ts#L1710)
44
45Alias of `toolCallName`. Kept so existing stream readers still compile.
46
47***
48
49### type
50
51```ts
52type: "TOOL_CALL_START";
53```
54
55Defined in: [packages/ai/src/types.ts:1708](https://github.com/TanStack/ai/blob/main/packages/ai/src/types.ts#L1708)