Open History to see the last commit
1---
2id: JSONSchema
3title: JSONSchema
4---
5
6# Interface: JSONSchema
7
8Defined in: [types.ts:25](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L25)
9
10JSON Schema type for defining tool input/output schemas as raw JSON Schema objects.
11This allows tools to be defined without Zod when you have JSON Schema definitions available.
12
13## Indexable
14
15```ts
16[key: string]: any
17```
18
19## Properties
20
21### $defs?
22
23```ts
24optional $defs: Record<string, JSONSchema>;
25```
26
27Defined in: [types.ts:35](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L35)
28
29***
30
31### $ref?
32
33```ts
34optional $ref: string;
35```
36
37Defined in: [types.ts:34](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L34)
38
39***
40
41### additionalItems?
42
43```ts
44optional additionalItems: boolean | JSONSchema;
45```
46
47Defined in: [types.ts:56](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L56)
48
49***
50
51### additionalProperties?
52
53```ts
54optional additionalProperties: boolean | JSONSchema;
55```
56
57Defined in: [types.ts:55](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L55)
58
59***
60
61### allOf?
62
63```ts
64optional allOf: JSONSchema[];
65```
66
67Defined in: [types.ts:37](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L37)
68
69***
70
71### anyOf?
72
73```ts
74optional anyOf: JSONSchema[];
75```
76
77Defined in: [types.ts:38](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L38)
78
79***
80
81### const?
82
83```ts
84optional const: any;
85```
86
87Defined in: [types.ts:31](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L31)
88
89***
90
91### default?
92
93```ts
94optional default: any;
95```
96
97Defined in: [types.ts:33](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L33)
98
99***
100
101### definitions?
102
103```ts
104optional definitions: Record<string, JSONSchema>;
105```
106
107Defined in: [types.ts:36](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L36)
108
109***
110
111### description?
112
113```ts
114optional description: string;
115```
116
117Defined in: [types.ts:32](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L32)
118
119***
120
121### else?
122
123```ts
124optional else: JSONSchema;
125```
126
127Defined in: [types.ts:43](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L43)
128
129***
130
131### enum?
132
133```ts
134optional enum: any[];
135```
136
137Defined in: [types.ts:30](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L30)
138
139***
140
141### examples?
142
143```ts
144optional examples: any[];
145```
146
147Defined in: [types.ts:62](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L62)
148
149***
150
151### exclusiveMaximum?
152
153```ts
154optional exclusiveMaximum: number;
155```
156
157Defined in: [types.ts:47](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L47)
158
159***
160
161### exclusiveMinimum?
162
163```ts
164optional exclusiveMinimum: number;
165```
166
167Defined in: [types.ts:46](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L46)
168
169***
170
171### format?
172
173```ts
174optional format: string;
175```
176
177Defined in: [types.ts:51](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L51)
178
179***
180
181### if?
182
183```ts
184optional if: JSONSchema;
185```
186
187Defined in: [types.ts:41](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L41)
188
189***
190
191### items?
192
193```ts
194optional items: JSONSchema | JSONSchema[];
195```
196
197Defined in: [types.ts:28](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L28)
198
199***
200
201### maximum?
202
203```ts
204optional maximum: number;
205```
206
207Defined in: [types.ts:45](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L45)
208
209***
210
211### maxItems?
212
213```ts
214optional maxItems: number;
215```
216
217Defined in: [types.ts:53](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L53)
218
219***
220
221### maxLength?
222
223```ts
224optional maxLength: number;
225```
226
227Defined in: [types.ts:49](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L49)
228
229***
230
231### maxProperties?
232
233```ts
234optional maxProperties: number;
235```
236
237Defined in: [types.ts:60](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L60)
238
239***
240
241### minimum?
242
243```ts
244optional minimum: number;
245```
246
247Defined in: [types.ts:44](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L44)
248
249***
250
251### minItems?
252
253```ts
254optional minItems: number;
255```
256
257Defined in: [types.ts:52](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L52)
258
259***
260
261### minLength?
262
263```ts
264optional minLength: number;
265```
266
267Defined in: [types.ts:48](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L48)
268
269***
270
271### minProperties?
272
273```ts
274optional minProperties: number;
275```
276
277Defined in: [types.ts:59](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L59)
278
279***
280
281### not?
282
283```ts
284optional not: JSONSchema;
285```
286
287Defined in: [types.ts:40](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L40)
288
289***
290
291### oneOf?
292
293```ts
294optional oneOf: JSONSchema[];
295```
296
297Defined in: [types.ts:39](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L39)
298
299***
300
301### pattern?
302
303```ts
304optional pattern: string;
305```
306
307Defined in: [types.ts:50](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L50)
308
309***
310
311### patternProperties?
312
313```ts
314optional patternProperties: Record<string, JSONSchema>;
315```
316
317Defined in: [types.ts:57](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L57)
318
319***
320
321### properties?
322
323```ts
324optional properties: Record<string, JSONSchema>;
325```
326
327Defined in: [types.ts:27](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L27)
328
329***
330
331### propertyNames?
332
333```ts
334optional propertyNames: JSONSchema;
335```
336
337Defined in: [types.ts:58](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L58)
338
339***
340
341### required?
342
343```ts
344optional required: string[];
345```
346
347Defined in: [types.ts:29](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L29)
348
349***
350
351### then?
352
353```ts
354optional then: JSONSchema;
355```
356
357Defined in: [types.ts:42](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L42)
358
359***
360
361### title?
362
363```ts
364optional title: string;
365```
366
367Defined in: [types.ts:61](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L61)
368
369***
370
371### type?
372
373```ts
374optional type: string | string[];
375```
376
377Defined in: [types.ts:26](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L26)
378
379***
380
381### uniqueItems?
382
383```ts
384optional uniqueItems: boolean;
385```
386
387Defined in: [types.ts:54](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L54)