Skip to content
Source
Sign inSign up
TanStack/ai
Open History to see the last commit

JSONSchema.md

387 lines7.7 KB

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