Open History to see the last commit
1---
2id: AfterToolCallInfo
3title: AfterToolCallInfo
4---
5
6# Interface: AfterToolCallInfo
7
8Defined in: [packages/typescript/ai/src/activities/chat/middleware/types.ts:194](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/middleware/types.ts#L194)
9
10Outcome information provided to onAfterToolCall.
11
12## Properties
13
14### duration
15
16```ts
17duration: number;
18```
19
20Defined in: [packages/typescript/ai/src/activities/chat/middleware/types.ts:206](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/middleware/types.ts#L206)
21
22Duration of tool execution in milliseconds
23
24***
25
26### error?
27
28```ts
29optional error: unknown;
30```
31
32Defined in: [packages/typescript/ai/src/activities/chat/middleware/types.ts:209](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/middleware/types.ts#L209)
33
34***
35
36### ok
37
38```ts
39ok: boolean;
40```
41
42Defined in: [packages/typescript/ai/src/activities/chat/middleware/types.ts:204](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/middleware/types.ts#L204)
43
44Whether the execution succeeded
45
46***
47
48### result?
49
50```ts
51optional result: unknown;
52```
53
54Defined in: [packages/typescript/ai/src/activities/chat/middleware/types.ts:208](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/middleware/types.ts#L208)
55
56The result (if ok) or error (if not ok)
57
58***
59
60### tool
61
62```ts
63tool:
64 | Tool<SchemaInput, SchemaInput, string>
65 | undefined;
66```
67
68Defined in: [packages/typescript/ai/src/activities/chat/middleware/types.ts:198](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/middleware/types.ts#L198)
69
70The resolved tool definition
71
72***
73
74### toolCall
75
76```ts
77toolCall: ToolCall;
78```
79
80Defined in: [packages/typescript/ai/src/activities/chat/middleware/types.ts:196](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/middleware/types.ts#L196)
81
82The tool call that was executed
83
84***
85
86### toolCallId
87
88```ts
89toolCallId: string;
90```
91
92Defined in: [packages/typescript/ai/src/activities/chat/middleware/types.ts:202](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/middleware/types.ts#L202)
93
94ID of the tool call
95
96***
97
98### toolName
99
100```ts
101toolName: string;
102```
103
104Defined in: [packages/typescript/ai/src/activities/chat/middleware/types.ts:200](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/middleware/types.ts#L200)
105
106Name of the tool