Open History to see the last commit
1---
2id: ToolResultPart
3title: ToolResultPart
4---
5
6Defined in: packages/ai/src/types.ts:524
7
8## Properties
9
10### content
11
12```ts
13content:
14 | string
15 | ContentPart<unknown, unknown, unknown, unknown, unknown>[];
16```
17
18Defined in: packages/ai/src/types.ts:529
19
20***
21
22### createdAt?
23
24```ts
25optional createdAt?: Date;
26```
27
28Defined in: packages/ai/src/types.ts:535
29
30***
31
32### error?
33
34```ts
35optional error?: string;
36```
37
38Defined in: packages/ai/src/types.ts:533
39
40***
41
42### id?
43
44```ts
45optional id?: string;
46```
47
48Defined in: packages/ai/src/types.ts:526
49
50***
51
52### metadata?
53
54```ts
55optional metadata?: Record<string, unknown>;
56```
57
58Defined in: packages/ai/src/types.ts:534
59
60***
61
62### name?
63
64```ts
65optional name?: string;
66```
67
68Defined in: packages/ai/src/types.ts:527
69
70***
71
72### outcome?
73
74```ts
75optional outcome?: ToolResultOutcome;
76```
77
78Defined in: packages/ai/src/types.ts:532
79
80Set when the user or middleware cancelled or denied the tool call; state remains `error`.
81
82***
83
84### state
85
86```ts
87state: ToolResultState;
88```
89
90Defined in: packages/ai/src/types.ts:530
91
92***
93
94### toolCallId
95
96```ts
97toolCallId: string;
98```
99
100Defined in: packages/ai/src/types.ts:528
101
102***
103
104### type
105
106```ts
107type: "tool-result";
108```
109
110Defined in: packages/ai/src/types.ts:525