tmcp 1.2.0 → 1.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,701 @@
1
+ /**
2
+ * Text provided to or from an LLM.
3
+ */
4
+ export const TextContentSchema: v.LooseObjectSchema<{
5
+ readonly type: v.LiteralSchema<"text", undefined>;
6
+ /**
7
+ * The text content of the message.
8
+ */
9
+ readonly text: v.StringSchema<undefined>;
10
+ /**
11
+ * See [MCP specification] for notes on _meta usage.
12
+ */
13
+ readonly _meta: v.OptionalSchema<v.LooseObjectSchema<{}, undefined>, undefined>;
14
+ }, undefined>;
15
+ /**
16
+ * An image provided to or from an LLM.
17
+ */
18
+ export const ImageContentSchema: v.LooseObjectSchema<{
19
+ readonly type: v.LiteralSchema<"image", undefined>;
20
+ /**
21
+ * The base64-encoded image data.
22
+ */
23
+ readonly data: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.Base64Action<string, undefined>]>;
24
+ /**
25
+ * The MIME type of the image. Different providers may support different image types.
26
+ */
27
+ readonly mimeType: v.StringSchema<undefined>;
28
+ /**
29
+ * See [MCP specification] for notes on _meta usage.
30
+ */
31
+ readonly _meta: v.OptionalSchema<v.LooseObjectSchema<{}, undefined>, undefined>;
32
+ }, undefined>;
33
+ /**
34
+ * An Audio provided to or from an LLM.
35
+ */
36
+ export const AudioContentSchema: v.LooseObjectSchema<{
37
+ readonly type: v.LiteralSchema<"audio", undefined>;
38
+ /**
39
+ * The base64-encoded audio data.
40
+ */
41
+ readonly data: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.Base64Action<string, undefined>]>;
42
+ /**
43
+ * The MIME type of the audio. Different providers may support different audio types.
44
+ */
45
+ readonly mimeType: v.StringSchema<undefined>;
46
+ /**
47
+ * See [MCP specification] for notes on _meta usage.
48
+ */
49
+ readonly _meta: v.OptionalSchema<v.LooseObjectSchema<{}, undefined>, undefined>;
50
+ }, undefined>;
51
+ /**
52
+ * The contents of a specific resource or sub-resource.
53
+ */
54
+ export const ResourceContentsSchema: v.LooseObjectSchema<{
55
+ /**
56
+ * The URI of this resource.
57
+ */
58
+ readonly uri: v.StringSchema<undefined>;
59
+ /**
60
+ * The MIME type of this resource, if known.
61
+ */
62
+ readonly mimeType: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
63
+ /**
64
+ * See [MCP specification] for notes on _meta usage.
65
+ */
66
+ readonly _meta: v.OptionalSchema<v.LooseObjectSchema<{}, undefined>, undefined>;
67
+ }, undefined>;
68
+ export const TextResourceContentsSchema: v.LooseObjectSchema<{
69
+ /**
70
+ * The URI of this resource.
71
+ */
72
+ readonly uri: v.StringSchema<undefined>;
73
+ /**
74
+ * The MIME type of this resource, if known.
75
+ */
76
+ readonly mimeType: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
77
+ /**
78
+ * The text of the item. This must only be set if the item can actually be represented as text (not binary data).
79
+ */
80
+ readonly text: v.StringSchema<undefined>;
81
+ /**
82
+ * See [MCP specification] for notes on _meta usage.
83
+ */
84
+ readonly _meta: v.OptionalSchema<v.LooseObjectSchema<{}, undefined>, undefined>;
85
+ }, undefined>;
86
+ export const BlobResourceContentsSchema: v.LooseObjectSchema<{
87
+ /**
88
+ * The URI of this resource.
89
+ */
90
+ readonly uri: v.StringSchema<undefined>;
91
+ /**
92
+ * The MIME type of this resource, if known.
93
+ */
94
+ readonly mimeType: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
95
+ /**
96
+ * A base64-encoded string representing the binary data of the item.
97
+ */
98
+ readonly blob: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.Base64Action<string, undefined>]>;
99
+ /**
100
+ * See [MCP specification] for notes on _meta usage.
101
+ */
102
+ readonly _meta: v.OptionalSchema<v.LooseObjectSchema<{}, undefined>, undefined>;
103
+ }, undefined>;
104
+ /**
105
+ * The contents of a resource, embedded into a prompt or tool call result.
106
+ */
107
+ export const EmbeddedResourceSchema: v.LooseObjectSchema<{
108
+ readonly type: v.LiteralSchema<"resource", undefined>;
109
+ readonly resource: v.UnionSchema<[v.LooseObjectSchema<{
110
+ /**
111
+ * The URI of this resource.
112
+ */
113
+ readonly uri: v.StringSchema<undefined>;
114
+ /**
115
+ * The MIME type of this resource, if known.
116
+ */
117
+ readonly mimeType: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
118
+ /**
119
+ * The text of the item. This must only be set if the item can actually be represented as text (not binary data).
120
+ */
121
+ readonly text: v.StringSchema<undefined>;
122
+ /**
123
+ * See [MCP specification] for notes on _meta usage.
124
+ */
125
+ readonly _meta: v.OptionalSchema<v.LooseObjectSchema<{}, undefined>, undefined>;
126
+ }, undefined>, v.LooseObjectSchema<{
127
+ /**
128
+ * The URI of this resource.
129
+ */
130
+ readonly uri: v.StringSchema<undefined>;
131
+ /**
132
+ * The MIME type of this resource, if known.
133
+ */
134
+ readonly mimeType: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
135
+ /**
136
+ * A base64-encoded string representing the binary data of the item.
137
+ */
138
+ readonly blob: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.Base64Action<string, undefined>]>;
139
+ /**
140
+ * See [MCP specification] for notes on _meta usage.
141
+ */
142
+ readonly _meta: v.OptionalSchema<v.LooseObjectSchema<{}, undefined>, undefined>;
143
+ }, undefined>], undefined>;
144
+ /**
145
+ * See [MCP specification] for notes on _meta usage.
146
+ */
147
+ readonly _meta: v.OptionalSchema<v.LooseObjectSchema<{}, undefined>, undefined>;
148
+ }, undefined>;
149
+ /**
150
+ * A resource that the server is capable of reading, included in a prompt or tool call result.
151
+ */
152
+ export const ResourceLinkSchema: v.LooseObjectSchema<{
153
+ /** Intended for programmatic or logical use, but used as a display name in past specs or fallback */
154
+ readonly name: v.StringSchema<undefined>;
155
+ readonly title: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
156
+ /**
157
+ * The URI of this resource.
158
+ */
159
+ readonly uri: v.StringSchema<undefined>;
160
+ /**
161
+ * A description of what this resource represents.
162
+ */
163
+ readonly description: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
164
+ /**
165
+ * The MIME type of this resource, if known.
166
+ */
167
+ readonly mimeType: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
168
+ readonly type: v.LiteralSchema<"resource_link", undefined>;
169
+ /**
170
+ * See [MCP specification] for notes on _meta usage.
171
+ */
172
+ readonly _meta: v.OptionalSchema<v.LooseObjectSchema<{}, undefined>, undefined>;
173
+ }, undefined>;
174
+ /**
175
+ * A content block that can be used in prompts and tool results.
176
+ */
177
+ export const ContentBlockSchema: v.UnionSchema<[v.LooseObjectSchema<{
178
+ readonly type: v.LiteralSchema<"text", undefined>;
179
+ /**
180
+ * The text content of the message.
181
+ */
182
+ readonly text: v.StringSchema<undefined>;
183
+ /**
184
+ * See [MCP specification] for notes on _meta usage.
185
+ */
186
+ readonly _meta: v.OptionalSchema<v.LooseObjectSchema<{}, undefined>, undefined>;
187
+ }, undefined>, v.LooseObjectSchema<{
188
+ readonly type: v.LiteralSchema<"image", undefined>;
189
+ /**
190
+ * The base64-encoded image data.
191
+ */
192
+ readonly data: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.Base64Action<string, undefined>]>;
193
+ /**
194
+ * The MIME type of the image. Different providers may support different image types.
195
+ */
196
+ readonly mimeType: v.StringSchema<undefined>;
197
+ /**
198
+ * See [MCP specification] for notes on _meta usage.
199
+ */
200
+ readonly _meta: v.OptionalSchema<v.LooseObjectSchema<{}, undefined>, undefined>;
201
+ }, undefined>, v.LooseObjectSchema<{
202
+ readonly type: v.LiteralSchema<"audio", undefined>;
203
+ /**
204
+ * The base64-encoded audio data.
205
+ */
206
+ readonly data: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.Base64Action<string, undefined>]>;
207
+ /**
208
+ * The MIME type of the audio. Different providers may support different audio types.
209
+ */
210
+ readonly mimeType: v.StringSchema<undefined>;
211
+ /**
212
+ * See [MCP specification] for notes on _meta usage.
213
+ */
214
+ readonly _meta: v.OptionalSchema<v.LooseObjectSchema<{}, undefined>, undefined>;
215
+ }, undefined>, v.LooseObjectSchema<{
216
+ /** Intended for programmatic or logical use, but used as a display name in past specs or fallback */
217
+ readonly name: v.StringSchema<undefined>;
218
+ readonly title: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
219
+ /**
220
+ * The URI of this resource.
221
+ */
222
+ readonly uri: v.StringSchema<undefined>;
223
+ /**
224
+ * A description of what this resource represents.
225
+ */
226
+ readonly description: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
227
+ /**
228
+ * The MIME type of this resource, if known.
229
+ */
230
+ readonly mimeType: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
231
+ readonly type: v.LiteralSchema<"resource_link", undefined>;
232
+ /**
233
+ * See [MCP specification] for notes on _meta usage.
234
+ */
235
+ readonly _meta: v.OptionalSchema<v.LooseObjectSchema<{}, undefined>, undefined>;
236
+ }, undefined>, v.LooseObjectSchema<{
237
+ readonly type: v.LiteralSchema<"resource", undefined>;
238
+ readonly resource: v.UnionSchema<[v.LooseObjectSchema<{
239
+ /**
240
+ * The URI of this resource.
241
+ */
242
+ readonly uri: v.StringSchema<undefined>;
243
+ /**
244
+ * The MIME type of this resource, if known.
245
+ */
246
+ readonly mimeType: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
247
+ /**
248
+ * The text of the item. This must only be set if the item can actually be represented as text (not binary data).
249
+ */
250
+ readonly text: v.StringSchema<undefined>;
251
+ /**
252
+ * See [MCP specification] for notes on _meta usage.
253
+ */
254
+ readonly _meta: v.OptionalSchema<v.LooseObjectSchema<{}, undefined>, undefined>;
255
+ }, undefined>, v.LooseObjectSchema<{
256
+ /**
257
+ * The URI of this resource.
258
+ */
259
+ readonly uri: v.StringSchema<undefined>;
260
+ /**
261
+ * The MIME type of this resource, if known.
262
+ */
263
+ readonly mimeType: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
264
+ /**
265
+ * A base64-encoded string representing the binary data of the item.
266
+ */
267
+ readonly blob: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.Base64Action<string, undefined>]>;
268
+ /**
269
+ * See [MCP specification] for notes on _meta usage.
270
+ */
271
+ readonly _meta: v.OptionalSchema<v.LooseObjectSchema<{}, undefined>, undefined>;
272
+ }, undefined>], undefined>;
273
+ /**
274
+ * See [MCP specification] for notes on _meta usage.
275
+ */
276
+ readonly _meta: v.OptionalSchema<v.LooseObjectSchema<{}, undefined>, undefined>;
277
+ }, undefined>], undefined>;
278
+ /**
279
+ * Describes a message returned as part of a prompt.
280
+ */
281
+ export const PromptMessageSchema: v.LooseObjectSchema<{
282
+ readonly role: v.PicklistSchema<["user", "assistant"], undefined>;
283
+ readonly content: v.UnionSchema<[v.LooseObjectSchema<{
284
+ readonly type: v.LiteralSchema<"text", undefined>;
285
+ /**
286
+ * The text content of the message.
287
+ */
288
+ readonly text: v.StringSchema<undefined>;
289
+ /**
290
+ * See [MCP specification] for notes on _meta usage.
291
+ */
292
+ readonly _meta: v.OptionalSchema<v.LooseObjectSchema<{}, undefined>, undefined>;
293
+ }, undefined>, v.LooseObjectSchema<{
294
+ readonly type: v.LiteralSchema<"image", undefined>;
295
+ /**
296
+ * The base64-encoded image data.
297
+ */
298
+ readonly data: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.Base64Action<string, undefined>]>;
299
+ /**
300
+ * The MIME type of the image. Different providers may support different image types.
301
+ */
302
+ readonly mimeType: v.StringSchema<undefined>;
303
+ /**
304
+ * See [MCP specification] for notes on _meta usage.
305
+ */
306
+ readonly _meta: v.OptionalSchema<v.LooseObjectSchema<{}, undefined>, undefined>;
307
+ }, undefined>, v.LooseObjectSchema<{
308
+ readonly type: v.LiteralSchema<"audio", undefined>;
309
+ /**
310
+ * The base64-encoded audio data.
311
+ */
312
+ readonly data: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.Base64Action<string, undefined>]>;
313
+ /**
314
+ * The MIME type of the audio. Different providers may support different audio types.
315
+ */
316
+ readonly mimeType: v.StringSchema<undefined>;
317
+ /**
318
+ * See [MCP specification] for notes on _meta usage.
319
+ */
320
+ readonly _meta: v.OptionalSchema<v.LooseObjectSchema<{}, undefined>, undefined>;
321
+ }, undefined>, v.LooseObjectSchema<{
322
+ /** Intended for programmatic or logical use, but used as a display name in past specs or fallback */
323
+ readonly name: v.StringSchema<undefined>;
324
+ readonly title: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
325
+ /**
326
+ * The URI of this resource.
327
+ */
328
+ readonly uri: v.StringSchema<undefined>;
329
+ /**
330
+ * A description of what this resource represents.
331
+ */
332
+ readonly description: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
333
+ /**
334
+ * The MIME type of this resource, if known.
335
+ */
336
+ readonly mimeType: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
337
+ readonly type: v.LiteralSchema<"resource_link", undefined>;
338
+ /**
339
+ * See [MCP specification] for notes on _meta usage.
340
+ */
341
+ readonly _meta: v.OptionalSchema<v.LooseObjectSchema<{}, undefined>, undefined>;
342
+ }, undefined>, v.LooseObjectSchema<{
343
+ readonly type: v.LiteralSchema<"resource", undefined>;
344
+ readonly resource: v.UnionSchema<[v.LooseObjectSchema<{
345
+ /**
346
+ * The URI of this resource.
347
+ */
348
+ readonly uri: v.StringSchema<undefined>;
349
+ /**
350
+ * The MIME type of this resource, if known.
351
+ */
352
+ readonly mimeType: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
353
+ /**
354
+ * The text of the item. This must only be set if the item can actually be represented as text (not binary data).
355
+ */
356
+ readonly text: v.StringSchema<undefined>;
357
+ /**
358
+ * See [MCP specification] for notes on _meta usage.
359
+ */
360
+ readonly _meta: v.OptionalSchema<v.LooseObjectSchema<{}, undefined>, undefined>;
361
+ }, undefined>, v.LooseObjectSchema<{
362
+ /**
363
+ * The URI of this resource.
364
+ */
365
+ readonly uri: v.StringSchema<undefined>;
366
+ /**
367
+ * The MIME type of this resource, if known.
368
+ */
369
+ readonly mimeType: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
370
+ /**
371
+ * A base64-encoded string representing the binary data of the item.
372
+ */
373
+ readonly blob: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.Base64Action<string, undefined>]>;
374
+ /**
375
+ * See [MCP specification] for notes on _meta usage.
376
+ */
377
+ readonly _meta: v.OptionalSchema<v.LooseObjectSchema<{}, undefined>, undefined>;
378
+ }, undefined>], undefined>;
379
+ /**
380
+ * See [MCP specification] for notes on _meta usage.
381
+ */
382
+ readonly _meta: v.OptionalSchema<v.LooseObjectSchema<{}, undefined>, undefined>;
383
+ }, undefined>], undefined>;
384
+ }, undefined>;
385
+ /**
386
+ * The server's response to a tool call.
387
+ */
388
+ export const CallToolResultSchema: v.LooseObjectSchema<{
389
+ /**
390
+ * A list of content objects that represent the result of the tool call.
391
+ */
392
+ readonly content: v.OptionalSchema<v.ArraySchema<v.UnionSchema<[v.LooseObjectSchema<{
393
+ readonly type: v.LiteralSchema<"text", undefined>;
394
+ /**
395
+ * The text content of the message.
396
+ */
397
+ readonly text: v.StringSchema<undefined>;
398
+ /**
399
+ * See [MCP specification] for notes on _meta usage.
400
+ */
401
+ readonly _meta: v.OptionalSchema<v.LooseObjectSchema<{}, undefined>, undefined>;
402
+ }, undefined>, v.LooseObjectSchema<{
403
+ readonly type: v.LiteralSchema<"image", undefined>;
404
+ /**
405
+ * The base64-encoded image data.
406
+ */
407
+ readonly data: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.Base64Action<string, undefined>]>;
408
+ /**
409
+ * The MIME type of the image. Different providers may support different image types.
410
+ */
411
+ readonly mimeType: v.StringSchema<undefined>;
412
+ /**
413
+ * See [MCP specification] for notes on _meta usage.
414
+ */
415
+ readonly _meta: v.OptionalSchema<v.LooseObjectSchema<{}, undefined>, undefined>;
416
+ }, undefined>, v.LooseObjectSchema<{
417
+ readonly type: v.LiteralSchema<"audio", undefined>;
418
+ /**
419
+ * The base64-encoded audio data.
420
+ */
421
+ readonly data: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.Base64Action<string, undefined>]>;
422
+ /**
423
+ * The MIME type of the audio. Different providers may support different audio types.
424
+ */
425
+ readonly mimeType: v.StringSchema<undefined>;
426
+ /**
427
+ * See [MCP specification] for notes on _meta usage.
428
+ */
429
+ readonly _meta: v.OptionalSchema<v.LooseObjectSchema<{}, undefined>, undefined>;
430
+ }, undefined>, v.LooseObjectSchema<{
431
+ /** Intended for programmatic or logical use, but used as a display name in past specs or fallback */
432
+ readonly name: v.StringSchema<undefined>;
433
+ readonly title: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
434
+ /**
435
+ * The URI of this resource.
436
+ */
437
+ readonly uri: v.StringSchema<undefined>;
438
+ /**
439
+ * A description of what this resource represents.
440
+ */
441
+ readonly description: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
442
+ /**
443
+ * The MIME type of this resource, if known.
444
+ */
445
+ readonly mimeType: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
446
+ readonly type: v.LiteralSchema<"resource_link", undefined>;
447
+ /**
448
+ * See [MCP specification] for notes on _meta usage.
449
+ */
450
+ readonly _meta: v.OptionalSchema<v.LooseObjectSchema<{}, undefined>, undefined>;
451
+ }, undefined>, v.LooseObjectSchema<{
452
+ readonly type: v.LiteralSchema<"resource", undefined>;
453
+ readonly resource: v.UnionSchema<[v.LooseObjectSchema<{
454
+ /**
455
+ * The URI of this resource.
456
+ */
457
+ readonly uri: v.StringSchema<undefined>;
458
+ /**
459
+ * The MIME type of this resource, if known.
460
+ */
461
+ readonly mimeType: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
462
+ /**
463
+ * The text of the item. This must only be set if the item can actually be represented as text (not binary data).
464
+ */
465
+ readonly text: v.StringSchema<undefined>;
466
+ /**
467
+ * See [MCP specification] for notes on _meta usage.
468
+ */
469
+ readonly _meta: v.OptionalSchema<v.LooseObjectSchema<{}, undefined>, undefined>;
470
+ }, undefined>, v.LooseObjectSchema<{
471
+ /**
472
+ * The URI of this resource.
473
+ */
474
+ readonly uri: v.StringSchema<undefined>;
475
+ /**
476
+ * The MIME type of this resource, if known.
477
+ */
478
+ readonly mimeType: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
479
+ /**
480
+ * A base64-encoded string representing the binary data of the item.
481
+ */
482
+ readonly blob: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.Base64Action<string, undefined>]>;
483
+ /**
484
+ * See [MCP specification] for notes on _meta usage.
485
+ */
486
+ readonly _meta: v.OptionalSchema<v.LooseObjectSchema<{}, undefined>, undefined>;
487
+ }, undefined>], undefined>;
488
+ /**
489
+ * See [MCP specification] for notes on _meta usage.
490
+ */
491
+ readonly _meta: v.OptionalSchema<v.LooseObjectSchema<{}, undefined>, undefined>;
492
+ }, undefined>], undefined>, undefined>, readonly []>;
493
+ /**
494
+ * An object containing structured tool output.
495
+ */
496
+ readonly structuredContent: v.OptionalSchema<v.LooseObjectSchema<{}, undefined>, undefined>;
497
+ /**
498
+ * Whether the tool call ended in an error.
499
+ */
500
+ readonly isError: v.OptionalSchema<v.BooleanSchema<undefined>, undefined>;
501
+ readonly _meta: v.OptionalSchema<v.LooseObjectSchema<{}, undefined>, undefined>;
502
+ }, undefined>;
503
+ /**
504
+ * The server's response to a resources/read request from the client.
505
+ */
506
+ export const ReadResourceResultSchema: v.LooseObjectSchema<{
507
+ readonly contents: v.ArraySchema<v.UnionSchema<[v.LooseObjectSchema<{
508
+ /**
509
+ * The URI of this resource.
510
+ */
511
+ readonly uri: v.StringSchema<undefined>;
512
+ /**
513
+ * The MIME type of this resource, if known.
514
+ */
515
+ readonly mimeType: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
516
+ /**
517
+ * The text of the item. This must only be set if the item can actually be represented as text (not binary data).
518
+ */
519
+ readonly text: v.StringSchema<undefined>;
520
+ /**
521
+ * See [MCP specification] for notes on _meta usage.
522
+ */
523
+ readonly _meta: v.OptionalSchema<v.LooseObjectSchema<{}, undefined>, undefined>;
524
+ }, undefined>, v.LooseObjectSchema<{
525
+ /**
526
+ * The URI of this resource.
527
+ */
528
+ readonly uri: v.StringSchema<undefined>;
529
+ /**
530
+ * The MIME type of this resource, if known.
531
+ */
532
+ readonly mimeType: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
533
+ /**
534
+ * A base64-encoded string representing the binary data of the item.
535
+ */
536
+ readonly blob: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.Base64Action<string, undefined>]>;
537
+ /**
538
+ * See [MCP specification] for notes on _meta usage.
539
+ */
540
+ readonly _meta: v.OptionalSchema<v.LooseObjectSchema<{}, undefined>, undefined>;
541
+ }, undefined>], undefined>, undefined>;
542
+ readonly _meta: v.OptionalSchema<v.LooseObjectSchema<{}, undefined>, undefined>;
543
+ }, undefined>;
544
+ /**
545
+ * The server's response to a prompts/get request from the client.
546
+ */
547
+ export const GetPromptResultSchema: v.LooseObjectSchema<{
548
+ /**
549
+ * An optional description for the prompt.
550
+ */
551
+ readonly description: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
552
+ readonly messages: v.ArraySchema<v.LooseObjectSchema<{
553
+ readonly role: v.PicklistSchema<["user", "assistant"], undefined>;
554
+ readonly content: v.UnionSchema<[v.LooseObjectSchema<{
555
+ readonly type: v.LiteralSchema<"text", undefined>;
556
+ /**
557
+ * The text content of the message.
558
+ */
559
+ readonly text: v.StringSchema<undefined>;
560
+ /**
561
+ * See [MCP specification] for notes on _meta usage.
562
+ */
563
+ readonly _meta: v.OptionalSchema<v.LooseObjectSchema<{}, undefined>, undefined>;
564
+ }, undefined>, v.LooseObjectSchema<{
565
+ readonly type: v.LiteralSchema<"image", undefined>;
566
+ /**
567
+ * The base64-encoded image data.
568
+ */
569
+ readonly data: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.Base64Action<string, undefined>]>;
570
+ /**
571
+ * The MIME type of the image. Different providers may support different image types.
572
+ */
573
+ readonly mimeType: v.StringSchema<undefined>;
574
+ /**
575
+ * See [MCP specification] for notes on _meta usage.
576
+ */
577
+ readonly _meta: v.OptionalSchema<v.LooseObjectSchema<{}, undefined>, undefined>;
578
+ }, undefined>, v.LooseObjectSchema<{
579
+ readonly type: v.LiteralSchema<"audio", undefined>;
580
+ /**
581
+ * The base64-encoded audio data.
582
+ */
583
+ readonly data: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.Base64Action<string, undefined>]>;
584
+ /**
585
+ * The MIME type of the audio. Different providers may support different audio types.
586
+ */
587
+ readonly mimeType: v.StringSchema<undefined>;
588
+ /**
589
+ * See [MCP specification] for notes on _meta usage.
590
+ */
591
+ readonly _meta: v.OptionalSchema<v.LooseObjectSchema<{}, undefined>, undefined>;
592
+ }, undefined>, v.LooseObjectSchema<{
593
+ /** Intended for programmatic or logical use, but used as a display name in past specs or fallback */
594
+ readonly name: v.StringSchema<undefined>;
595
+ readonly title: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
596
+ /**
597
+ * The URI of this resource.
598
+ */
599
+ readonly uri: v.StringSchema<undefined>;
600
+ /**
601
+ * A description of what this resource represents.
602
+ */
603
+ readonly description: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
604
+ /**
605
+ * The MIME type of this resource, if known.
606
+ */
607
+ readonly mimeType: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
608
+ readonly type: v.LiteralSchema<"resource_link", undefined>;
609
+ /**
610
+ * See [MCP specification] for notes on _meta usage.
611
+ */
612
+ readonly _meta: v.OptionalSchema<v.LooseObjectSchema<{}, undefined>, undefined>;
613
+ }, undefined>, v.LooseObjectSchema<{
614
+ readonly type: v.LiteralSchema<"resource", undefined>;
615
+ readonly resource: v.UnionSchema<[v.LooseObjectSchema<{
616
+ /**
617
+ * The URI of this resource.
618
+ */
619
+ readonly uri: v.StringSchema<undefined>;
620
+ /**
621
+ * The MIME type of this resource, if known.
622
+ */
623
+ readonly mimeType: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
624
+ /**
625
+ * The text of the item. This must only be set if the item can actually be represented as text (not binary data).
626
+ */
627
+ readonly text: v.StringSchema<undefined>;
628
+ /**
629
+ * See [MCP specification] for notes on _meta usage.
630
+ */
631
+ readonly _meta: v.OptionalSchema<v.LooseObjectSchema<{}, undefined>, undefined>;
632
+ }, undefined>, v.LooseObjectSchema<{
633
+ /**
634
+ * The URI of this resource.
635
+ */
636
+ readonly uri: v.StringSchema<undefined>;
637
+ /**
638
+ * The MIME type of this resource, if known.
639
+ */
640
+ readonly mimeType: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
641
+ /**
642
+ * A base64-encoded string representing the binary data of the item.
643
+ */
644
+ readonly blob: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.Base64Action<string, undefined>]>;
645
+ /**
646
+ * See [MCP specification] for notes on _meta usage.
647
+ */
648
+ readonly _meta: v.OptionalSchema<v.LooseObjectSchema<{}, undefined>, undefined>;
649
+ }, undefined>], undefined>;
650
+ /**
651
+ * See [MCP specification] for notes on _meta usage.
652
+ */
653
+ readonly _meta: v.OptionalSchema<v.LooseObjectSchema<{}, undefined>, undefined>;
654
+ }, undefined>], undefined>;
655
+ }, undefined>, undefined>;
656
+ readonly _meta: v.OptionalSchema<v.LooseObjectSchema<{}, undefined>, undefined>;
657
+ }, undefined>;
658
+ /**
659
+ * The server's response to a completion/complete request
660
+ */
661
+ export const CompleteResultSchema: v.LooseObjectSchema<{
662
+ readonly completion: v.LooseObjectSchema<{
663
+ /**
664
+ * An array of completion values. Must not exceed 100 items.
665
+ */
666
+ readonly values: v.SchemaWithPipe<readonly [v.ArraySchema<v.StringSchema<undefined>, undefined>, v.MaxLengthAction<string[], 100, undefined>]>;
667
+ /**
668
+ * The total number of completion options available. This can exceed the number of values actually sent in the response.
669
+ */
670
+ readonly total: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>]>, undefined>;
671
+ /**
672
+ * Indicates whether there are additional completion options beyond those provided in the current response, even if the exact total is unknown.
673
+ */
674
+ readonly hasMore: v.OptionalSchema<v.BooleanSchema<undefined>, undefined>;
675
+ }, undefined>;
676
+ readonly _meta: v.OptionalSchema<v.LooseObjectSchema<{}, undefined>, undefined>;
677
+ }, undefined>;
678
+ export const ClientCapabilitiesSchema: v.LooseObjectSchema<{
679
+ readonly roots: v.OptionalSchema<v.LooseObjectSchema<{
680
+ readonly listChanged: v.OptionalSchema<v.BooleanSchema<undefined>, undefined>;
681
+ }, undefined>, undefined>;
682
+ readonly sampling: v.OptionalSchema<v.LooseObjectSchema<{}, undefined>, undefined>;
683
+ readonly elicitation: v.OptionalSchema<v.LooseObjectSchema<{}, undefined>, undefined>;
684
+ }, undefined>;
685
+ export const InitializeRequestSchema: v.LooseObjectSchema<{
686
+ readonly protocolVersion: v.StringSchema<undefined>;
687
+ readonly capabilities: v.LooseObjectSchema<{
688
+ readonly roots: v.OptionalSchema<v.LooseObjectSchema<{
689
+ readonly listChanged: v.OptionalSchema<v.BooleanSchema<undefined>, undefined>;
690
+ }, undefined>, undefined>;
691
+ readonly sampling: v.OptionalSchema<v.LooseObjectSchema<{}, undefined>, undefined>;
692
+ readonly elicitation: v.OptionalSchema<v.LooseObjectSchema<{}, undefined>, undefined>;
693
+ }, undefined>;
694
+ }, undefined>;
695
+ export type ClientCapabilities = v.InferInput<typeof ClientCapabilitiesSchema>;
696
+ export type InitializeRequest = v.InferInput<typeof InitializeRequestSchema>;
697
+ export type CallToolResult = v.InferInput<typeof CallToolResultSchema>;
698
+ export type ReadResourceResult = v.InferInput<typeof ReadResourceResultSchema>;
699
+ export type GetPromptResult = v.InferInput<typeof GetPromptResultSchema>;
700
+ export type CompleteResult = v.InferInput<typeof CompleteResultSchema>;
701
+ import * as v from 'valibot';