Open History to see the last commit
1---
2id: UIResourceEvent
3title: UIResourceEvent
4---
5
6# Interface: UIResourceEvent
7
8Defined in: [packages/ai/src/types.ts:1414](https://github.com/TanStack/ai/blob/main/packages/ai/src/types.ts#L1414)
9
10Emitted when an MCP tool returns a ui:// resource (MCP Apps). Reconciled into
11 a UIResourcePart on the assistant UIMessage. Never enters model input.
12
13## Extends
14
15- [`CustomEvent`](CustomEvent.md)
16
17## Indexable
18
19```ts
20[k: string]: unknown
21```
22
23## Properties
24
25### model?
26
27```ts
28optional model: string;
29```
30
31Defined in: [packages/ai/src/types.ts:1339](https://github.com/TanStack/ai/blob/main/packages/ai/src/types.ts#L1339)
32
33Model identifier for multi-model support
34
35#### Inherited from
36
37[`CustomEvent`](CustomEvent.md).[`model`](CustomEvent.md#model)
38
39***
40
41### name
42
43```ts
44name: "ui-resource";
45```
46
47Defined in: [packages/ai/src/types.ts:1415](https://github.com/TanStack/ai/blob/main/packages/ai/src/types.ts#L1415)
48
49#### Overrides
50
51```ts
52CustomEvent.name
53```
54
55***
56
57### value
58
59```ts
60value: object;
61```
62
63Defined in: [packages/ai/src/types.ts:1416](https://github.com/TanStack/ai/blob/main/packages/ai/src/types.ts#L1416)
64
65#### meta?
66
67```ts
68optional meta: Record<string, unknown>;
69```
70
71#### resource
72
73```ts
74resource: object;
75```
76
77##### resource.blob?
78
79```ts
80optional blob: string;
81```
82
83##### resource.mimeType
84
85```ts
86mimeType: string;
87```
88
89##### resource.text?
90
91```ts
92optional text: string;
93```
94
95##### resource.uri
96
97```ts
98uri: string;
99```
100
101#### serverId?
102
103```ts
104optional serverId: string;
105```
106
107#### toolCallId
108
109```ts
110toolCallId: string;
111```
112
113#### toolName
114
115```ts
116toolName: string;
117```
118
119#### Overrides
120
121```ts
122CustomEvent.value
123```