tmcp 1.8.0 → 1.8.2

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.
@@ -1,4319 +0,0 @@
1
- export const LATEST_PROTOCOL_VERSION: "2025-06-18";
2
- export const DEFAULT_NEGOTIATED_PROTOCOL_VERSION: "2025-03-26";
3
- export const SUPPORTED_PROTOCOL_VERSIONS: string[];
4
- export const JSONRPC_VERSION: "2.0";
5
- export class McpError extends Error {
6
- /**
7
- * @param {number} code
8
- * @param {string} message
9
- */
10
- constructor(code: number, message: string);
11
- }
12
- /**
13
- * A progress token, used to associate progress notifications with the original request.
14
- */
15
- export const ProgressTokenSchema: v.UnionSchema<[v.StringSchema<undefined>, v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>]>], undefined>;
16
- /**
17
- * An opaque token used to represent a cursor for pagination.
18
- */
19
- export const CursorSchema: v.StringSchema<undefined>;
20
- export const RequestSchema: v.ObjectSchema<{
21
- readonly method: v.StringSchema<undefined>;
22
- readonly params: v.OptionalSchema<v.LooseObjectSchema<{
23
- readonly _meta: v.OptionalSchema<v.LooseObjectSchema<{
24
- /**
25
- * If specified, the caller is requesting out-of-band progress notifications for this request (as represented by notifications/progress). The value of this parameter is an opaque token that will be attached to any subsequent notifications. The receiver is not obligated to provide these notifications.
26
- */
27
- readonly progressToken: v.OptionalSchema<v.UnionSchema<[v.StringSchema<undefined>, v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>]>], undefined>, undefined>;
28
- }, undefined>, undefined>;
29
- }, undefined>, undefined>;
30
- }, undefined>;
31
- export const NotificationSchema: v.ObjectSchema<{
32
- readonly method: v.StringSchema<undefined>;
33
- readonly params: v.OptionalSchema<v.LooseObjectSchema<{
34
- /**
35
- * See [MCP specification](https://github.com/modelcontextprotocol/modelcontextprotocol/blob/47339c03c143bb4ec01a26e721a1b8fe66634ebe/docs/specification/draft/basic/index.mdx#general-fields)
36
- * for notes on _meta usage.
37
- */
38
- readonly _meta: v.OptionalSchema<v.LooseObjectSchema<{}, undefined>, undefined>;
39
- }, undefined>, undefined>;
40
- }, undefined>;
41
- export const ResultSchema: v.ObjectSchema<{
42
- /**
43
- * See [MCP specification](https://github.com/modelcontextprotocol/modelcontextprotocol/blob/47339c03c143bb4ec01a26e721a1b8fe66634ebe/docs/specification/draft/basic/index.mdx#general-fields)
44
- * for notes on _meta usage.
45
- */
46
- readonly _meta: v.OptionalSchema<v.LooseObjectSchema<{}, undefined>, undefined>;
47
- }, undefined>;
48
- /**
49
- * A uniquely identifying ID for a request in JSON-RPC.
50
- */
51
- export const RequestIdSchema: v.UnionSchema<[v.StringSchema<undefined>, v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>]>], undefined>;
52
- /**
53
- * A request that expects a response.
54
- */
55
- export const JSONRPCRequestSchema: v.ObjectSchema<{
56
- readonly method: v.StringSchema<undefined>;
57
- readonly params: v.OptionalSchema<v.LooseObjectSchema<{
58
- readonly _meta: v.OptionalSchema<v.LooseObjectSchema<{
59
- /**
60
- * If specified, the caller is requesting out-of-band progress notifications for this request (as represented by notifications/progress). The value of this parameter is an opaque token that will be attached to any subsequent notifications. The receiver is not obligated to provide these notifications.
61
- */
62
- readonly progressToken: v.OptionalSchema<v.UnionSchema<[v.StringSchema<undefined>, v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>]>], undefined>, undefined>;
63
- }, undefined>, undefined>;
64
- }, undefined>, undefined>;
65
- readonly jsonrpc: v.LiteralSchema<"2.0", undefined>;
66
- readonly id: v.UnionSchema<[v.StringSchema<undefined>, v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>]>], undefined>;
67
- }, undefined>;
68
- /**
69
- * A notification which does not expect a response.
70
- */
71
- export const JSONRPCNotificationSchema: v.ObjectSchema<{
72
- readonly method: v.StringSchema<undefined>;
73
- readonly params: v.OptionalSchema<v.LooseObjectSchema<{
74
- /**
75
- * See [MCP specification](https://github.com/modelcontextprotocol/modelcontextprotocol/blob/47339c03c143bb4ec01a26e721a1b8fe66634ebe/docs/specification/draft/basic/index.mdx#general-fields)
76
- * for notes on _meta usage.
77
- */
78
- readonly _meta: v.OptionalSchema<v.LooseObjectSchema<{}, undefined>, undefined>;
79
- }, undefined>, undefined>;
80
- readonly jsonrpc: v.LiteralSchema<"2.0", undefined>;
81
- }, undefined>;
82
- /**
83
- * A successful (non-error) response to a request.
84
- */
85
- export const JSONRPCResponseSchema: v.StrictObjectSchema<{
86
- readonly jsonrpc: v.LiteralSchema<"2.0", undefined>;
87
- readonly id: v.UnionSchema<[v.StringSchema<undefined>, v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>]>], undefined>;
88
- readonly result: v.ObjectSchema<{
89
- /**
90
- * See [MCP specification](https://github.com/modelcontextprotocol/modelcontextprotocol/blob/47339c03c143bb4ec01a26e721a1b8fe66634ebe/docs/specification/draft/basic/index.mdx#general-fields)
91
- * for notes on _meta usage.
92
- */
93
- readonly _meta: v.OptionalSchema<v.LooseObjectSchema<{}, undefined>, undefined>;
94
- }, undefined>;
95
- }, undefined>;
96
- /**
97
- * A response to a request that indicates an error occurred.
98
- */
99
- export const JSONRPCErrorSchema: v.StrictObjectSchema<{
100
- readonly jsonrpc: v.LiteralSchema<"2.0", undefined>;
101
- readonly id: v.UnionSchema<[v.StringSchema<undefined>, v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>]>], undefined>;
102
- readonly error: v.ObjectSchema<{
103
- /**
104
- * The error type that occurred.
105
- */
106
- readonly code: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>]>;
107
- /**
108
- * A short description of the error. The message SHOULD be limited to a concise single sentence.
109
- */
110
- readonly message: v.StringSchema<undefined>;
111
- /**
112
- * Additional information about the error. The value of this member is defined by the sender (e.g. detailed error information, nested errors etc.).
113
- */
114
- readonly data: v.OptionalSchema<v.UnknownSchema, undefined>;
115
- }, undefined>;
116
- }, undefined>;
117
- export const JSONRPCMessageSchema: v.UnionSchema<[v.ObjectSchema<{
118
- readonly method: v.StringSchema<undefined>;
119
- readonly params: v.OptionalSchema<v.LooseObjectSchema<{
120
- readonly _meta: v.OptionalSchema<v.LooseObjectSchema<{
121
- /**
122
- * If specified, the caller is requesting out-of-band progress notifications for this request (as represented by notifications/progress). The value of this parameter is an opaque token that will be attached to any subsequent notifications. The receiver is not obligated to provide these notifications.
123
- */
124
- readonly progressToken: v.OptionalSchema<v.UnionSchema<[v.StringSchema<undefined>, v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>]>], undefined>, undefined>;
125
- }, undefined>, undefined>;
126
- }, undefined>, undefined>;
127
- readonly jsonrpc: v.LiteralSchema<"2.0", undefined>;
128
- readonly id: v.UnionSchema<[v.StringSchema<undefined>, v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>]>], undefined>;
129
- }, undefined>, v.ObjectSchema<{
130
- readonly method: v.StringSchema<undefined>;
131
- readonly params: v.OptionalSchema<v.LooseObjectSchema<{
132
- /**
133
- * See [MCP specification](https://github.com/modelcontextprotocol/modelcontextprotocol/blob/47339c03c143bb4ec01a26e721a1b8fe66634ebe/docs/specification/draft/basic/index.mdx#general-fields)
134
- * for notes on _meta usage.
135
- */
136
- readonly _meta: v.OptionalSchema<v.LooseObjectSchema<{}, undefined>, undefined>;
137
- }, undefined>, undefined>;
138
- readonly jsonrpc: v.LiteralSchema<"2.0", undefined>;
139
- }, undefined>, v.StrictObjectSchema<{
140
- readonly jsonrpc: v.LiteralSchema<"2.0", undefined>;
141
- readonly id: v.UnionSchema<[v.StringSchema<undefined>, v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>]>], undefined>;
142
- readonly result: v.ObjectSchema<{
143
- /**
144
- * See [MCP specification](https://github.com/modelcontextprotocol/modelcontextprotocol/blob/47339c03c143bb4ec01a26e721a1b8fe66634ebe/docs/specification/draft/basic/index.mdx#general-fields)
145
- * for notes on _meta usage.
146
- */
147
- readonly _meta: v.OptionalSchema<v.LooseObjectSchema<{}, undefined>, undefined>;
148
- }, undefined>;
149
- }, undefined>, v.StrictObjectSchema<{
150
- readonly jsonrpc: v.LiteralSchema<"2.0", undefined>;
151
- readonly id: v.UnionSchema<[v.StringSchema<undefined>, v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>]>], undefined>;
152
- readonly error: v.ObjectSchema<{
153
- /**
154
- * The error type that occurred.
155
- */
156
- readonly code: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>]>;
157
- /**
158
- * A short description of the error. The message SHOULD be limited to a concise single sentence.
159
- */
160
- readonly message: v.StringSchema<undefined>;
161
- /**
162
- * Additional information about the error. The value of this member is defined by the sender (e.g. detailed error information, nested errors etc.).
163
- */
164
- readonly data: v.OptionalSchema<v.UnknownSchema, undefined>;
165
- }, undefined>;
166
- }, undefined>], undefined>;
167
- /**
168
- * A response that indicates success but carries no data.
169
- */
170
- export const EmptyResultSchema: v.StrictObjectSchema<{
171
- /**
172
- * See [MCP specification](https://github.com/modelcontextprotocol/modelcontextprotocol/blob/47339c03c143bb4ec01a26e721a1b8fe66634ebe/docs/specification/draft/basic/index.mdx#general-fields)
173
- * for notes on _meta usage.
174
- */
175
- readonly _meta: v.OptionalSchema<v.LooseObjectSchema<{}, undefined>, undefined>;
176
- }, undefined>;
177
- /**
178
- * This notification can be sent by either side to indicate that it is cancelling a previously-issued request.
179
- *
180
- * The request SHOULD still be in-flight, but due to communication latency, it is always possible that this notification MAY arrive after the request has already finished.
181
- *
182
- * This notification indicates that the result will be unused, so any associated processing SHOULD cease.
183
- *
184
- * A client MUST NOT attempt to cancel its `initialize` request.
185
- */
186
- export const CancelledNotificationSchema: v.ObjectSchema<{
187
- readonly method: v.LiteralSchema<"notifications/cancelled", undefined>;
188
- readonly params: v.ObjectSchema<{
189
- /**
190
- * The ID of the request to cancel.
191
- *
192
- * This MUST correspond to the ID of a request previously issued in the same direction.
193
- */
194
- readonly requestId: v.UnionSchema<[v.StringSchema<undefined>, v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>]>], undefined>;
195
- /**
196
- * An optional string describing the reason for the cancellation. This MAY be logged or presented to the user.
197
- */
198
- readonly reason: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
199
- /**
200
- * See [MCP specification](https://github.com/modelcontextprotocol/modelcontextprotocol/blob/47339c03c143bb4ec01a26e721a1b8fe66634ebe/docs/specification/draft/basic/index.mdx#general-fields)
201
- * for notes on _meta usage.
202
- */
203
- readonly _meta: v.OptionalSchema<v.LooseObjectSchema<{}, undefined>, undefined>;
204
- }, undefined>;
205
- }, undefined>;
206
- /**
207
- * Base metadata interface for common properties across resources, tools, prompts, and implementations.
208
- */
209
- export const BaseMetadataSchema: v.ObjectSchema<{
210
- /** Intended for programmatic or logical use, but used as a display name in past specs or fallback */
211
- readonly name: v.StringSchema<undefined>;
212
- /**
213
- * Intended for UI and end-user contexts — optimized to be human-readable and easily understood,
214
- * even by those unfamiliar with domain-specific terminology.
215
- *
216
- * If not provided, the name should be used for display (except for Tool,
217
- * where `annotations.title` should be given precedence over using `name`,
218
- * if present).
219
- */
220
- readonly title: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
221
- }, undefined>;
222
- /**
223
- * Describes the name and version of an MCP implementation.
224
- */
225
- export const ImplementationSchema: v.ObjectSchema<{
226
- readonly version: v.StringSchema<undefined>;
227
- /** Intended for programmatic or logical use, but used as a display name in past specs or fallback */
228
- readonly name: v.StringSchema<undefined>;
229
- /**
230
- * Intended for UI and end-user contexts — optimized to be human-readable and easily understood,
231
- * even by those unfamiliar with domain-specific terminology.
232
- *
233
- * If not provided, the name should be used for display (except for Tool,
234
- * where `annotations.title` should be given precedence over using `name`,
235
- * if present).
236
- */
237
- readonly title: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
238
- }, undefined>;
239
- /**
240
- * Capabilities a client may support. Known capabilities are defined here, in this schema, but this is not a closed set: any client can define its own, additional capabilities.
241
- */
242
- export const ClientCapabilitiesSchema: v.ObjectSchema<{
243
- /**
244
- * Experimental, non-standard capabilities that the client supports.
245
- */
246
- readonly experimental: v.OptionalSchema<v.ObjectSchema<{}, undefined>, undefined>;
247
- /**
248
- * Present if the client supports sampling from an LLM.
249
- */
250
- readonly sampling: v.OptionalSchema<v.ObjectSchema<{}, undefined>, undefined>;
251
- /**
252
- * Present if the client supports eliciting user input.
253
- */
254
- readonly elicitation: v.OptionalSchema<v.ObjectSchema<{}, undefined>, undefined>;
255
- /**
256
- * Present if the client supports listing roots.
257
- */
258
- readonly roots: v.OptionalSchema<v.ObjectSchema<{
259
- /**
260
- * Whether the client supports issuing notifications for changes to the roots list.
261
- */
262
- readonly listChanged: v.OptionalSchema<v.BooleanSchema<undefined>, undefined>;
263
- }, undefined>, undefined>;
264
- }, undefined>;
265
- export const InitializeRequestParamsSchema: v.ObjectSchema<{
266
- /**
267
- * The latest version of the Model Context Protocol that the client supports. The client MAY decide to support older versions as well.
268
- */
269
- readonly protocolVersion: v.StringSchema<undefined>;
270
- readonly capabilities: v.ObjectSchema<{
271
- /**
272
- * Experimental, non-standard capabilities that the client supports.
273
- */
274
- readonly experimental: v.OptionalSchema<v.ObjectSchema<{}, undefined>, undefined>;
275
- /**
276
- * Present if the client supports sampling from an LLM.
277
- */
278
- readonly sampling: v.OptionalSchema<v.ObjectSchema<{}, undefined>, undefined>;
279
- /**
280
- * Present if the client supports eliciting user input.
281
- */
282
- readonly elicitation: v.OptionalSchema<v.ObjectSchema<{}, undefined>, undefined>;
283
- /**
284
- * Present if the client supports listing roots.
285
- */
286
- readonly roots: v.OptionalSchema<v.ObjectSchema<{
287
- /**
288
- * Whether the client supports issuing notifications for changes to the roots list.
289
- */
290
- readonly listChanged: v.OptionalSchema<v.BooleanSchema<undefined>, undefined>;
291
- }, undefined>, undefined>;
292
- }, undefined>;
293
- readonly clientInfo: v.ObjectSchema<{
294
- readonly version: v.StringSchema<undefined>;
295
- /** Intended for programmatic or logical use, but used as a display name in past specs or fallback */
296
- readonly name: v.StringSchema<undefined>;
297
- /**
298
- * Intended for UI and end-user contexts — optimized to be human-readable and easily understood,
299
- * even by those unfamiliar with domain-specific terminology.
300
- *
301
- * If not provided, the name should be used for display (except for Tool,
302
- * where `annotations.title` should be given precedence over using `name`,
303
- * if present).
304
- */
305
- readonly title: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
306
- }, undefined>;
307
- readonly _meta: v.OptionalSchema<v.LooseObjectSchema<{
308
- /**
309
- * If specified, the caller is requesting out-of-band progress notifications for this request (as represented by notifications/progress). The value of this parameter is an opaque token that will be attached to any subsequent notifications. The receiver is not obligated to provide these notifications.
310
- */
311
- readonly progressToken: v.OptionalSchema<v.UnionSchema<[v.StringSchema<undefined>, v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>]>], undefined>, undefined>;
312
- }, undefined>, undefined>;
313
- }, undefined>;
314
- /**
315
- * This request is sent from the client to the server when it first connects, asking it to begin initialization.
316
- */
317
- export const InitializeRequestSchema: v.ObjectSchema<{
318
- readonly method: v.LiteralSchema<"initialize", undefined>;
319
- readonly params: v.ObjectSchema<{
320
- /**
321
- * The latest version of the Model Context Protocol that the client supports. The client MAY decide to support older versions as well.
322
- */
323
- readonly protocolVersion: v.StringSchema<undefined>;
324
- readonly capabilities: v.ObjectSchema<{
325
- /**
326
- * Experimental, non-standard capabilities that the client supports.
327
- */
328
- readonly experimental: v.OptionalSchema<v.ObjectSchema<{}, undefined>, undefined>;
329
- /**
330
- * Present if the client supports sampling from an LLM.
331
- */
332
- readonly sampling: v.OptionalSchema<v.ObjectSchema<{}, undefined>, undefined>;
333
- /**
334
- * Present if the client supports eliciting user input.
335
- */
336
- readonly elicitation: v.OptionalSchema<v.ObjectSchema<{}, undefined>, undefined>;
337
- /**
338
- * Present if the client supports listing roots.
339
- */
340
- readonly roots: v.OptionalSchema<v.ObjectSchema<{
341
- /**
342
- * Whether the client supports issuing notifications for changes to the roots list.
343
- */
344
- readonly listChanged: v.OptionalSchema<v.BooleanSchema<undefined>, undefined>;
345
- }, undefined>, undefined>;
346
- }, undefined>;
347
- readonly clientInfo: v.ObjectSchema<{
348
- readonly version: v.StringSchema<undefined>;
349
- /** Intended for programmatic or logical use, but used as a display name in past specs or fallback */
350
- readonly name: v.StringSchema<undefined>;
351
- /**
352
- * Intended for UI and end-user contexts — optimized to be human-readable and easily understood,
353
- * even by those unfamiliar with domain-specific terminology.
354
- *
355
- * If not provided, the name should be used for display (except for Tool,
356
- * where `annotations.title` should be given precedence over using `name`,
357
- * if present).
358
- */
359
- readonly title: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
360
- }, undefined>;
361
- readonly _meta: v.OptionalSchema<v.LooseObjectSchema<{
362
- /**
363
- * If specified, the caller is requesting out-of-band progress notifications for this request (as represented by notifications/progress). The value of this parameter is an opaque token that will be attached to any subsequent notifications. The receiver is not obligated to provide these notifications.
364
- */
365
- readonly progressToken: v.OptionalSchema<v.UnionSchema<[v.StringSchema<undefined>, v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>]>], undefined>, undefined>;
366
- }, undefined>, undefined>;
367
- }, undefined>;
368
- }, undefined>;
369
- /**
370
- * Capabilities that a server may support. Known capabilities are defined here, in this schema, but this is not a closed set: any server can define its own, additional capabilities.
371
- */
372
- export const ServerCapabilitiesSchema: v.ObjectSchema<{
373
- /**
374
- * Experimental, non-standard capabilities that the server supports.
375
- */
376
- readonly experimental: v.OptionalSchema<v.ObjectSchema<{}, undefined>, undefined>;
377
- /**
378
- * Present if the server supports sending log messages to the client.
379
- */
380
- readonly logging: v.OptionalSchema<v.ObjectSchema<{}, undefined>, undefined>;
381
- /**
382
- * Present if the server supports sending completions to the client.
383
- */
384
- readonly completions: v.OptionalSchema<v.ObjectSchema<{}, undefined>, undefined>;
385
- /**
386
- * Present if the server offers any prompt templates.
387
- */
388
- readonly prompts: v.OptionalSchema<v.ObjectSchema<{
389
- /**
390
- * Whether this server supports issuing notifications for changes to the prompt list.
391
- */
392
- readonly listChanged: v.OptionalSchema<v.BooleanSchema<undefined>, undefined>;
393
- }, undefined>, undefined>;
394
- /**
395
- * Present if the server offers any resources to read.
396
- */
397
- readonly resources: v.OptionalSchema<v.ObjectSchema<{
398
- /**
399
- * Whether this server supports clients subscribing to resource updates.
400
- */
401
- readonly subscribe: v.OptionalSchema<v.BooleanSchema<undefined>, undefined>;
402
- /**
403
- * Whether this server supports issuing notifications for changes to the resource list.
404
- */
405
- readonly listChanged: v.OptionalSchema<v.BooleanSchema<undefined>, undefined>;
406
- }, undefined>, undefined>;
407
- /**
408
- * Present if the server offers any tools to call.
409
- */
410
- readonly tools: v.OptionalSchema<v.ObjectSchema<{
411
- /**
412
- * Whether this server supports issuing notifications for changes to the tool list.
413
- */
414
- readonly listChanged: v.OptionalSchema<v.BooleanSchema<undefined>, undefined>;
415
- }, undefined>, undefined>;
416
- }, undefined>;
417
- /**
418
- * After receiving an initialize request from the client, the server sends this response.
419
- */
420
- export const InitializeResultSchema: v.ObjectSchema<{
421
- /**
422
- * The version of the Model Context Protocol that the server wants to use. This may not match the version that the client requested. If the client cannot support this version, it MUST disconnect.
423
- */
424
- readonly protocolVersion: v.StringSchema<undefined>;
425
- readonly capabilities: v.ObjectSchema<{
426
- /**
427
- * Experimental, non-standard capabilities that the server supports.
428
- */
429
- readonly experimental: v.OptionalSchema<v.ObjectSchema<{}, undefined>, undefined>;
430
- /**
431
- * Present if the server supports sending log messages to the client.
432
- */
433
- readonly logging: v.OptionalSchema<v.ObjectSchema<{}, undefined>, undefined>;
434
- /**
435
- * Present if the server supports sending completions to the client.
436
- */
437
- readonly completions: v.OptionalSchema<v.ObjectSchema<{}, undefined>, undefined>;
438
- /**
439
- * Present if the server offers any prompt templates.
440
- */
441
- readonly prompts: v.OptionalSchema<v.ObjectSchema<{
442
- /**
443
- * Whether this server supports issuing notifications for changes to the prompt list.
444
- */
445
- readonly listChanged: v.OptionalSchema<v.BooleanSchema<undefined>, undefined>;
446
- }, undefined>, undefined>;
447
- /**
448
- * Present if the server offers any resources to read.
449
- */
450
- readonly resources: v.OptionalSchema<v.ObjectSchema<{
451
- /**
452
- * Whether this server supports clients subscribing to resource updates.
453
- */
454
- readonly subscribe: v.OptionalSchema<v.BooleanSchema<undefined>, undefined>;
455
- /**
456
- * Whether this server supports issuing notifications for changes to the resource list.
457
- */
458
- readonly listChanged: v.OptionalSchema<v.BooleanSchema<undefined>, undefined>;
459
- }, undefined>, undefined>;
460
- /**
461
- * Present if the server offers any tools to call.
462
- */
463
- readonly tools: v.OptionalSchema<v.ObjectSchema<{
464
- /**
465
- * Whether this server supports issuing notifications for changes to the tool list.
466
- */
467
- readonly listChanged: v.OptionalSchema<v.BooleanSchema<undefined>, undefined>;
468
- }, undefined>, undefined>;
469
- }, undefined>;
470
- readonly serverInfo: v.ObjectSchema<{
471
- readonly version: v.StringSchema<undefined>;
472
- /** Intended for programmatic or logical use, but used as a display name in past specs or fallback */
473
- readonly name: v.StringSchema<undefined>;
474
- /**
475
- * Intended for UI and end-user contexts — optimized to be human-readable and easily understood,
476
- * even by those unfamiliar with domain-specific terminology.
477
- *
478
- * If not provided, the name should be used for display (except for Tool,
479
- * where `annotations.title` should be given precedence over using `name`,
480
- * if present).
481
- */
482
- readonly title: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
483
- }, undefined>;
484
- /**
485
- * Instructions describing how to use the server and its features.
486
- *
487
- * This can be used by clients to improve the LLM's understanding of available tools, resources, etc. It can be thought of like a "hint" to the model. For example, this information MAY be added to the system prompt.
488
- */
489
- readonly instructions: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
490
- /**
491
- * See [MCP specification](https://github.com/modelcontextprotocol/modelcontextprotocol/blob/47339c03c143bb4ec01a26e721a1b8fe66634ebe/docs/specification/draft/basic/index.mdx#general-fields)
492
- * for notes on _meta usage.
493
- */
494
- readonly _meta: v.OptionalSchema<v.LooseObjectSchema<{}, undefined>, undefined>;
495
- }, undefined>;
496
- /**
497
- * This notification is sent from the client to the server after initialization has finished.
498
- */
499
- export const InitializedNotificationSchema: v.ObjectSchema<{
500
- readonly method: v.LiteralSchema<"notifications/initialized", undefined>;
501
- readonly params: v.OptionalSchema<v.LooseObjectSchema<{
502
- /**
503
- * See [MCP specification](https://github.com/modelcontextprotocol/modelcontextprotocol/blob/47339c03c143bb4ec01a26e721a1b8fe66634ebe/docs/specification/draft/basic/index.mdx#general-fields)
504
- * for notes on _meta usage.
505
- */
506
- readonly _meta: v.OptionalSchema<v.LooseObjectSchema<{}, undefined>, undefined>;
507
- }, undefined>, undefined>;
508
- }, undefined>;
509
- /**
510
- * A ping, issued by either the server or the client, to check that the other party is still alive. The receiver must promptly respond, or else may be disconnected.
511
- */
512
- export const PingRequestSchema: v.ObjectSchema<{
513
- readonly method: v.LiteralSchema<"ping", undefined>;
514
- readonly params: v.OptionalSchema<v.LooseObjectSchema<{
515
- readonly _meta: v.OptionalSchema<v.LooseObjectSchema<{
516
- /**
517
- * If specified, the caller is requesting out-of-band progress notifications for this request (as represented by notifications/progress). The value of this parameter is an opaque token that will be attached to any subsequent notifications. The receiver is not obligated to provide these notifications.
518
- */
519
- readonly progressToken: v.OptionalSchema<v.UnionSchema<[v.StringSchema<undefined>, v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>]>], undefined>, undefined>;
520
- }, undefined>, undefined>;
521
- }, undefined>, undefined>;
522
- }, undefined>;
523
- export const ProgressSchema: v.ObjectSchema<{
524
- /**
525
- * The progress thus far. This should increase every time progress is made, even if the total is unknown.
526
- */
527
- readonly progress: v.NumberSchema<undefined>;
528
- /**
529
- * Total number of items to process (or total progress required), if known.
530
- */
531
- readonly total: v.OptionalSchema<v.NumberSchema<undefined>, undefined>;
532
- /**
533
- * An optional message describing the current progress.
534
- */
535
- readonly message: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
536
- }, undefined>;
537
- /**
538
- * An out-of-band notification used to inform the receiver of a progress update for a long-running request.
539
- */
540
- export const ProgressNotificationSchema: v.ObjectSchema<{
541
- readonly method: v.LiteralSchema<"notifications/progress", undefined>;
542
- readonly params: v.ObjectSchema<{
543
- /**
544
- * The progress token which was given in the initial request, used to associate this notification with the request that is proceeding.
545
- */
546
- readonly progressToken: v.UnionSchema<[v.StringSchema<undefined>, v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>]>], undefined>;
547
- /**
548
- * The progress thus far. This should increase every time progress is made, even if the total is unknown.
549
- */
550
- readonly progress: v.NumberSchema<undefined>;
551
- /**
552
- * Total number of items to process (or total progress required), if known.
553
- */
554
- readonly total: v.OptionalSchema<v.NumberSchema<undefined>, undefined>;
555
- /**
556
- * An optional message describing the current progress.
557
- */
558
- readonly message: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
559
- /**
560
- * See [MCP specification](https://github.com/modelcontextprotocol/modelcontextprotocol/blob/47339c03c143bb4ec01a26e721a1b8fe66634ebe/docs/specification/draft/basic/index.mdx#general-fields)
561
- * for notes on _meta usage.
562
- */
563
- readonly _meta: v.OptionalSchema<v.LooseObjectSchema<{}, undefined>, undefined>;
564
- }, undefined>;
565
- }, undefined>;
566
- export const PaginatedRequestSchema: v.ObjectSchema<{
567
- readonly params: v.OptionalSchema<v.ObjectSchema<{
568
- /**
569
- * An opaque token representing the current pagination position.
570
- * If provided, the server should return results starting after this cursor.
571
- */
572
- readonly cursor: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
573
- readonly _meta: v.OptionalSchema<v.LooseObjectSchema<{
574
- /**
575
- * If specified, the caller is requesting out-of-band progress notifications for this request (as represented by notifications/progress). The value of this parameter is an opaque token that will be attached to any subsequent notifications. The receiver is not obligated to provide these notifications.
576
- */
577
- readonly progressToken: v.OptionalSchema<v.UnionSchema<[v.StringSchema<undefined>, v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>]>], undefined>, undefined>;
578
- }, undefined>, undefined>;
579
- }, undefined>, undefined>;
580
- readonly method: v.StringSchema<undefined>;
581
- }, undefined>;
582
- export const PaginatedResultSchema: v.ObjectSchema<{
583
- /**
584
- * An opaque token representing the pagination position after the last returned result.
585
- * If present, there may be more results available.
586
- */
587
- readonly nextCursor: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
588
- /**
589
- * See [MCP specification](https://github.com/modelcontextprotocol/modelcontextprotocol/blob/47339c03c143bb4ec01a26e721a1b8fe66634ebe/docs/specification/draft/basic/index.mdx#general-fields)
590
- * for notes on _meta usage.
591
- */
592
- readonly _meta: v.OptionalSchema<v.LooseObjectSchema<{}, undefined>, undefined>;
593
- }, undefined>;
594
- /**
595
- * The contents of a specific resource or sub-resource.
596
- */
597
- export const ResourceContentsSchema: v.ObjectSchema<{
598
- /**
599
- * The URI of this resource.
600
- */
601
- readonly uri: v.StringSchema<undefined>;
602
- /**
603
- * The MIME type of this resource, if known.
604
- */
605
- readonly mimeType: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
606
- /**
607
- * See [MCP specification](https://github.com/modelcontextprotocol/modelcontextprotocol/blob/47339c03c143bb4ec01a26e721a1b8fe66634ebe/docs/specification/draft/basic/index.mdx#general-fields)
608
- * for notes on _meta usage.
609
- */
610
- readonly _meta: v.OptionalSchema<v.ObjectSchema<{}, undefined>, undefined>;
611
- }, undefined>;
612
- export const TextResourceContentsSchema: v.ObjectSchema<{
613
- /**
614
- * The text of the item. This must only be set if the item can actually be represented as text (not binary data).
615
- */
616
- readonly text: v.StringSchema<undefined>;
617
- /**
618
- * The URI of this resource.
619
- */
620
- readonly uri: v.StringSchema<undefined>;
621
- /**
622
- * The MIME type of this resource, if known.
623
- */
624
- readonly mimeType: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
625
- /**
626
- * See [MCP specification](https://github.com/modelcontextprotocol/modelcontextprotocol/blob/47339c03c143bb4ec01a26e721a1b8fe66634ebe/docs/specification/draft/basic/index.mdx#general-fields)
627
- * for notes on _meta usage.
628
- */
629
- readonly _meta: v.OptionalSchema<v.ObjectSchema<{}, undefined>, undefined>;
630
- }, undefined>;
631
- export const BlobResourceContentsSchema: v.ObjectSchema<{
632
- /**
633
- * A base64-encoded string representing the binary data of the item.
634
- */
635
- readonly blob: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.Base64Action<string, undefined>]>;
636
- /**
637
- * The URI of this resource.
638
- */
639
- readonly uri: v.StringSchema<undefined>;
640
- /**
641
- * The MIME type of this resource, if known.
642
- */
643
- readonly mimeType: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
644
- /**
645
- * See [MCP specification](https://github.com/modelcontextprotocol/modelcontextprotocol/blob/47339c03c143bb4ec01a26e721a1b8fe66634ebe/docs/specification/draft/basic/index.mdx#general-fields)
646
- * for notes on _meta usage.
647
- */
648
- readonly _meta: v.OptionalSchema<v.ObjectSchema<{}, undefined>, undefined>;
649
- }, undefined>;
650
- /**
651
- * A known resource that the server is capable of reading.
652
- */
653
- export const ResourceSchema: v.ObjectSchema<{
654
- /**
655
- * The URI of this resource.
656
- */
657
- readonly uri: v.StringSchema<undefined>;
658
- /**
659
- * A description of what this resource represents.
660
- *
661
- * This can be used by clients to improve the LLM's understanding of available resources. It can be thought of like a "hint" to the model.
662
- */
663
- readonly description: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
664
- /**
665
- * The MIME type of this resource, if known.
666
- */
667
- readonly mimeType: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
668
- /**
669
- * See [MCP specification](https://github.com/modelcontextprotocol/modelcontextprotocol/blob/47339c03c143bb4ec01a26e721a1b8fe66634ebe/docs/specification/draft/basic/index.mdx#general-fields)
670
- * for notes on _meta usage.
671
- */
672
- readonly _meta: v.OptionalSchema<v.ObjectSchema<{}, undefined>, undefined>;
673
- /** Intended for programmatic or logical use, but used as a display name in past specs or fallback */
674
- readonly name: v.StringSchema<undefined>;
675
- /**
676
- * Intended for UI and end-user contexts — optimized to be human-readable and easily understood,
677
- * even by those unfamiliar with domain-specific terminology.
678
- *
679
- * If not provided, the name should be used for display (except for Tool,
680
- * where `annotations.title` should be given precedence over using `name`,
681
- * if present).
682
- */
683
- readonly title: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
684
- }, undefined>;
685
- /**
686
- * A template description for resources available on the server.
687
- */
688
- export const ResourceTemplateSchema: v.ObjectSchema<{
689
- /**
690
- * A URI template (according to RFC 6570) that can be used to construct resource URIs.
691
- */
692
- readonly uriTemplate: v.StringSchema<undefined>;
693
- /**
694
- * A description of what this template is for.
695
- *
696
- * This can be used by clients to improve the LLM's understanding of available resources. It can be thought of like a "hint" to the model.
697
- */
698
- readonly description: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
699
- /**
700
- * The MIME type for all resources that match this template. This should only be included if all resources matching this template have the same type.
701
- */
702
- readonly mimeType: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
703
- /**
704
- * See [MCP specification](https://github.com/modelcontextprotocol/modelcontextprotocol/blob/47339c03c143bb4ec01a26e721a1b8fe66634ebe/docs/specification/draft/basic/index.mdx#general-fields)
705
- * for notes on _meta usage.
706
- */
707
- readonly _meta: v.OptionalSchema<v.ObjectSchema<{}, undefined>, undefined>;
708
- /** Intended for programmatic or logical use, but used as a display name in past specs or fallback */
709
- readonly name: v.StringSchema<undefined>;
710
- /**
711
- * Intended for UI and end-user contexts — optimized to be human-readable and easily understood,
712
- * even by those unfamiliar with domain-specific terminology.
713
- *
714
- * If not provided, the name should be used for display (except for Tool,
715
- * where `annotations.title` should be given precedence over using `name`,
716
- * if present).
717
- */
718
- readonly title: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
719
- }, undefined>;
720
- /**
721
- * Sent from the client to request a list of resources the server has.
722
- */
723
- export const ListResourcesRequestSchema: v.ObjectSchema<{
724
- readonly method: v.LiteralSchema<"resources/list", undefined>;
725
- readonly params: v.OptionalSchema<v.ObjectSchema<{
726
- /**
727
- * An opaque token representing the current pagination position.
728
- * If provided, the server should return results starting after this cursor.
729
- */
730
- readonly cursor: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
731
- readonly _meta: v.OptionalSchema<v.LooseObjectSchema<{
732
- /**
733
- * If specified, the caller is requesting out-of-band progress notifications for this request (as represented by notifications/progress). The value of this parameter is an opaque token that will be attached to any subsequent notifications. The receiver is not obligated to provide these notifications.
734
- */
735
- readonly progressToken: v.OptionalSchema<v.UnionSchema<[v.StringSchema<undefined>, v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>]>], undefined>, undefined>;
736
- }, undefined>, undefined>;
737
- }, undefined>, undefined>;
738
- }, undefined>;
739
- /**
740
- * The server's response to a resources/list request from the client.
741
- */
742
- export const ListResourcesResultSchema: v.ObjectSchema<{
743
- readonly resources: v.ArraySchema<v.ObjectSchema<{
744
- /**
745
- * The URI of this resource.
746
- */
747
- readonly uri: v.StringSchema<undefined>;
748
- /**
749
- * A description of what this resource represents.
750
- *
751
- * This can be used by clients to improve the LLM's understanding of available resources. It can be thought of like a "hint" to the model.
752
- */
753
- readonly description: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
754
- /**
755
- * The MIME type of this resource, if known.
756
- */
757
- readonly mimeType: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
758
- /**
759
- * See [MCP specification](https://github.com/modelcontextprotocol/modelcontextprotocol/blob/47339c03c143bb4ec01a26e721a1b8fe66634ebe/docs/specification/draft/basic/index.mdx#general-fields)
760
- * for notes on _meta usage.
761
- */
762
- readonly _meta: v.OptionalSchema<v.ObjectSchema<{}, undefined>, undefined>;
763
- /** Intended for programmatic or logical use, but used as a display name in past specs or fallback */
764
- readonly name: v.StringSchema<undefined>;
765
- /**
766
- * Intended for UI and end-user contexts — optimized to be human-readable and easily understood,
767
- * even by those unfamiliar with domain-specific terminology.
768
- *
769
- * If not provided, the name should be used for display (except for Tool,
770
- * where `annotations.title` should be given precedence over using `name`,
771
- * if present).
772
- */
773
- readonly title: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
774
- }, undefined>, undefined>;
775
- /**
776
- * An opaque token representing the pagination position after the last returned result.
777
- * If present, there may be more results available.
778
- */
779
- readonly nextCursor: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
780
- /**
781
- * See [MCP specification](https://github.com/modelcontextprotocol/modelcontextprotocol/blob/47339c03c143bb4ec01a26e721a1b8fe66634ebe/docs/specification/draft/basic/index.mdx#general-fields)
782
- * for notes on _meta usage.
783
- */
784
- readonly _meta: v.OptionalSchema<v.LooseObjectSchema<{}, undefined>, undefined>;
785
- }, undefined>;
786
- /**
787
- * Sent from the client to request a list of resource templates the server has.
788
- */
789
- export const ListResourceTemplatesRequestSchema: v.ObjectSchema<{
790
- readonly method: v.LiteralSchema<"resources/templates/list", undefined>;
791
- readonly params: v.OptionalSchema<v.ObjectSchema<{
792
- /**
793
- * An opaque token representing the current pagination position.
794
- * If provided, the server should return results starting after this cursor.
795
- */
796
- readonly cursor: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
797
- readonly _meta: v.OptionalSchema<v.LooseObjectSchema<{
798
- /**
799
- * If specified, the caller is requesting out-of-band progress notifications for this request (as represented by notifications/progress). The value of this parameter is an opaque token that will be attached to any subsequent notifications. The receiver is not obligated to provide these notifications.
800
- */
801
- readonly progressToken: v.OptionalSchema<v.UnionSchema<[v.StringSchema<undefined>, v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>]>], undefined>, undefined>;
802
- }, undefined>, undefined>;
803
- }, undefined>, undefined>;
804
- }, undefined>;
805
- /**
806
- * The server's response to a resources/templates/list request from the client.
807
- */
808
- export const ListResourceTemplatesResultSchema: v.ObjectSchema<{
809
- readonly resourceTemplates: v.ArraySchema<v.ObjectSchema<{
810
- /**
811
- * A URI template (according to RFC 6570) that can be used to construct resource URIs.
812
- */
813
- readonly uriTemplate: v.StringSchema<undefined>;
814
- /**
815
- * A description of what this template is for.
816
- *
817
- * This can be used by clients to improve the LLM's understanding of available resources. It can be thought of like a "hint" to the model.
818
- */
819
- readonly description: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
820
- /**
821
- * The MIME type for all resources that match this template. This should only be included if all resources matching this template have the same type.
822
- */
823
- readonly mimeType: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
824
- /**
825
- * See [MCP specification](https://github.com/modelcontextprotocol/modelcontextprotocol/blob/47339c03c143bb4ec01a26e721a1b8fe66634ebe/docs/specification/draft/basic/index.mdx#general-fields)
826
- * for notes on _meta usage.
827
- */
828
- readonly _meta: v.OptionalSchema<v.ObjectSchema<{}, undefined>, undefined>;
829
- /** Intended for programmatic or logical use, but used as a display name in past specs or fallback */
830
- readonly name: v.StringSchema<undefined>;
831
- /**
832
- * Intended for UI and end-user contexts — optimized to be human-readable and easily understood,
833
- * even by those unfamiliar with domain-specific terminology.
834
- *
835
- * If not provided, the name should be used for display (except for Tool,
836
- * where `annotations.title` should be given precedence over using `name`,
837
- * if present).
838
- */
839
- readonly title: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
840
- }, undefined>, undefined>;
841
- /**
842
- * An opaque token representing the pagination position after the last returned result.
843
- * If present, there may be more results available.
844
- */
845
- readonly nextCursor: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
846
- /**
847
- * See [MCP specification](https://github.com/modelcontextprotocol/modelcontextprotocol/blob/47339c03c143bb4ec01a26e721a1b8fe66634ebe/docs/specification/draft/basic/index.mdx#general-fields)
848
- * for notes on _meta usage.
849
- */
850
- readonly _meta: v.OptionalSchema<v.LooseObjectSchema<{}, undefined>, undefined>;
851
- }, undefined>;
852
- /**
853
- * Sent from the client to the server, to read a specific resource URI.
854
- */
855
- export const ReadResourceRequestSchema: v.ObjectSchema<{
856
- readonly method: v.LiteralSchema<"resources/read", undefined>;
857
- readonly params: v.ObjectSchema<{
858
- /**
859
- * The URI of the resource to read. The URI can use any protocol; it is up to the server how to interpret it.
860
- */
861
- readonly uri: v.StringSchema<undefined>;
862
- readonly _meta: v.OptionalSchema<v.LooseObjectSchema<{
863
- /**
864
- * If specified, the caller is requesting out-of-band progress notifications for this request (as represented by notifications/progress). The value of this parameter is an opaque token that will be attached to any subsequent notifications. The receiver is not obligated to provide these notifications.
865
- */
866
- readonly progressToken: v.OptionalSchema<v.UnionSchema<[v.StringSchema<undefined>, v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>]>], undefined>, undefined>;
867
- }, undefined>, undefined>;
868
- }, undefined>;
869
- }, undefined>;
870
- /**
871
- * The server's response to a resources/read request from the client.
872
- */
873
- export const ReadResourceResultSchema: v.ObjectSchema<{
874
- readonly contents: v.ArraySchema<v.UnionSchema<[v.ObjectSchema<{
875
- /**
876
- * The text of the item. This must only be set if the item can actually be represented as text (not binary data).
877
- */
878
- readonly text: v.StringSchema<undefined>;
879
- /**
880
- * The URI of this resource.
881
- */
882
- readonly uri: v.StringSchema<undefined>;
883
- /**
884
- * The MIME type of this resource, if known.
885
- */
886
- readonly mimeType: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
887
- /**
888
- * See [MCP specification](https://github.com/modelcontextprotocol/modelcontextprotocol/blob/47339c03c143bb4ec01a26e721a1b8fe66634ebe/docs/specification/draft/basic/index.mdx#general-fields)
889
- * for notes on _meta usage.
890
- */
891
- readonly _meta: v.OptionalSchema<v.ObjectSchema<{}, undefined>, undefined>;
892
- }, undefined>, v.ObjectSchema<{
893
- /**
894
- * A base64-encoded string representing the binary data of the item.
895
- */
896
- readonly blob: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.Base64Action<string, undefined>]>;
897
- /**
898
- * The URI of this resource.
899
- */
900
- readonly uri: v.StringSchema<undefined>;
901
- /**
902
- * The MIME type of this resource, if known.
903
- */
904
- readonly mimeType: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
905
- /**
906
- * See [MCP specification](https://github.com/modelcontextprotocol/modelcontextprotocol/blob/47339c03c143bb4ec01a26e721a1b8fe66634ebe/docs/specification/draft/basic/index.mdx#general-fields)
907
- * for notes on _meta usage.
908
- */
909
- readonly _meta: v.OptionalSchema<v.ObjectSchema<{}, undefined>, undefined>;
910
- }, undefined>], undefined>, undefined>;
911
- /**
912
- * See [MCP specification](https://github.com/modelcontextprotocol/modelcontextprotocol/blob/47339c03c143bb4ec01a26e721a1b8fe66634ebe/docs/specification/draft/basic/index.mdx#general-fields)
913
- * for notes on _meta usage.
914
- */
915
- readonly _meta: v.OptionalSchema<v.LooseObjectSchema<{}, undefined>, undefined>;
916
- }, undefined>;
917
- /**
918
- * An optional notification from the server to the client, informing it that the list of resources it can read from has changed. This may be issued by servers without any previous subscription from the client.
919
- */
920
- export const ResourceListChangedNotificationSchema: v.ObjectSchema<{
921
- readonly method: v.LiteralSchema<"notifications/resources/list_changed", undefined>;
922
- readonly params: v.OptionalSchema<v.LooseObjectSchema<{
923
- /**
924
- * See [MCP specification](https://github.com/modelcontextprotocol/modelcontextprotocol/blob/47339c03c143bb4ec01a26e721a1b8fe66634ebe/docs/specification/draft/basic/index.mdx#general-fields)
925
- * for notes on _meta usage.
926
- */
927
- readonly _meta: v.OptionalSchema<v.LooseObjectSchema<{}, undefined>, undefined>;
928
- }, undefined>, undefined>;
929
- }, undefined>;
930
- /**
931
- * Sent from the client to request resources/updated notifications from the server whenever a particular resource changes.
932
- */
933
- export const SubscribeRequestSchema: v.ObjectSchema<{
934
- readonly method: v.LiteralSchema<"resources/subscribe", undefined>;
935
- readonly params: v.ObjectSchema<{
936
- /**
937
- * The URI of the resource to subscribe to. The URI can use any protocol; it is up to the server how to interpret it.
938
- */
939
- readonly uri: v.StringSchema<undefined>;
940
- readonly _meta: v.OptionalSchema<v.LooseObjectSchema<{
941
- /**
942
- * If specified, the caller is requesting out-of-band progress notifications for this request (as represented by notifications/progress). The value of this parameter is an opaque token that will be attached to any subsequent notifications. The receiver is not obligated to provide these notifications.
943
- */
944
- readonly progressToken: v.OptionalSchema<v.UnionSchema<[v.StringSchema<undefined>, v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>]>], undefined>, undefined>;
945
- }, undefined>, undefined>;
946
- }, undefined>;
947
- }, undefined>;
948
- /**
949
- * Sent from the client to request cancellation of resources/updated notifications from the server. This should follow a previous resources/subscribe request.
950
- */
951
- export const UnsubscribeRequestSchema: v.ObjectSchema<{
952
- readonly method: v.LiteralSchema<"resources/unsubscribe", undefined>;
953
- readonly params: v.ObjectSchema<{
954
- /**
955
- * The URI of the resource to unsubscribe from.
956
- */
957
- readonly uri: v.StringSchema<undefined>;
958
- readonly _meta: v.OptionalSchema<v.LooseObjectSchema<{
959
- /**
960
- * If specified, the caller is requesting out-of-band progress notifications for this request (as represented by notifications/progress). The value of this parameter is an opaque token that will be attached to any subsequent notifications. The receiver is not obligated to provide these notifications.
961
- */
962
- readonly progressToken: v.OptionalSchema<v.UnionSchema<[v.StringSchema<undefined>, v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>]>], undefined>, undefined>;
963
- }, undefined>, undefined>;
964
- }, undefined>;
965
- }, undefined>;
966
- /**
967
- * A notification from the server to the client, informing it that a resource has changed and may need to be read again. This should only be sent if the client previously sent a resources/subscribe request.
968
- */
969
- export const ResourceUpdatedNotificationSchema: v.ObjectSchema<{
970
- readonly method: v.LiteralSchema<"notifications/resources/updated", undefined>;
971
- readonly params: v.ObjectSchema<{
972
- /**
973
- * The URI of the resource that has been updated. This might be a sub-resource of the one that the client actually subscribed to.
974
- */
975
- readonly uri: v.StringSchema<undefined>;
976
- /**
977
- * See [MCP specification](https://github.com/modelcontextprotocol/modelcontextprotocol/blob/47339c03c143bb4ec01a26e721a1b8fe66634ebe/docs/specification/draft/basic/index.mdx#general-fields)
978
- * for notes on _meta usage.
979
- */
980
- readonly _meta: v.OptionalSchema<v.LooseObjectSchema<{}, undefined>, undefined>;
981
- }, undefined>;
982
- }, undefined>;
983
- /**
984
- * Describes an argument that a prompt can accept.
985
- */
986
- export const PromptArgumentSchema: v.ObjectSchema<{
987
- /**
988
- * The name of the argument.
989
- */
990
- readonly name: v.StringSchema<undefined>;
991
- /**
992
- * A human-readable description of the argument.
993
- */
994
- readonly description: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
995
- /**
996
- * Whether this argument must be provided.
997
- */
998
- readonly required: v.OptionalSchema<v.BooleanSchema<undefined>, undefined>;
999
- }, undefined>;
1000
- /**
1001
- * A prompt or prompt template that the server offers.
1002
- */
1003
- export const PromptSchema: v.ObjectSchema<{
1004
- /**
1005
- * An optional description of what this prompt provides
1006
- */
1007
- readonly description: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
1008
- /**
1009
- * A list of arguments to use for templating the prompt.
1010
- */
1011
- readonly arguments: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
1012
- /**
1013
- * The name of the argument.
1014
- */
1015
- readonly name: v.StringSchema<undefined>;
1016
- /**
1017
- * A human-readable description of the argument.
1018
- */
1019
- readonly description: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
1020
- /**
1021
- * Whether this argument must be provided.
1022
- */
1023
- readonly required: v.OptionalSchema<v.BooleanSchema<undefined>, undefined>;
1024
- }, undefined>, undefined>, undefined>;
1025
- /**
1026
- * See [MCP specification](https://github.com/modelcontextprotocol/modelcontextprotocol/blob/47339c03c143bb4ec01a26e721a1b8fe66634ebe/docs/specification/draft/basic/index.mdx#general-fields)
1027
- * for notes on _meta usage.
1028
- */
1029
- readonly _meta: v.OptionalSchema<v.ObjectSchema<{}, undefined>, undefined>;
1030
- /** Intended for programmatic or logical use, but used as a display name in past specs or fallback */
1031
- readonly name: v.StringSchema<undefined>;
1032
- /**
1033
- * Intended for UI and end-user contexts — optimized to be human-readable and easily understood,
1034
- * even by those unfamiliar with domain-specific terminology.
1035
- *
1036
- * If not provided, the name should be used for display (except for Tool,
1037
- * where `annotations.title` should be given precedence over using `name`,
1038
- * if present).
1039
- */
1040
- readonly title: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
1041
- }, undefined>;
1042
- /**
1043
- * Sent from the client to request a list of prompts and prompt templates the server has.
1044
- */
1045
- export const ListPromptsRequestSchema: v.ObjectSchema<{
1046
- readonly method: v.LiteralSchema<"prompts/list", undefined>;
1047
- readonly params: v.OptionalSchema<v.ObjectSchema<{
1048
- /**
1049
- * An opaque token representing the current pagination position.
1050
- * If provided, the server should return results starting after this cursor.
1051
- */
1052
- readonly cursor: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
1053
- readonly _meta: v.OptionalSchema<v.LooseObjectSchema<{
1054
- /**
1055
- * If specified, the caller is requesting out-of-band progress notifications for this request (as represented by notifications/progress). The value of this parameter is an opaque token that will be attached to any subsequent notifications. The receiver is not obligated to provide these notifications.
1056
- */
1057
- readonly progressToken: v.OptionalSchema<v.UnionSchema<[v.StringSchema<undefined>, v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>]>], undefined>, undefined>;
1058
- }, undefined>, undefined>;
1059
- }, undefined>, undefined>;
1060
- }, undefined>;
1061
- /**
1062
- * The server's response to a prompts/list request from the client.
1063
- */
1064
- export const ListPromptsResultSchema: v.ObjectSchema<{
1065
- readonly prompts: v.ArraySchema<v.ObjectSchema<{
1066
- /**
1067
- * An optional description of what this prompt provides
1068
- */
1069
- readonly description: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
1070
- /**
1071
- * A list of arguments to use for templating the prompt.
1072
- */
1073
- readonly arguments: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
1074
- /**
1075
- * The name of the argument.
1076
- */
1077
- readonly name: v.StringSchema<undefined>;
1078
- /**
1079
- * A human-readable description of the argument.
1080
- */
1081
- readonly description: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
1082
- /**
1083
- * Whether this argument must be provided.
1084
- */
1085
- readonly required: v.OptionalSchema<v.BooleanSchema<undefined>, undefined>;
1086
- }, undefined>, undefined>, undefined>;
1087
- /**
1088
- * See [MCP specification](https://github.com/modelcontextprotocol/modelcontextprotocol/blob/47339c03c143bb4ec01a26e721a1b8fe66634ebe/docs/specification/draft/basic/index.mdx#general-fields)
1089
- * for notes on _meta usage.
1090
- */
1091
- readonly _meta: v.OptionalSchema<v.ObjectSchema<{}, undefined>, undefined>;
1092
- /** Intended for programmatic or logical use, but used as a display name in past specs or fallback */
1093
- readonly name: v.StringSchema<undefined>;
1094
- /**
1095
- * Intended for UI and end-user contexts — optimized to be human-readable and easily understood,
1096
- * even by those unfamiliar with domain-specific terminology.
1097
- *
1098
- * If not provided, the name should be used for display (except for Tool,
1099
- * where `annotations.title` should be given precedence over using `name`,
1100
- * if present).
1101
- */
1102
- readonly title: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
1103
- }, undefined>, undefined>;
1104
- /**
1105
- * An opaque token representing the pagination position after the last returned result.
1106
- * If present, there may be more results available.
1107
- */
1108
- readonly nextCursor: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
1109
- /**
1110
- * See [MCP specification](https://github.com/modelcontextprotocol/modelcontextprotocol/blob/47339c03c143bb4ec01a26e721a1b8fe66634ebe/docs/specification/draft/basic/index.mdx#general-fields)
1111
- * for notes on _meta usage.
1112
- */
1113
- readonly _meta: v.OptionalSchema<v.LooseObjectSchema<{}, undefined>, undefined>;
1114
- }, undefined>;
1115
- /**
1116
- * Used by the client to get a prompt provided by the server.
1117
- */
1118
- export const GetPromptRequestSchema: v.ObjectSchema<{
1119
- readonly method: v.LiteralSchema<"prompts/get", undefined>;
1120
- readonly params: v.ObjectSchema<{
1121
- /**
1122
- * The name of the prompt or prompt template.
1123
- */
1124
- readonly name: v.StringSchema<undefined>;
1125
- /**
1126
- * Arguments to use for templating the prompt.
1127
- */
1128
- readonly arguments: v.OptionalSchema<v.RecordSchema<v.StringSchema<undefined>, v.StringSchema<undefined>, undefined>, undefined>;
1129
- readonly _meta: v.OptionalSchema<v.LooseObjectSchema<{
1130
- /**
1131
- * If specified, the caller is requesting out-of-band progress notifications for this request (as represented by notifications/progress). The value of this parameter is an opaque token that will be attached to any subsequent notifications. The receiver is not obligated to provide these notifications.
1132
- */
1133
- readonly progressToken: v.OptionalSchema<v.UnionSchema<[v.StringSchema<undefined>, v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>]>], undefined>, undefined>;
1134
- }, undefined>, undefined>;
1135
- }, undefined>;
1136
- }, undefined>;
1137
- /**
1138
- * Text provided to or from an LLM.
1139
- */
1140
- export const TextContentSchema: v.ObjectSchema<{
1141
- readonly type: v.LiteralSchema<"text", undefined>;
1142
- /**
1143
- * The text content of the message.
1144
- */
1145
- readonly text: v.StringSchema<undefined>;
1146
- /**
1147
- * See [MCP specification](https://github.com/modelcontextprotocol/modelcontextprotocol/blob/47339c03c143bb4ec01a26e721a1b8fe66634ebe/docs/specification/draft/basic/index.mdx#general-fields)
1148
- * for notes on _meta usage.
1149
- */
1150
- readonly _meta: v.OptionalSchema<v.ObjectSchema<{}, undefined>, undefined>;
1151
- }, undefined>;
1152
- /**
1153
- * An image provided to or from an LLM.
1154
- */
1155
- export const ImageContentSchema: v.ObjectSchema<{
1156
- readonly type: v.LiteralSchema<"image", undefined>;
1157
- /**
1158
- * The base64-encoded image data.
1159
- */
1160
- readonly data: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.Base64Action<string, undefined>]>;
1161
- /**
1162
- * The MIME type of the image. Different providers may support different image types.
1163
- */
1164
- readonly mimeType: v.StringSchema<undefined>;
1165
- /**
1166
- * See [MCP specification](https://github.com/modelcontextprotocol/modelcontextprotocol/blob/47339c03c143bb4ec01a26e721a1b8fe66634ebe/docs/specification/draft/basic/index.mdx#general-fields)
1167
- * for notes on _meta usage.
1168
- */
1169
- readonly _meta: v.OptionalSchema<v.ObjectSchema<{}, undefined>, undefined>;
1170
- }, undefined>;
1171
- /**
1172
- * An Audio provided to or from an LLM.
1173
- */
1174
- export const AudioContentSchema: v.ObjectSchema<{
1175
- readonly type: v.LiteralSchema<"audio", undefined>;
1176
- /**
1177
- * The base64-encoded audio data.
1178
- */
1179
- readonly data: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.Base64Action<string, undefined>]>;
1180
- /**
1181
- * The MIME type of the audio. Different providers may support different audio types.
1182
- */
1183
- readonly mimeType: v.StringSchema<undefined>;
1184
- /**
1185
- * See [MCP specification](https://github.com/modelcontextprotocol/modelcontextprotocol/blob/47339c03c143bb4ec01a26e721a1b8fe66634ebe/docs/specification/draft/basic/index.mdx#general-fields)
1186
- * for notes on _meta usage.
1187
- */
1188
- readonly _meta: v.OptionalSchema<v.ObjectSchema<{}, undefined>, undefined>;
1189
- }, undefined>;
1190
- /**
1191
- * The contents of a resource, embedded into a prompt or tool call result.
1192
- */
1193
- export const EmbeddedResourceSchema: v.ObjectSchema<{
1194
- readonly type: v.LiteralSchema<"resource", undefined>;
1195
- readonly resource: v.UnionSchema<[v.ObjectSchema<{
1196
- /**
1197
- * The text of the item. This must only be set if the item can actually be represented as text (not binary data).
1198
- */
1199
- readonly text: v.StringSchema<undefined>;
1200
- /**
1201
- * The URI of this resource.
1202
- */
1203
- readonly uri: v.StringSchema<undefined>;
1204
- /**
1205
- * The MIME type of this resource, if known.
1206
- */
1207
- readonly mimeType: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
1208
- /**
1209
- * See [MCP specification](https://github.com/modelcontextprotocol/modelcontextprotocol/blob/47339c03c143bb4ec01a26e721a1b8fe66634ebe/docs/specification/draft/basic/index.mdx#general-fields)
1210
- * for notes on _meta usage.
1211
- */
1212
- readonly _meta: v.OptionalSchema<v.ObjectSchema<{}, undefined>, undefined>;
1213
- }, undefined>, v.ObjectSchema<{
1214
- /**
1215
- * A base64-encoded string representing the binary data of the item.
1216
- */
1217
- readonly blob: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.Base64Action<string, undefined>]>;
1218
- /**
1219
- * The URI of this resource.
1220
- */
1221
- readonly uri: v.StringSchema<undefined>;
1222
- /**
1223
- * The MIME type of this resource, if known.
1224
- */
1225
- readonly mimeType: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
1226
- /**
1227
- * See [MCP specification](https://github.com/modelcontextprotocol/modelcontextprotocol/blob/47339c03c143bb4ec01a26e721a1b8fe66634ebe/docs/specification/draft/basic/index.mdx#general-fields)
1228
- * for notes on _meta usage.
1229
- */
1230
- readonly _meta: v.OptionalSchema<v.ObjectSchema<{}, undefined>, undefined>;
1231
- }, undefined>], undefined>;
1232
- /**
1233
- * See [MCP specification](https://github.com/modelcontextprotocol/modelcontextprotocol/blob/47339c03c143bb4ec01a26e721a1b8fe66634ebe/docs/specification/draft/basic/index.mdx#general-fields)
1234
- * for notes on _meta usage.
1235
- */
1236
- readonly _meta: v.OptionalSchema<v.ObjectSchema<{}, undefined>, undefined>;
1237
- }, undefined>;
1238
- /**
1239
- * A resource that the server is capable of reading, included in a prompt or tool call result.
1240
- *
1241
- * Note: resource links returned by tools are not guaranteed to appear in the results of `resources/list` requests.
1242
- */
1243
- export const ResourceLinkSchema: v.ObjectSchema<{
1244
- readonly type: v.LiteralSchema<"resource_link", undefined>;
1245
- /**
1246
- * The URI of this resource.
1247
- */
1248
- readonly uri: v.StringSchema<undefined>;
1249
- /**
1250
- * A description of what this resource represents.
1251
- *
1252
- * This can be used by clients to improve the LLM's understanding of available resources. It can be thought of like a "hint" to the model.
1253
- */
1254
- readonly description: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
1255
- /**
1256
- * The MIME type of this resource, if known.
1257
- */
1258
- readonly mimeType: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
1259
- /**
1260
- * See [MCP specification](https://github.com/modelcontextprotocol/modelcontextprotocol/blob/47339c03c143bb4ec01a26e721a1b8fe66634ebe/docs/specification/draft/basic/index.mdx#general-fields)
1261
- * for notes on _meta usage.
1262
- */
1263
- readonly _meta: v.OptionalSchema<v.ObjectSchema<{}, undefined>, undefined>;
1264
- /** Intended for programmatic or logical use, but used as a display name in past specs or fallback */
1265
- readonly name: v.StringSchema<undefined>;
1266
- /**
1267
- * Intended for UI and end-user contexts — optimized to be human-readable and easily understood,
1268
- * even by those unfamiliar with domain-specific terminology.
1269
- *
1270
- * If not provided, the name should be used for display (except for Tool,
1271
- * where `annotations.title` should be given precedence over using `name`,
1272
- * if present).
1273
- */
1274
- readonly title: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
1275
- }, undefined>;
1276
- /**
1277
- * A content block that can be used in prompts and tool results.
1278
- */
1279
- export const ContentBlockSchema: v.UnionSchema<[v.ObjectSchema<{
1280
- readonly type: v.LiteralSchema<"text", undefined>;
1281
- /**
1282
- * The text content of the message.
1283
- */
1284
- readonly text: v.StringSchema<undefined>;
1285
- /**
1286
- * See [MCP specification](https://github.com/modelcontextprotocol/modelcontextprotocol/blob/47339c03c143bb4ec01a26e721a1b8fe66634ebe/docs/specification/draft/basic/index.mdx#general-fields)
1287
- * for notes on _meta usage.
1288
- */
1289
- readonly _meta: v.OptionalSchema<v.ObjectSchema<{}, undefined>, undefined>;
1290
- }, undefined>, v.ObjectSchema<{
1291
- readonly type: v.LiteralSchema<"image", undefined>;
1292
- /**
1293
- * The base64-encoded image data.
1294
- */
1295
- readonly data: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.Base64Action<string, undefined>]>;
1296
- /**
1297
- * The MIME type of the image. Different providers may support different image types.
1298
- */
1299
- readonly mimeType: v.StringSchema<undefined>;
1300
- /**
1301
- * See [MCP specification](https://github.com/modelcontextprotocol/modelcontextprotocol/blob/47339c03c143bb4ec01a26e721a1b8fe66634ebe/docs/specification/draft/basic/index.mdx#general-fields)
1302
- * for notes on _meta usage.
1303
- */
1304
- readonly _meta: v.OptionalSchema<v.ObjectSchema<{}, undefined>, undefined>;
1305
- }, undefined>, v.ObjectSchema<{
1306
- readonly type: v.LiteralSchema<"audio", undefined>;
1307
- /**
1308
- * The base64-encoded audio data.
1309
- */
1310
- readonly data: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.Base64Action<string, undefined>]>;
1311
- /**
1312
- * The MIME type of the audio. Different providers may support different audio types.
1313
- */
1314
- readonly mimeType: v.StringSchema<undefined>;
1315
- /**
1316
- * See [MCP specification](https://github.com/modelcontextprotocol/modelcontextprotocol/blob/47339c03c143bb4ec01a26e721a1b8fe66634ebe/docs/specification/draft/basic/index.mdx#general-fields)
1317
- * for notes on _meta usage.
1318
- */
1319
- readonly _meta: v.OptionalSchema<v.ObjectSchema<{}, undefined>, undefined>;
1320
- }, undefined>, v.ObjectSchema<{
1321
- readonly type: v.LiteralSchema<"resource_link", undefined>;
1322
- /**
1323
- * The URI of this resource.
1324
- */
1325
- readonly uri: v.StringSchema<undefined>;
1326
- /**
1327
- * A description of what this resource represents.
1328
- *
1329
- * This can be used by clients to improve the LLM's understanding of available resources. It can be thought of like a "hint" to the model.
1330
- */
1331
- readonly description: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
1332
- /**
1333
- * The MIME type of this resource, if known.
1334
- */
1335
- readonly mimeType: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
1336
- /**
1337
- * See [MCP specification](https://github.com/modelcontextprotocol/modelcontextprotocol/blob/47339c03c143bb4ec01a26e721a1b8fe66634ebe/docs/specification/draft/basic/index.mdx#general-fields)
1338
- * for notes on _meta usage.
1339
- */
1340
- readonly _meta: v.OptionalSchema<v.ObjectSchema<{}, undefined>, undefined>;
1341
- /** Intended for programmatic or logical use, but used as a display name in past specs or fallback */
1342
- readonly name: v.StringSchema<undefined>;
1343
- /**
1344
- * Intended for UI and end-user contexts — optimized to be human-readable and easily understood,
1345
- * even by those unfamiliar with domain-specific terminology.
1346
- *
1347
- * If not provided, the name should be used for display (except for Tool,
1348
- * where `annotations.title` should be given precedence over using `name`,
1349
- * if present).
1350
- */
1351
- readonly title: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
1352
- }, undefined>, v.ObjectSchema<{
1353
- readonly type: v.LiteralSchema<"resource", undefined>;
1354
- readonly resource: v.UnionSchema<[v.ObjectSchema<{
1355
- /**
1356
- * The text of the item. This must only be set if the item can actually be represented as text (not binary data).
1357
- */
1358
- readonly text: v.StringSchema<undefined>;
1359
- /**
1360
- * The URI of this resource.
1361
- */
1362
- readonly uri: v.StringSchema<undefined>;
1363
- /**
1364
- * The MIME type of this resource, if known.
1365
- */
1366
- readonly mimeType: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
1367
- /**
1368
- * See [MCP specification](https://github.com/modelcontextprotocol/modelcontextprotocol/blob/47339c03c143bb4ec01a26e721a1b8fe66634ebe/docs/specification/draft/basic/index.mdx#general-fields)
1369
- * for notes on _meta usage.
1370
- */
1371
- readonly _meta: v.OptionalSchema<v.ObjectSchema<{}, undefined>, undefined>;
1372
- }, undefined>, v.ObjectSchema<{
1373
- /**
1374
- * A base64-encoded string representing the binary data of the item.
1375
- */
1376
- readonly blob: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.Base64Action<string, undefined>]>;
1377
- /**
1378
- * The URI of this resource.
1379
- */
1380
- readonly uri: v.StringSchema<undefined>;
1381
- /**
1382
- * The MIME type of this resource, if known.
1383
- */
1384
- readonly mimeType: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
1385
- /**
1386
- * See [MCP specification](https://github.com/modelcontextprotocol/modelcontextprotocol/blob/47339c03c143bb4ec01a26e721a1b8fe66634ebe/docs/specification/draft/basic/index.mdx#general-fields)
1387
- * for notes on _meta usage.
1388
- */
1389
- readonly _meta: v.OptionalSchema<v.ObjectSchema<{}, undefined>, undefined>;
1390
- }, undefined>], undefined>;
1391
- /**
1392
- * See [MCP specification](https://github.com/modelcontextprotocol/modelcontextprotocol/blob/47339c03c143bb4ec01a26e721a1b8fe66634ebe/docs/specification/draft/basic/index.mdx#general-fields)
1393
- * for notes on _meta usage.
1394
- */
1395
- readonly _meta: v.OptionalSchema<v.ObjectSchema<{}, undefined>, undefined>;
1396
- }, undefined>], undefined>;
1397
- /**
1398
- * Describes a message returned as part of a prompt.
1399
- */
1400
- export const PromptMessageSchema: v.ObjectSchema<{
1401
- readonly role: v.PicklistSchema<["user", "assistant"], undefined>;
1402
- readonly content: v.UnionSchema<[v.ObjectSchema<{
1403
- readonly type: v.LiteralSchema<"text", undefined>;
1404
- /**
1405
- * The text content of the message.
1406
- */
1407
- readonly text: v.StringSchema<undefined>;
1408
- /**
1409
- * See [MCP specification](https://github.com/modelcontextprotocol/modelcontextprotocol/blob/47339c03c143bb4ec01a26e721a1b8fe66634ebe/docs/specification/draft/basic/index.mdx#general-fields)
1410
- * for notes on _meta usage.
1411
- */
1412
- readonly _meta: v.OptionalSchema<v.ObjectSchema<{}, undefined>, undefined>;
1413
- }, undefined>, v.ObjectSchema<{
1414
- readonly type: v.LiteralSchema<"image", undefined>;
1415
- /**
1416
- * The base64-encoded image data.
1417
- */
1418
- readonly data: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.Base64Action<string, undefined>]>;
1419
- /**
1420
- * The MIME type of the image. Different providers may support different image types.
1421
- */
1422
- readonly mimeType: v.StringSchema<undefined>;
1423
- /**
1424
- * See [MCP specification](https://github.com/modelcontextprotocol/modelcontextprotocol/blob/47339c03c143bb4ec01a26e721a1b8fe66634ebe/docs/specification/draft/basic/index.mdx#general-fields)
1425
- * for notes on _meta usage.
1426
- */
1427
- readonly _meta: v.OptionalSchema<v.ObjectSchema<{}, undefined>, undefined>;
1428
- }, undefined>, v.ObjectSchema<{
1429
- readonly type: v.LiteralSchema<"audio", undefined>;
1430
- /**
1431
- * The base64-encoded audio data.
1432
- */
1433
- readonly data: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.Base64Action<string, undefined>]>;
1434
- /**
1435
- * The MIME type of the audio. Different providers may support different audio types.
1436
- */
1437
- readonly mimeType: v.StringSchema<undefined>;
1438
- /**
1439
- * See [MCP specification](https://github.com/modelcontextprotocol/modelcontextprotocol/blob/47339c03c143bb4ec01a26e721a1b8fe66634ebe/docs/specification/draft/basic/index.mdx#general-fields)
1440
- * for notes on _meta usage.
1441
- */
1442
- readonly _meta: v.OptionalSchema<v.ObjectSchema<{}, undefined>, undefined>;
1443
- }, undefined>, v.ObjectSchema<{
1444
- readonly type: v.LiteralSchema<"resource_link", undefined>;
1445
- /**
1446
- * The URI of this resource.
1447
- */
1448
- readonly uri: v.StringSchema<undefined>;
1449
- /**
1450
- * A description of what this resource represents.
1451
- *
1452
- * This can be used by clients to improve the LLM's understanding of available resources. It can be thought of like a "hint" to the model.
1453
- */
1454
- readonly description: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
1455
- /**
1456
- * The MIME type of this resource, if known.
1457
- */
1458
- readonly mimeType: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
1459
- /**
1460
- * See [MCP specification](https://github.com/modelcontextprotocol/modelcontextprotocol/blob/47339c03c143bb4ec01a26e721a1b8fe66634ebe/docs/specification/draft/basic/index.mdx#general-fields)
1461
- * for notes on _meta usage.
1462
- */
1463
- readonly _meta: v.OptionalSchema<v.ObjectSchema<{}, undefined>, undefined>;
1464
- /** Intended for programmatic or logical use, but used as a display name in past specs or fallback */
1465
- readonly name: v.StringSchema<undefined>;
1466
- /**
1467
- * Intended for UI and end-user contexts — optimized to be human-readable and easily understood,
1468
- * even by those unfamiliar with domain-specific terminology.
1469
- *
1470
- * If not provided, the name should be used for display (except for Tool,
1471
- * where `annotations.title` should be given precedence over using `name`,
1472
- * if present).
1473
- */
1474
- readonly title: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
1475
- }, undefined>, v.ObjectSchema<{
1476
- readonly type: v.LiteralSchema<"resource", undefined>;
1477
- readonly resource: v.UnionSchema<[v.ObjectSchema<{
1478
- /**
1479
- * The text of the item. This must only be set if the item can actually be represented as text (not binary data).
1480
- */
1481
- readonly text: v.StringSchema<undefined>;
1482
- /**
1483
- * The URI of this resource.
1484
- */
1485
- readonly uri: v.StringSchema<undefined>;
1486
- /**
1487
- * The MIME type of this resource, if known.
1488
- */
1489
- readonly mimeType: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
1490
- /**
1491
- * See [MCP specification](https://github.com/modelcontextprotocol/modelcontextprotocol/blob/47339c03c143bb4ec01a26e721a1b8fe66634ebe/docs/specification/draft/basic/index.mdx#general-fields)
1492
- * for notes on _meta usage.
1493
- */
1494
- readonly _meta: v.OptionalSchema<v.ObjectSchema<{}, undefined>, undefined>;
1495
- }, undefined>, v.ObjectSchema<{
1496
- /**
1497
- * A base64-encoded string representing the binary data of the item.
1498
- */
1499
- readonly blob: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.Base64Action<string, undefined>]>;
1500
- /**
1501
- * The URI of this resource.
1502
- */
1503
- readonly uri: v.StringSchema<undefined>;
1504
- /**
1505
- * The MIME type of this resource, if known.
1506
- */
1507
- readonly mimeType: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
1508
- /**
1509
- * See [MCP specification](https://github.com/modelcontextprotocol/modelcontextprotocol/blob/47339c03c143bb4ec01a26e721a1b8fe66634ebe/docs/specification/draft/basic/index.mdx#general-fields)
1510
- * for notes on _meta usage.
1511
- */
1512
- readonly _meta: v.OptionalSchema<v.ObjectSchema<{}, undefined>, undefined>;
1513
- }, undefined>], undefined>;
1514
- /**
1515
- * See [MCP specification](https://github.com/modelcontextprotocol/modelcontextprotocol/blob/47339c03c143bb4ec01a26e721a1b8fe66634ebe/docs/specification/draft/basic/index.mdx#general-fields)
1516
- * for notes on _meta usage.
1517
- */
1518
- readonly _meta: v.OptionalSchema<v.ObjectSchema<{}, undefined>, undefined>;
1519
- }, undefined>], undefined>;
1520
- }, undefined>;
1521
- /**
1522
- * The server's response to a prompts/get request from the client.
1523
- */
1524
- export const GetPromptResultSchema: v.ObjectSchema<{
1525
- /**
1526
- * An optional description for the prompt.
1527
- */
1528
- readonly description: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
1529
- readonly messages: v.ArraySchema<v.ObjectSchema<{
1530
- readonly role: v.PicklistSchema<["user", "assistant"], undefined>;
1531
- readonly content: v.UnionSchema<[v.ObjectSchema<{
1532
- readonly type: v.LiteralSchema<"text", undefined>;
1533
- /**
1534
- * The text content of the message.
1535
- */
1536
- readonly text: v.StringSchema<undefined>;
1537
- /**
1538
- * See [MCP specification](https://github.com/modelcontextprotocol/modelcontextprotocol/blob/47339c03c143bb4ec01a26e721a1b8fe66634ebe/docs/specification/draft/basic/index.mdx#general-fields)
1539
- * for notes on _meta usage.
1540
- */
1541
- readonly _meta: v.OptionalSchema<v.ObjectSchema<{}, undefined>, undefined>;
1542
- }, undefined>, v.ObjectSchema<{
1543
- readonly type: v.LiteralSchema<"image", undefined>;
1544
- /**
1545
- * The base64-encoded image data.
1546
- */
1547
- readonly data: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.Base64Action<string, undefined>]>;
1548
- /**
1549
- * The MIME type of the image. Different providers may support different image types.
1550
- */
1551
- readonly mimeType: v.StringSchema<undefined>;
1552
- /**
1553
- * See [MCP specification](https://github.com/modelcontextprotocol/modelcontextprotocol/blob/47339c03c143bb4ec01a26e721a1b8fe66634ebe/docs/specification/draft/basic/index.mdx#general-fields)
1554
- * for notes on _meta usage.
1555
- */
1556
- readonly _meta: v.OptionalSchema<v.ObjectSchema<{}, undefined>, undefined>;
1557
- }, undefined>, v.ObjectSchema<{
1558
- readonly type: v.LiteralSchema<"audio", undefined>;
1559
- /**
1560
- * The base64-encoded audio data.
1561
- */
1562
- readonly data: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.Base64Action<string, undefined>]>;
1563
- /**
1564
- * The MIME type of the audio. Different providers may support different audio types.
1565
- */
1566
- readonly mimeType: v.StringSchema<undefined>;
1567
- /**
1568
- * See [MCP specification](https://github.com/modelcontextprotocol/modelcontextprotocol/blob/47339c03c143bb4ec01a26e721a1b8fe66634ebe/docs/specification/draft/basic/index.mdx#general-fields)
1569
- * for notes on _meta usage.
1570
- */
1571
- readonly _meta: v.OptionalSchema<v.ObjectSchema<{}, undefined>, undefined>;
1572
- }, undefined>, v.ObjectSchema<{
1573
- readonly type: v.LiteralSchema<"resource_link", undefined>;
1574
- /**
1575
- * The URI of this resource.
1576
- */
1577
- readonly uri: v.StringSchema<undefined>;
1578
- /**
1579
- * A description of what this resource represents.
1580
- *
1581
- * This can be used by clients to improve the LLM's understanding of available resources. It can be thought of like a "hint" to the model.
1582
- */
1583
- readonly description: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
1584
- /**
1585
- * The MIME type of this resource, if known.
1586
- */
1587
- readonly mimeType: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
1588
- /**
1589
- * See [MCP specification](https://github.com/modelcontextprotocol/modelcontextprotocol/blob/47339c03c143bb4ec01a26e721a1b8fe66634ebe/docs/specification/draft/basic/index.mdx#general-fields)
1590
- * for notes on _meta usage.
1591
- */
1592
- readonly _meta: v.OptionalSchema<v.ObjectSchema<{}, undefined>, undefined>;
1593
- /** Intended for programmatic or logical use, but used as a display name in past specs or fallback */
1594
- readonly name: v.StringSchema<undefined>;
1595
- /**
1596
- * Intended for UI and end-user contexts — optimized to be human-readable and easily understood,
1597
- * even by those unfamiliar with domain-specific terminology.
1598
- *
1599
- * If not provided, the name should be used for display (except for Tool,
1600
- * where `annotations.title` should be given precedence over using `name`,
1601
- * if present).
1602
- */
1603
- readonly title: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
1604
- }, undefined>, v.ObjectSchema<{
1605
- readonly type: v.LiteralSchema<"resource", undefined>;
1606
- readonly resource: v.UnionSchema<[v.ObjectSchema<{
1607
- /**
1608
- * The text of the item. This must only be set if the item can actually be represented as text (not binary data).
1609
- */
1610
- readonly text: v.StringSchema<undefined>;
1611
- /**
1612
- * The URI of this resource.
1613
- */
1614
- readonly uri: v.StringSchema<undefined>;
1615
- /**
1616
- * The MIME type of this resource, if known.
1617
- */
1618
- readonly mimeType: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
1619
- /**
1620
- * See [MCP specification](https://github.com/modelcontextprotocol/modelcontextprotocol/blob/47339c03c143bb4ec01a26e721a1b8fe66634ebe/docs/specification/draft/basic/index.mdx#general-fields)
1621
- * for notes on _meta usage.
1622
- */
1623
- readonly _meta: v.OptionalSchema<v.ObjectSchema<{}, undefined>, undefined>;
1624
- }, undefined>, v.ObjectSchema<{
1625
- /**
1626
- * A base64-encoded string representing the binary data of the item.
1627
- */
1628
- readonly blob: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.Base64Action<string, undefined>]>;
1629
- /**
1630
- * The URI of this resource.
1631
- */
1632
- readonly uri: v.StringSchema<undefined>;
1633
- /**
1634
- * The MIME type of this resource, if known.
1635
- */
1636
- readonly mimeType: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
1637
- /**
1638
- * See [MCP specification](https://github.com/modelcontextprotocol/modelcontextprotocol/blob/47339c03c143bb4ec01a26e721a1b8fe66634ebe/docs/specification/draft/basic/index.mdx#general-fields)
1639
- * for notes on _meta usage.
1640
- */
1641
- readonly _meta: v.OptionalSchema<v.ObjectSchema<{}, undefined>, undefined>;
1642
- }, undefined>], undefined>;
1643
- /**
1644
- * See [MCP specification](https://github.com/modelcontextprotocol/modelcontextprotocol/blob/47339c03c143bb4ec01a26e721a1b8fe66634ebe/docs/specification/draft/basic/index.mdx#general-fields)
1645
- * for notes on _meta usage.
1646
- */
1647
- readonly _meta: v.OptionalSchema<v.ObjectSchema<{}, undefined>, undefined>;
1648
- }, undefined>], undefined>;
1649
- }, undefined>, undefined>;
1650
- /**
1651
- * See [MCP specification](https://github.com/modelcontextprotocol/modelcontextprotocol/blob/47339c03c143bb4ec01a26e721a1b8fe66634ebe/docs/specification/draft/basic/index.mdx#general-fields)
1652
- * for notes on _meta usage.
1653
- */
1654
- readonly _meta: v.OptionalSchema<v.LooseObjectSchema<{}, undefined>, undefined>;
1655
- }, undefined>;
1656
- /**
1657
- * An optional notification from the server to the client, informing it that the list of prompts it offers has changed. This may be issued by servers without any previous subscription from the client.
1658
- */
1659
- export const PromptListChangedNotificationSchema: v.ObjectSchema<{
1660
- readonly method: v.LiteralSchema<"notifications/prompts/list_changed", undefined>;
1661
- readonly params: v.OptionalSchema<v.LooseObjectSchema<{
1662
- /**
1663
- * See [MCP specification](https://github.com/modelcontextprotocol/modelcontextprotocol/blob/47339c03c143bb4ec01a26e721a1b8fe66634ebe/docs/specification/draft/basic/index.mdx#general-fields)
1664
- * for notes on _meta usage.
1665
- */
1666
- readonly _meta: v.OptionalSchema<v.LooseObjectSchema<{}, undefined>, undefined>;
1667
- }, undefined>, undefined>;
1668
- }, undefined>;
1669
- /**
1670
- * Additional properties describing a Tool to clients.
1671
- *
1672
- * NOTE: all properties in ToolAnnotations are **hints**.
1673
- * They are not guaranteed to provide a faithful description of
1674
- * tool behavior (including descriptive properties like `title`).
1675
- *
1676
- * Clients should never make tool use decisions based on ToolAnnotations
1677
- * received from untrusted servers.
1678
- */
1679
- export const ToolAnnotationsSchema: v.ObjectSchema<{
1680
- /**
1681
- * A human-readable title for the tool.
1682
- */
1683
- readonly title: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
1684
- /**
1685
- * If true, the tool does not modify its environment.
1686
- *
1687
- * Default: false
1688
- */
1689
- readonly readOnlyHint: v.OptionalSchema<v.BooleanSchema<undefined>, undefined>;
1690
- /**
1691
- * If true, the tool may perform destructive updates to its environment.
1692
- * If false, the tool performs only additive updates.
1693
- *
1694
- * (This property is meaningful only when `readOnlyHint == false`)
1695
- *
1696
- * Default: true
1697
- */
1698
- readonly destructiveHint: v.OptionalSchema<v.BooleanSchema<undefined>, undefined>;
1699
- /**
1700
- * If true, calling the tool repeatedly with the same arguments
1701
- * will have no additional effect on the its environment.
1702
- *
1703
- * (This property is meaningful only when `readOnlyHint == false`)
1704
- *
1705
- * Default: false
1706
- */
1707
- readonly idempotentHint: v.OptionalSchema<v.BooleanSchema<undefined>, undefined>;
1708
- /**
1709
- * If true, this tool may interact with an "open world" of external
1710
- * entities. If false, the tool's domain of interaction is closed.
1711
- * For example, the world of a web search tool is open, whereas that
1712
- * of a memory tool is not.
1713
- *
1714
- * Default: true
1715
- */
1716
- readonly openWorldHint: v.OptionalSchema<v.BooleanSchema<undefined>, undefined>;
1717
- }, undefined>;
1718
- /**
1719
- * Definition for a tool the client can call.
1720
- */
1721
- export const ToolSchema: v.ObjectSchema<{
1722
- /**
1723
- * A human-readable description of the tool.
1724
- */
1725
- readonly description: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
1726
- /**
1727
- * A JSON Schema object defining the expected parameters for the tool.
1728
- */
1729
- readonly inputSchema: v.ObjectSchema<{
1730
- readonly type: v.LiteralSchema<"object", undefined>;
1731
- readonly properties: v.OptionalSchema<v.ObjectSchema<{}, undefined>, undefined>;
1732
- readonly required: v.OptionalSchema<v.ArraySchema<v.StringSchema<undefined>, undefined>, undefined>;
1733
- }, undefined>;
1734
- /**
1735
- * An optional JSON Schema object defining the structure of the tool's output returned in
1736
- * the structuredContent field of a CallToolResult.
1737
- */
1738
- readonly outputSchema: v.OptionalSchema<v.ObjectSchema<{
1739
- readonly type: v.LiteralSchema<"object", undefined>;
1740
- readonly properties: v.OptionalSchema<v.ObjectSchema<{}, undefined>, undefined>;
1741
- readonly required: v.OptionalSchema<v.ArraySchema<v.StringSchema<undefined>, undefined>, undefined>;
1742
- }, undefined>, undefined>;
1743
- /**
1744
- * Optional additional tool information.
1745
- */
1746
- readonly annotations: v.OptionalSchema<v.ObjectSchema<{
1747
- /**
1748
- * A human-readable title for the tool.
1749
- */
1750
- readonly title: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
1751
- /**
1752
- * If true, the tool does not modify its environment.
1753
- *
1754
- * Default: false
1755
- */
1756
- readonly readOnlyHint: v.OptionalSchema<v.BooleanSchema<undefined>, undefined>;
1757
- /**
1758
- * If true, the tool may perform destructive updates to its environment.
1759
- * If false, the tool performs only additive updates.
1760
- *
1761
- * (This property is meaningful only when `readOnlyHint == false`)
1762
- *
1763
- * Default: true
1764
- */
1765
- readonly destructiveHint: v.OptionalSchema<v.BooleanSchema<undefined>, undefined>;
1766
- /**
1767
- * If true, calling the tool repeatedly with the same arguments
1768
- * will have no additional effect on the its environment.
1769
- *
1770
- * (This property is meaningful only when `readOnlyHint == false`)
1771
- *
1772
- * Default: false
1773
- */
1774
- readonly idempotentHint: v.OptionalSchema<v.BooleanSchema<undefined>, undefined>;
1775
- /**
1776
- * If true, this tool may interact with an "open world" of external
1777
- * entities. If false, the tool's domain of interaction is closed.
1778
- * For example, the world of a web search tool is open, whereas that
1779
- * of a memory tool is not.
1780
- *
1781
- * Default: true
1782
- */
1783
- readonly openWorldHint: v.OptionalSchema<v.BooleanSchema<undefined>, undefined>;
1784
- }, undefined>, undefined>;
1785
- /**
1786
- * See [MCP specification](https://github.com/modelcontextprotocol/modelcontextprotocol/blob/47339c03c143bb4ec01a26e721a1b8fe66634ebe/docs/specification/draft/basic/index.mdx#general-fields)
1787
- * for notes on _meta usage.
1788
- */
1789
- readonly _meta: v.OptionalSchema<v.ObjectSchema<{}, undefined>, undefined>;
1790
- /** Intended for programmatic or logical use, but used as a display name in past specs or fallback */
1791
- readonly name: v.StringSchema<undefined>;
1792
- /**
1793
- * Intended for UI and end-user contexts — optimized to be human-readable and easily understood,
1794
- * even by those unfamiliar with domain-specific terminology.
1795
- *
1796
- * If not provided, the name should be used for display (except for Tool,
1797
- * where `annotations.title` should be given precedence over using `name`,
1798
- * if present).
1799
- */
1800
- readonly title: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
1801
- }, undefined>;
1802
- /**
1803
- * Sent from the client to request a list of tools the server has.
1804
- */
1805
- export const ListToolsRequestSchema: v.ObjectSchema<{
1806
- readonly method: v.LiteralSchema<"tools/list", undefined>;
1807
- readonly params: v.OptionalSchema<v.ObjectSchema<{
1808
- /**
1809
- * An opaque token representing the current pagination position.
1810
- * If provided, the server should return results starting after this cursor.
1811
- */
1812
- readonly cursor: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
1813
- readonly _meta: v.OptionalSchema<v.LooseObjectSchema<{
1814
- /**
1815
- * If specified, the caller is requesting out-of-band progress notifications for this request (as represented by notifications/progress). The value of this parameter is an opaque token that will be attached to any subsequent notifications. The receiver is not obligated to provide these notifications.
1816
- */
1817
- readonly progressToken: v.OptionalSchema<v.UnionSchema<[v.StringSchema<undefined>, v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>]>], undefined>, undefined>;
1818
- }, undefined>, undefined>;
1819
- }, undefined>, undefined>;
1820
- }, undefined>;
1821
- /**
1822
- * The server's response to a tools/list request from the client.
1823
- */
1824
- export const ListToolsResultSchema: v.ObjectSchema<{
1825
- readonly tools: v.ArraySchema<v.ObjectSchema<{
1826
- /**
1827
- * A human-readable description of the tool.
1828
- */
1829
- readonly description: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
1830
- /**
1831
- * A JSON Schema object defining the expected parameters for the tool.
1832
- */
1833
- readonly inputSchema: v.ObjectSchema<{
1834
- readonly type: v.LiteralSchema<"object", undefined>;
1835
- readonly properties: v.OptionalSchema<v.ObjectSchema<{}, undefined>, undefined>;
1836
- readonly required: v.OptionalSchema<v.ArraySchema<v.StringSchema<undefined>, undefined>, undefined>;
1837
- }, undefined>;
1838
- /**
1839
- * An optional JSON Schema object defining the structure of the tool's output returned in
1840
- * the structuredContent field of a CallToolResult.
1841
- */
1842
- readonly outputSchema: v.OptionalSchema<v.ObjectSchema<{
1843
- readonly type: v.LiteralSchema<"object", undefined>;
1844
- readonly properties: v.OptionalSchema<v.ObjectSchema<{}, undefined>, undefined>;
1845
- readonly required: v.OptionalSchema<v.ArraySchema<v.StringSchema<undefined>, undefined>, undefined>;
1846
- }, undefined>, undefined>;
1847
- /**
1848
- * Optional additional tool information.
1849
- */
1850
- readonly annotations: v.OptionalSchema<v.ObjectSchema<{
1851
- /**
1852
- * A human-readable title for the tool.
1853
- */
1854
- readonly title: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
1855
- /**
1856
- * If true, the tool does not modify its environment.
1857
- *
1858
- * Default: false
1859
- */
1860
- readonly readOnlyHint: v.OptionalSchema<v.BooleanSchema<undefined>, undefined>;
1861
- /**
1862
- * If true, the tool may perform destructive updates to its environment.
1863
- * If false, the tool performs only additive updates.
1864
- *
1865
- * (This property is meaningful only when `readOnlyHint == false`)
1866
- *
1867
- * Default: true
1868
- */
1869
- readonly destructiveHint: v.OptionalSchema<v.BooleanSchema<undefined>, undefined>;
1870
- /**
1871
- * If true, calling the tool repeatedly with the same arguments
1872
- * will have no additional effect on the its environment.
1873
- *
1874
- * (This property is meaningful only when `readOnlyHint == false`)
1875
- *
1876
- * Default: false
1877
- */
1878
- readonly idempotentHint: v.OptionalSchema<v.BooleanSchema<undefined>, undefined>;
1879
- /**
1880
- * If true, this tool may interact with an "open world" of external
1881
- * entities. If false, the tool's domain of interaction is closed.
1882
- * For example, the world of a web search tool is open, whereas that
1883
- * of a memory tool is not.
1884
- *
1885
- * Default: true
1886
- */
1887
- readonly openWorldHint: v.OptionalSchema<v.BooleanSchema<undefined>, undefined>;
1888
- }, undefined>, undefined>;
1889
- /**
1890
- * See [MCP specification](https://github.com/modelcontextprotocol/modelcontextprotocol/blob/47339c03c143bb4ec01a26e721a1b8fe66634ebe/docs/specification/draft/basic/index.mdx#general-fields)
1891
- * for notes on _meta usage.
1892
- */
1893
- readonly _meta: v.OptionalSchema<v.ObjectSchema<{}, undefined>, undefined>;
1894
- /** Intended for programmatic or logical use, but used as a display name in past specs or fallback */
1895
- readonly name: v.StringSchema<undefined>;
1896
- /**
1897
- * Intended for UI and end-user contexts — optimized to be human-readable and easily understood,
1898
- * even by those unfamiliar with domain-specific terminology.
1899
- *
1900
- * If not provided, the name should be used for display (except for Tool,
1901
- * where `annotations.title` should be given precedence over using `name`,
1902
- * if present).
1903
- */
1904
- readonly title: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
1905
- }, undefined>, undefined>;
1906
- /**
1907
- * An opaque token representing the pagination position after the last returned result.
1908
- * If present, there may be more results available.
1909
- */
1910
- readonly nextCursor: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
1911
- /**
1912
- * See [MCP specification](https://github.com/modelcontextprotocol/modelcontextprotocol/blob/47339c03c143bb4ec01a26e721a1b8fe66634ebe/docs/specification/draft/basic/index.mdx#general-fields)
1913
- * for notes on _meta usage.
1914
- */
1915
- readonly _meta: v.OptionalSchema<v.LooseObjectSchema<{}, undefined>, undefined>;
1916
- }, undefined>;
1917
- /**
1918
- * The server's response to a tool call.
1919
- */
1920
- export const CallToolResultSchema: v.ObjectSchema<{
1921
- /**
1922
- * A list of content objects that represent the result of the tool call.
1923
- *
1924
- * If the Tool does not define an outputSchema, this field MUST be present in the result.
1925
- * For backwards compatibility, this field is always present, but it may be empty.
1926
- */
1927
- readonly content: v.OptionalSchema<v.ArraySchema<v.UnionSchema<[v.ObjectSchema<{
1928
- readonly type: v.LiteralSchema<"text", undefined>;
1929
- /**
1930
- * The text content of the message.
1931
- */
1932
- readonly text: v.StringSchema<undefined>;
1933
- /**
1934
- * See [MCP specification](https://github.com/modelcontextprotocol/modelcontextprotocol/blob/47339c03c143bb4ec01a26e721a1b8fe66634ebe/docs/specification/draft/basic/index.mdx#general-fields)
1935
- * for notes on _meta usage.
1936
- */
1937
- readonly _meta: v.OptionalSchema<v.ObjectSchema<{}, undefined>, undefined>;
1938
- }, undefined>, v.ObjectSchema<{
1939
- readonly type: v.LiteralSchema<"image", undefined>;
1940
- /**
1941
- * The base64-encoded image data.
1942
- */
1943
- readonly data: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.Base64Action<string, undefined>]>;
1944
- /**
1945
- * The MIME type of the image. Different providers may support different image types.
1946
- */
1947
- readonly mimeType: v.StringSchema<undefined>;
1948
- /**
1949
- * See [MCP specification](https://github.com/modelcontextprotocol/modelcontextprotocol/blob/47339c03c143bb4ec01a26e721a1b8fe66634ebe/docs/specification/draft/basic/index.mdx#general-fields)
1950
- * for notes on _meta usage.
1951
- */
1952
- readonly _meta: v.OptionalSchema<v.ObjectSchema<{}, undefined>, undefined>;
1953
- }, undefined>, v.ObjectSchema<{
1954
- readonly type: v.LiteralSchema<"audio", undefined>;
1955
- /**
1956
- * The base64-encoded audio data.
1957
- */
1958
- readonly data: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.Base64Action<string, undefined>]>;
1959
- /**
1960
- * The MIME type of the audio. Different providers may support different audio types.
1961
- */
1962
- readonly mimeType: v.StringSchema<undefined>;
1963
- /**
1964
- * See [MCP specification](https://github.com/modelcontextprotocol/modelcontextprotocol/blob/47339c03c143bb4ec01a26e721a1b8fe66634ebe/docs/specification/draft/basic/index.mdx#general-fields)
1965
- * for notes on _meta usage.
1966
- */
1967
- readonly _meta: v.OptionalSchema<v.ObjectSchema<{}, undefined>, undefined>;
1968
- }, undefined>, v.ObjectSchema<{
1969
- readonly type: v.LiteralSchema<"resource_link", undefined>;
1970
- /**
1971
- * The URI of this resource.
1972
- */
1973
- readonly uri: v.StringSchema<undefined>;
1974
- /**
1975
- * A description of what this resource represents.
1976
- *
1977
- * This can be used by clients to improve the LLM's understanding of available resources. It can be thought of like a "hint" to the model.
1978
- */
1979
- readonly description: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
1980
- /**
1981
- * The MIME type of this resource, if known.
1982
- */
1983
- readonly mimeType: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
1984
- /**
1985
- * See [MCP specification](https://github.com/modelcontextprotocol/modelcontextprotocol/blob/47339c03c143bb4ec01a26e721a1b8fe66634ebe/docs/specification/draft/basic/index.mdx#general-fields)
1986
- * for notes on _meta usage.
1987
- */
1988
- readonly _meta: v.OptionalSchema<v.ObjectSchema<{}, undefined>, undefined>;
1989
- /** Intended for programmatic or logical use, but used as a display name in past specs or fallback */
1990
- readonly name: v.StringSchema<undefined>;
1991
- /**
1992
- * Intended for UI and end-user contexts — optimized to be human-readable and easily understood,
1993
- * even by those unfamiliar with domain-specific terminology.
1994
- *
1995
- * If not provided, the name should be used for display (except for Tool,
1996
- * where `annotations.title` should be given precedence over using `name`,
1997
- * if present).
1998
- */
1999
- readonly title: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
2000
- }, undefined>, v.ObjectSchema<{
2001
- readonly type: v.LiteralSchema<"resource", undefined>;
2002
- readonly resource: v.UnionSchema<[v.ObjectSchema<{
2003
- /**
2004
- * The text of the item. This must only be set if the item can actually be represented as text (not binary data).
2005
- */
2006
- readonly text: v.StringSchema<undefined>;
2007
- /**
2008
- * The URI of this resource.
2009
- */
2010
- readonly uri: v.StringSchema<undefined>;
2011
- /**
2012
- * The MIME type of this resource, if known.
2013
- */
2014
- readonly mimeType: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
2015
- /**
2016
- * See [MCP specification](https://github.com/modelcontextprotocol/modelcontextprotocol/blob/47339c03c143bb4ec01a26e721a1b8fe66634ebe/docs/specification/draft/basic/index.mdx#general-fields)
2017
- * for notes on _meta usage.
2018
- */
2019
- readonly _meta: v.OptionalSchema<v.ObjectSchema<{}, undefined>, undefined>;
2020
- }, undefined>, v.ObjectSchema<{
2021
- /**
2022
- * A base64-encoded string representing the binary data of the item.
2023
- */
2024
- readonly blob: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.Base64Action<string, undefined>]>;
2025
- /**
2026
- * The URI of this resource.
2027
- */
2028
- readonly uri: v.StringSchema<undefined>;
2029
- /**
2030
- * The MIME type of this resource, if known.
2031
- */
2032
- readonly mimeType: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
2033
- /**
2034
- * See [MCP specification](https://github.com/modelcontextprotocol/modelcontextprotocol/blob/47339c03c143bb4ec01a26e721a1b8fe66634ebe/docs/specification/draft/basic/index.mdx#general-fields)
2035
- * for notes on _meta usage.
2036
- */
2037
- readonly _meta: v.OptionalSchema<v.ObjectSchema<{}, undefined>, undefined>;
2038
- }, undefined>], undefined>;
2039
- /**
2040
- * See [MCP specification](https://github.com/modelcontextprotocol/modelcontextprotocol/blob/47339c03c143bb4ec01a26e721a1b8fe66634ebe/docs/specification/draft/basic/index.mdx#general-fields)
2041
- * for notes on _meta usage.
2042
- */
2043
- readonly _meta: v.OptionalSchema<v.ObjectSchema<{}, undefined>, undefined>;
2044
- }, undefined>], undefined>, undefined>, readonly []>;
2045
- /**
2046
- * An object containing structured tool output.
2047
- *
2048
- * If the Tool defines an outputSchema, this field MUST be present in the result, and contain a JSON object that matches the schema.
2049
- */
2050
- readonly structuredContent: v.OptionalSchema<v.LooseObjectSchema<{}, undefined>, undefined>;
2051
- /**
2052
- * Whether the tool call ended in an error.
2053
- *
2054
- * If not set, this is assumed to be false (the call was successful).
2055
- *
2056
- * Any errors that originate from the tool SHOULD be reported inside the result
2057
- * object, with `isError` set to true, _not_ as an MCP protocol-level error
2058
- * response. Otherwise, the LLM would not be able to see that an error occurred
2059
- * and self-correct.
2060
- *
2061
- * However, any errors in _finding_ the tool, an error indicating that the
2062
- * server does not support tool calls, or any other exceptional conditions,
2063
- * should be reported as an MCP error response.
2064
- */
2065
- readonly isError: v.OptionalSchema<v.BooleanSchema<undefined>, undefined>;
2066
- /**
2067
- * See [MCP specification](https://github.com/modelcontextprotocol/modelcontextprotocol/blob/47339c03c143bb4ec01a26e721a1b8fe66634ebe/docs/specification/draft/basic/index.mdx#general-fields)
2068
- * for notes on _meta usage.
2069
- */
2070
- readonly _meta: v.OptionalSchema<v.LooseObjectSchema<{}, undefined>, undefined>;
2071
- }, undefined>;
2072
- /**
2073
- * CallToolResultSchema extended with backwards compatibility to protocol version 2024-10-07.
2074
- */
2075
- export const CompatibilityCallToolResultSchema: v.UnionSchema<[v.ObjectSchema<{
2076
- /**
2077
- * A list of content objects that represent the result of the tool call.
2078
- *
2079
- * If the Tool does not define an outputSchema, this field MUST be present in the result.
2080
- * For backwards compatibility, this field is always present, but it may be empty.
2081
- */
2082
- readonly content: v.OptionalSchema<v.ArraySchema<v.UnionSchema<[v.ObjectSchema<{
2083
- readonly type: v.LiteralSchema<"text", undefined>;
2084
- /**
2085
- * The text content of the message.
2086
- */
2087
- readonly text: v.StringSchema<undefined>;
2088
- /**
2089
- * See [MCP specification](https://github.com/modelcontextprotocol/modelcontextprotocol/blob/47339c03c143bb4ec01a26e721a1b8fe66634ebe/docs/specification/draft/basic/index.mdx#general-fields)
2090
- * for notes on _meta usage.
2091
- */
2092
- readonly _meta: v.OptionalSchema<v.ObjectSchema<{}, undefined>, undefined>;
2093
- }, undefined>, v.ObjectSchema<{
2094
- readonly type: v.LiteralSchema<"image", undefined>;
2095
- /**
2096
- * The base64-encoded image data.
2097
- */
2098
- readonly data: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.Base64Action<string, undefined>]>;
2099
- /**
2100
- * The MIME type of the image. Different providers may support different image types.
2101
- */
2102
- readonly mimeType: v.StringSchema<undefined>;
2103
- /**
2104
- * See [MCP specification](https://github.com/modelcontextprotocol/modelcontextprotocol/blob/47339c03c143bb4ec01a26e721a1b8fe66634ebe/docs/specification/draft/basic/index.mdx#general-fields)
2105
- * for notes on _meta usage.
2106
- */
2107
- readonly _meta: v.OptionalSchema<v.ObjectSchema<{}, undefined>, undefined>;
2108
- }, undefined>, v.ObjectSchema<{
2109
- readonly type: v.LiteralSchema<"audio", undefined>;
2110
- /**
2111
- * The base64-encoded audio data.
2112
- */
2113
- readonly data: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.Base64Action<string, undefined>]>;
2114
- /**
2115
- * The MIME type of the audio. Different providers may support different audio types.
2116
- */
2117
- readonly mimeType: v.StringSchema<undefined>;
2118
- /**
2119
- * See [MCP specification](https://github.com/modelcontextprotocol/modelcontextprotocol/blob/47339c03c143bb4ec01a26e721a1b8fe66634ebe/docs/specification/draft/basic/index.mdx#general-fields)
2120
- * for notes on _meta usage.
2121
- */
2122
- readonly _meta: v.OptionalSchema<v.ObjectSchema<{}, undefined>, undefined>;
2123
- }, undefined>, v.ObjectSchema<{
2124
- readonly type: v.LiteralSchema<"resource_link", undefined>;
2125
- /**
2126
- * The URI of this resource.
2127
- */
2128
- readonly uri: v.StringSchema<undefined>;
2129
- /**
2130
- * A description of what this resource represents.
2131
- *
2132
- * This can be used by clients to improve the LLM's understanding of available resources. It can be thought of like a "hint" to the model.
2133
- */
2134
- readonly description: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
2135
- /**
2136
- * The MIME type of this resource, if known.
2137
- */
2138
- readonly mimeType: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
2139
- /**
2140
- * See [MCP specification](https://github.com/modelcontextprotocol/modelcontextprotocol/blob/47339c03c143bb4ec01a26e721a1b8fe66634ebe/docs/specification/draft/basic/index.mdx#general-fields)
2141
- * for notes on _meta usage.
2142
- */
2143
- readonly _meta: v.OptionalSchema<v.ObjectSchema<{}, undefined>, undefined>;
2144
- /** Intended for programmatic or logical use, but used as a display name in past specs or fallback */
2145
- readonly name: v.StringSchema<undefined>;
2146
- /**
2147
- * Intended for UI and end-user contexts — optimized to be human-readable and easily understood,
2148
- * even by those unfamiliar with domain-specific terminology.
2149
- *
2150
- * If not provided, the name should be used for display (except for Tool,
2151
- * where `annotations.title` should be given precedence over using `name`,
2152
- * if present).
2153
- */
2154
- readonly title: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
2155
- }, undefined>, v.ObjectSchema<{
2156
- readonly type: v.LiteralSchema<"resource", undefined>;
2157
- readonly resource: v.UnionSchema<[v.ObjectSchema<{
2158
- /**
2159
- * The text of the item. This must only be set if the item can actually be represented as text (not binary data).
2160
- */
2161
- readonly text: v.StringSchema<undefined>;
2162
- /**
2163
- * The URI of this resource.
2164
- */
2165
- readonly uri: v.StringSchema<undefined>;
2166
- /**
2167
- * The MIME type of this resource, if known.
2168
- */
2169
- readonly mimeType: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
2170
- /**
2171
- * See [MCP specification](https://github.com/modelcontextprotocol/modelcontextprotocol/blob/47339c03c143bb4ec01a26e721a1b8fe66634ebe/docs/specification/draft/basic/index.mdx#general-fields)
2172
- * for notes on _meta usage.
2173
- */
2174
- readonly _meta: v.OptionalSchema<v.ObjectSchema<{}, undefined>, undefined>;
2175
- }, undefined>, v.ObjectSchema<{
2176
- /**
2177
- * A base64-encoded string representing the binary data of the item.
2178
- */
2179
- readonly blob: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.Base64Action<string, undefined>]>;
2180
- /**
2181
- * The URI of this resource.
2182
- */
2183
- readonly uri: v.StringSchema<undefined>;
2184
- /**
2185
- * The MIME type of this resource, if known.
2186
- */
2187
- readonly mimeType: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
2188
- /**
2189
- * See [MCP specification](https://github.com/modelcontextprotocol/modelcontextprotocol/blob/47339c03c143bb4ec01a26e721a1b8fe66634ebe/docs/specification/draft/basic/index.mdx#general-fields)
2190
- * for notes on _meta usage.
2191
- */
2192
- readonly _meta: v.OptionalSchema<v.ObjectSchema<{}, undefined>, undefined>;
2193
- }, undefined>], undefined>;
2194
- /**
2195
- * See [MCP specification](https://github.com/modelcontextprotocol/modelcontextprotocol/blob/47339c03c143bb4ec01a26e721a1b8fe66634ebe/docs/specification/draft/basic/index.mdx#general-fields)
2196
- * for notes on _meta usage.
2197
- */
2198
- readonly _meta: v.OptionalSchema<v.ObjectSchema<{}, undefined>, undefined>;
2199
- }, undefined>], undefined>, undefined>, readonly []>;
2200
- /**
2201
- * An object containing structured tool output.
2202
- *
2203
- * If the Tool defines an outputSchema, this field MUST be present in the result, and contain a JSON object that matches the schema.
2204
- */
2205
- readonly structuredContent: v.OptionalSchema<v.LooseObjectSchema<{}, undefined>, undefined>;
2206
- /**
2207
- * Whether the tool call ended in an error.
2208
- *
2209
- * If not set, this is assumed to be false (the call was successful).
2210
- *
2211
- * Any errors that originate from the tool SHOULD be reported inside the result
2212
- * object, with `isError` set to true, _not_ as an MCP protocol-level error
2213
- * response. Otherwise, the LLM would not be able to see that an error occurred
2214
- * and self-correct.
2215
- *
2216
- * However, any errors in _finding_ the tool, an error indicating that the
2217
- * server does not support tool calls, or any other exceptional conditions,
2218
- * should be reported as an MCP error response.
2219
- */
2220
- readonly isError: v.OptionalSchema<v.BooleanSchema<undefined>, undefined>;
2221
- /**
2222
- * See [MCP specification](https://github.com/modelcontextprotocol/modelcontextprotocol/blob/47339c03c143bb4ec01a26e721a1b8fe66634ebe/docs/specification/draft/basic/index.mdx#general-fields)
2223
- * for notes on _meta usage.
2224
- */
2225
- readonly _meta: v.OptionalSchema<v.LooseObjectSchema<{}, undefined>, undefined>;
2226
- }, undefined>, v.ObjectSchema<{
2227
- readonly toolResult: v.UnknownSchema;
2228
- /**
2229
- * See [MCP specification](https://github.com/modelcontextprotocol/modelcontextprotocol/blob/47339c03c143bb4ec01a26e721a1b8fe66634ebe/docs/specification/draft/basic/index.mdx#general-fields)
2230
- * for notes on _meta usage.
2231
- */
2232
- readonly _meta: v.OptionalSchema<v.LooseObjectSchema<{}, undefined>, undefined>;
2233
- }, undefined>], undefined>;
2234
- /**
2235
- * Used by the client to invoke a tool provided by the server.
2236
- */
2237
- export const CallToolRequestSchema: v.ObjectSchema<{
2238
- readonly method: v.LiteralSchema<"tools/call", undefined>;
2239
- readonly params: v.ObjectSchema<{
2240
- readonly name: v.StringSchema<undefined>;
2241
- readonly arguments: v.OptionalSchema<v.RecordSchema<v.StringSchema<undefined>, v.UnknownSchema, undefined>, undefined>;
2242
- readonly _meta: v.OptionalSchema<v.LooseObjectSchema<{
2243
- /**
2244
- * If specified, the caller is requesting out-of-band progress notifications for this request (as represented by notifications/progress). The value of this parameter is an opaque token that will be attached to any subsequent notifications. The receiver is not obligated to provide these notifications.
2245
- */
2246
- readonly progressToken: v.OptionalSchema<v.UnionSchema<[v.StringSchema<undefined>, v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>]>], undefined>, undefined>;
2247
- }, undefined>, undefined>;
2248
- }, undefined>;
2249
- }, undefined>;
2250
- /**
2251
- * An optional notification from the server to the client, informing it that the list of tools it offers has changed. This may be issued by servers without any previous subscription from the client.
2252
- */
2253
- export const ToolListChangedNotificationSchema: v.ObjectSchema<{
2254
- readonly method: v.LiteralSchema<"notifications/tools/list_changed", undefined>;
2255
- readonly params: v.OptionalSchema<v.LooseObjectSchema<{
2256
- /**
2257
- * See [MCP specification](https://github.com/modelcontextprotocol/modelcontextprotocol/blob/47339c03c143bb4ec01a26e721a1b8fe66634ebe/docs/specification/draft/basic/index.mdx#general-fields)
2258
- * for notes on _meta usage.
2259
- */
2260
- readonly _meta: v.OptionalSchema<v.LooseObjectSchema<{}, undefined>, undefined>;
2261
- }, undefined>, undefined>;
2262
- }, undefined>;
2263
- /**
2264
- * The severity of a log message.
2265
- */
2266
- export const LoggingLevelSchema: v.PicklistSchema<["debug", "info", "notice", "warning", "error", "critical", "alert", "emergency"], undefined>;
2267
- /**
2268
- * A request from the client to the server, to enable or adjust logging.
2269
- */
2270
- export const SetLevelRequestSchema: v.ObjectSchema<{
2271
- readonly method: v.LiteralSchema<"logging/setLevel", undefined>;
2272
- readonly params: v.ObjectSchema<{
2273
- /**
2274
- * The level of logging that the client wants to receive from the server. The server should send all logs at this level and higher (i.e., more severe) to the client as notifications/logging/message.
2275
- */
2276
- readonly level: v.PicklistSchema<["debug", "info", "notice", "warning", "error", "critical", "alert", "emergency"], undefined>;
2277
- readonly _meta: v.OptionalSchema<v.LooseObjectSchema<{
2278
- /**
2279
- * If specified, the caller is requesting out-of-band progress notifications for this request (as represented by notifications/progress). The value of this parameter is an opaque token that will be attached to any subsequent notifications. The receiver is not obligated to provide these notifications.
2280
- */
2281
- readonly progressToken: v.OptionalSchema<v.UnionSchema<[v.StringSchema<undefined>, v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>]>], undefined>, undefined>;
2282
- }, undefined>, undefined>;
2283
- }, undefined>;
2284
- }, undefined>;
2285
- /**
2286
- * Notification of a log message passed from server to client. If no logging/setLevel request has been sent from the client, the server MAY decide which messages to send automatically.
2287
- */
2288
- export const LoggingMessageNotificationSchema: v.ObjectSchema<{
2289
- readonly method: v.LiteralSchema<"notifications/message", undefined>;
2290
- readonly params: v.ObjectSchema<{
2291
- /**
2292
- * The severity of this log message.
2293
- */
2294
- readonly level: v.PicklistSchema<["debug", "info", "notice", "warning", "error", "critical", "alert", "emergency"], undefined>;
2295
- /**
2296
- * An optional name of the logger issuing this message.
2297
- */
2298
- readonly logger: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
2299
- /**
2300
- * The data to be logged, such as a string message or an object. Any JSON serializable type is allowed here.
2301
- */
2302
- readonly data: v.UnknownSchema;
2303
- /**
2304
- * See [MCP specification](https://github.com/modelcontextprotocol/modelcontextprotocol/blob/47339c03c143bb4ec01a26e721a1b8fe66634ebe/docs/specification/draft/basic/index.mdx#general-fields)
2305
- * for notes on _meta usage.
2306
- */
2307
- readonly _meta: v.OptionalSchema<v.LooseObjectSchema<{}, undefined>, undefined>;
2308
- }, undefined>;
2309
- }, undefined>;
2310
- /**
2311
- * Hints to use for model selection.
2312
- */
2313
- export const ModelHintSchema: v.ObjectSchema<{
2314
- /**
2315
- * A hint for a model name.
2316
- */
2317
- readonly name: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
2318
- }, undefined>;
2319
- /**
2320
- * The server's preferences for model selection, requested of the client during sampling.
2321
- */
2322
- export const ModelPreferencesSchema: v.ObjectSchema<{
2323
- /**
2324
- * Optional hints to use for model selection.
2325
- */
2326
- readonly hints: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
2327
- /**
2328
- * A hint for a model name.
2329
- */
2330
- readonly name: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
2331
- }, undefined>, undefined>, undefined>;
2332
- /**
2333
- * How much to prioritize cost when selecting a model.
2334
- */
2335
- readonly costPriority: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.MinValueAction<number, 0, undefined>, v.MaxValueAction<number, 1, undefined>]>, undefined>;
2336
- /**
2337
- * How much to prioritize sampling speed (latency) when selecting a model.
2338
- */
2339
- readonly speedPriority: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.MinValueAction<number, 0, undefined>, v.MaxValueAction<number, 1, undefined>]>, undefined>;
2340
- /**
2341
- * How much to prioritize intelligence and capabilities when selecting a model.
2342
- */
2343
- readonly intelligencePriority: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.MinValueAction<number, 0, undefined>, v.MaxValueAction<number, 1, undefined>]>, undefined>;
2344
- }, undefined>;
2345
- /**
2346
- * Describes a message issued to or received from an LLM API.
2347
- */
2348
- export const SamplingMessageSchema: v.ObjectSchema<{
2349
- readonly role: v.PicklistSchema<["user", "assistant"], undefined>;
2350
- readonly content: v.UnionSchema<[v.ObjectSchema<{
2351
- readonly type: v.LiteralSchema<"text", undefined>;
2352
- /**
2353
- * The text content of the message.
2354
- */
2355
- readonly text: v.StringSchema<undefined>;
2356
- /**
2357
- * See [MCP specification](https://github.com/modelcontextprotocol/modelcontextprotocol/blob/47339c03c143bb4ec01a26e721a1b8fe66634ebe/docs/specification/draft/basic/index.mdx#general-fields)
2358
- * for notes on _meta usage.
2359
- */
2360
- readonly _meta: v.OptionalSchema<v.ObjectSchema<{}, undefined>, undefined>;
2361
- }, undefined>, v.ObjectSchema<{
2362
- readonly type: v.LiteralSchema<"image", undefined>;
2363
- /**
2364
- * The base64-encoded image data.
2365
- */
2366
- readonly data: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.Base64Action<string, undefined>]>;
2367
- /**
2368
- * The MIME type of the image. Different providers may support different image types.
2369
- */
2370
- readonly mimeType: v.StringSchema<undefined>;
2371
- /**
2372
- * See [MCP specification](https://github.com/modelcontextprotocol/modelcontextprotocol/blob/47339c03c143bb4ec01a26e721a1b8fe66634ebe/docs/specification/draft/basic/index.mdx#general-fields)
2373
- * for notes on _meta usage.
2374
- */
2375
- readonly _meta: v.OptionalSchema<v.ObjectSchema<{}, undefined>, undefined>;
2376
- }, undefined>, v.ObjectSchema<{
2377
- readonly type: v.LiteralSchema<"audio", undefined>;
2378
- /**
2379
- * The base64-encoded audio data.
2380
- */
2381
- readonly data: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.Base64Action<string, undefined>]>;
2382
- /**
2383
- * The MIME type of the audio. Different providers may support different audio types.
2384
- */
2385
- readonly mimeType: v.StringSchema<undefined>;
2386
- /**
2387
- * See [MCP specification](https://github.com/modelcontextprotocol/modelcontextprotocol/blob/47339c03c143bb4ec01a26e721a1b8fe66634ebe/docs/specification/draft/basic/index.mdx#general-fields)
2388
- * for notes on _meta usage.
2389
- */
2390
- readonly _meta: v.OptionalSchema<v.ObjectSchema<{}, undefined>, undefined>;
2391
- }, undefined>], undefined>;
2392
- }, undefined>;
2393
- export const CreateMessageRequestParamsSchema: v.ObjectSchema<{
2394
- readonly messages: v.ArraySchema<v.ObjectSchema<{
2395
- readonly role: v.PicklistSchema<["user", "assistant"], undefined>;
2396
- readonly content: v.UnionSchema<[v.ObjectSchema<{
2397
- readonly type: v.LiteralSchema<"text", undefined>;
2398
- /**
2399
- * The text content of the message.
2400
- */
2401
- readonly text: v.StringSchema<undefined>;
2402
- /**
2403
- * See [MCP specification](https://github.com/modelcontextprotocol/modelcontextprotocol/blob/47339c03c143bb4ec01a26e721a1b8fe66634ebe/docs/specification/draft/basic/index.mdx#general-fields)
2404
- * for notes on _meta usage.
2405
- */
2406
- readonly _meta: v.OptionalSchema<v.ObjectSchema<{}, undefined>, undefined>;
2407
- }, undefined>, v.ObjectSchema<{
2408
- readonly type: v.LiteralSchema<"image", undefined>;
2409
- /**
2410
- * The base64-encoded image data.
2411
- */
2412
- readonly data: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.Base64Action<string, undefined>]>;
2413
- /**
2414
- * The MIME type of the image. Different providers may support different image types.
2415
- */
2416
- readonly mimeType: v.StringSchema<undefined>;
2417
- /**
2418
- * See [MCP specification](https://github.com/modelcontextprotocol/modelcontextprotocol/blob/47339c03c143bb4ec01a26e721a1b8fe66634ebe/docs/specification/draft/basic/index.mdx#general-fields)
2419
- * for notes on _meta usage.
2420
- */
2421
- readonly _meta: v.OptionalSchema<v.ObjectSchema<{}, undefined>, undefined>;
2422
- }, undefined>, v.ObjectSchema<{
2423
- readonly type: v.LiteralSchema<"audio", undefined>;
2424
- /**
2425
- * The base64-encoded audio data.
2426
- */
2427
- readonly data: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.Base64Action<string, undefined>]>;
2428
- /**
2429
- * The MIME type of the audio. Different providers may support different audio types.
2430
- */
2431
- readonly mimeType: v.StringSchema<undefined>;
2432
- /**
2433
- * See [MCP specification](https://github.com/modelcontextprotocol/modelcontextprotocol/blob/47339c03c143bb4ec01a26e721a1b8fe66634ebe/docs/specification/draft/basic/index.mdx#general-fields)
2434
- * for notes on _meta usage.
2435
- */
2436
- readonly _meta: v.OptionalSchema<v.ObjectSchema<{}, undefined>, undefined>;
2437
- }, undefined>], undefined>;
2438
- }, undefined>, undefined>;
2439
- /**
2440
- * An optional system prompt the server wants to use for sampling. The client MAY modify or omit this prompt.
2441
- */
2442
- readonly systemPrompt: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
2443
- /**
2444
- * A request to include context from one or more MCP servers (including the caller), to be attached to the prompt. The client MAY ignore this request.
2445
- */
2446
- readonly includeContext: v.OptionalSchema<v.PicklistSchema<["none", "thisServer", "allServers"], undefined>, undefined>;
2447
- readonly temperature: v.OptionalSchema<v.NumberSchema<undefined>, undefined>;
2448
- /**
2449
- * The maximum number of tokens to sample, as requested by the server. The client MAY choose to sample fewer tokens than requested.
2450
- */
2451
- readonly maxTokens: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>]>;
2452
- readonly stopSequences: v.OptionalSchema<v.ArraySchema<v.StringSchema<undefined>, undefined>, undefined>;
2453
- /**
2454
- * Optional metadata to pass through to the LLM provider. The format of this metadata is provider-specific.
2455
- */
2456
- readonly metadata: v.OptionalSchema<v.ObjectSchema<{}, undefined>, undefined>;
2457
- /**
2458
- * The server's preferences for which model to select.
2459
- */
2460
- readonly modelPreferences: v.OptionalSchema<v.ObjectSchema<{
2461
- /**
2462
- * Optional hints to use for model selection.
2463
- */
2464
- readonly hints: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
2465
- /**
2466
- * A hint for a model name.
2467
- */
2468
- readonly name: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
2469
- }, undefined>, undefined>, undefined>;
2470
- /**
2471
- * How much to prioritize cost when selecting a model.
2472
- */
2473
- readonly costPriority: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.MinValueAction<number, 0, undefined>, v.MaxValueAction<number, 1, undefined>]>, undefined>;
2474
- /**
2475
- * How much to prioritize sampling speed (latency) when selecting a model.
2476
- */
2477
- readonly speedPriority: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.MinValueAction<number, 0, undefined>, v.MaxValueAction<number, 1, undefined>]>, undefined>;
2478
- /**
2479
- * How much to prioritize intelligence and capabilities when selecting a model.
2480
- */
2481
- readonly intelligencePriority: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.MinValueAction<number, 0, undefined>, v.MaxValueAction<number, 1, undefined>]>, undefined>;
2482
- }, undefined>, undefined>;
2483
- readonly _meta: v.OptionalSchema<v.LooseObjectSchema<{
2484
- /**
2485
- * If specified, the caller is requesting out-of-band progress notifications for this request (as represented by notifications/progress). The value of this parameter is an opaque token that will be attached to any subsequent notifications. The receiver is not obligated to provide these notifications.
2486
- */
2487
- readonly progressToken: v.OptionalSchema<v.UnionSchema<[v.StringSchema<undefined>, v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>]>], undefined>, undefined>;
2488
- }, undefined>, undefined>;
2489
- }, undefined>;
2490
- /**
2491
- * A request from the server to sample an LLM via the client. The client has full discretion over which model to select. The client should also inform the user before beginning sampling, to allow them to inspect the request (human in the loop) and decide whether to approve it.
2492
- */
2493
- export const CreateMessageRequestSchema: v.ObjectSchema<{
2494
- readonly method: v.LiteralSchema<"sampling/createMessage", undefined>;
2495
- readonly params: v.ObjectSchema<{
2496
- readonly messages: v.ArraySchema<v.ObjectSchema<{
2497
- readonly role: v.PicklistSchema<["user", "assistant"], undefined>;
2498
- readonly content: v.UnionSchema<[v.ObjectSchema<{
2499
- readonly type: v.LiteralSchema<"text", undefined>;
2500
- /**
2501
- * The text content of the message.
2502
- */
2503
- readonly text: v.StringSchema<undefined>;
2504
- /**
2505
- * See [MCP specification](https://github.com/modelcontextprotocol/modelcontextprotocol/blob/47339c03c143bb4ec01a26e721a1b8fe66634ebe/docs/specification/draft/basic/index.mdx#general-fields)
2506
- * for notes on _meta usage.
2507
- */
2508
- readonly _meta: v.OptionalSchema<v.ObjectSchema<{}, undefined>, undefined>;
2509
- }, undefined>, v.ObjectSchema<{
2510
- readonly type: v.LiteralSchema<"image", undefined>;
2511
- /**
2512
- * The base64-encoded image data.
2513
- */
2514
- readonly data: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.Base64Action<string, undefined>]>;
2515
- /**
2516
- * The MIME type of the image. Different providers may support different image types.
2517
- */
2518
- readonly mimeType: v.StringSchema<undefined>;
2519
- /**
2520
- * See [MCP specification](https://github.com/modelcontextprotocol/modelcontextprotocol/blob/47339c03c143bb4ec01a26e721a1b8fe66634ebe/docs/specification/draft/basic/index.mdx#general-fields)
2521
- * for notes on _meta usage.
2522
- */
2523
- readonly _meta: v.OptionalSchema<v.ObjectSchema<{}, undefined>, undefined>;
2524
- }, undefined>, v.ObjectSchema<{
2525
- readonly type: v.LiteralSchema<"audio", undefined>;
2526
- /**
2527
- * The base64-encoded audio data.
2528
- */
2529
- readonly data: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.Base64Action<string, undefined>]>;
2530
- /**
2531
- * The MIME type of the audio. Different providers may support different audio types.
2532
- */
2533
- readonly mimeType: v.StringSchema<undefined>;
2534
- /**
2535
- * See [MCP specification](https://github.com/modelcontextprotocol/modelcontextprotocol/blob/47339c03c143bb4ec01a26e721a1b8fe66634ebe/docs/specification/draft/basic/index.mdx#general-fields)
2536
- * for notes on _meta usage.
2537
- */
2538
- readonly _meta: v.OptionalSchema<v.ObjectSchema<{}, undefined>, undefined>;
2539
- }, undefined>], undefined>;
2540
- }, undefined>, undefined>;
2541
- /**
2542
- * An optional system prompt the server wants to use for sampling. The client MAY modify or omit this prompt.
2543
- */
2544
- readonly systemPrompt: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
2545
- /**
2546
- * A request to include context from one or more MCP servers (including the caller), to be attached to the prompt. The client MAY ignore this request.
2547
- */
2548
- readonly includeContext: v.OptionalSchema<v.PicklistSchema<["none", "thisServer", "allServers"], undefined>, undefined>;
2549
- readonly temperature: v.OptionalSchema<v.NumberSchema<undefined>, undefined>;
2550
- /**
2551
- * The maximum number of tokens to sample, as requested by the server. The client MAY choose to sample fewer tokens than requested.
2552
- */
2553
- readonly maxTokens: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>]>;
2554
- readonly stopSequences: v.OptionalSchema<v.ArraySchema<v.StringSchema<undefined>, undefined>, undefined>;
2555
- /**
2556
- * Optional metadata to pass through to the LLM provider. The format of this metadata is provider-specific.
2557
- */
2558
- readonly metadata: v.OptionalSchema<v.ObjectSchema<{}, undefined>, undefined>;
2559
- /**
2560
- * The server's preferences for which model to select.
2561
- */
2562
- readonly modelPreferences: v.OptionalSchema<v.ObjectSchema<{
2563
- /**
2564
- * Optional hints to use for model selection.
2565
- */
2566
- readonly hints: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
2567
- /**
2568
- * A hint for a model name.
2569
- */
2570
- readonly name: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
2571
- }, undefined>, undefined>, undefined>;
2572
- /**
2573
- * How much to prioritize cost when selecting a model.
2574
- */
2575
- readonly costPriority: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.MinValueAction<number, 0, undefined>, v.MaxValueAction<number, 1, undefined>]>, undefined>;
2576
- /**
2577
- * How much to prioritize sampling speed (latency) when selecting a model.
2578
- */
2579
- readonly speedPriority: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.MinValueAction<number, 0, undefined>, v.MaxValueAction<number, 1, undefined>]>, undefined>;
2580
- /**
2581
- * How much to prioritize intelligence and capabilities when selecting a model.
2582
- */
2583
- readonly intelligencePriority: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.MinValueAction<number, 0, undefined>, v.MaxValueAction<number, 1, undefined>]>, undefined>;
2584
- }, undefined>, undefined>;
2585
- readonly _meta: v.OptionalSchema<v.LooseObjectSchema<{
2586
- /**
2587
- * If specified, the caller is requesting out-of-band progress notifications for this request (as represented by notifications/progress). The value of this parameter is an opaque token that will be attached to any subsequent notifications. The receiver is not obligated to provide these notifications.
2588
- */
2589
- readonly progressToken: v.OptionalSchema<v.UnionSchema<[v.StringSchema<undefined>, v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>]>], undefined>, undefined>;
2590
- }, undefined>, undefined>;
2591
- }, undefined>;
2592
- }, undefined>;
2593
- /**
2594
- * The client's response to a sampling/create_message request from the server. The client should inform the user before returning the sampled message, to allow them to inspect the response (human in the loop) and decide whether to allow the server to see it.
2595
- */
2596
- export const CreateMessageResultSchema: v.ObjectSchema<{
2597
- /**
2598
- * The name of the model that generated the message.
2599
- */
2600
- readonly model: v.StringSchema<undefined>;
2601
- /**
2602
- * The reason why sampling stopped.
2603
- */
2604
- readonly stopReason: v.OptionalSchema<v.UnionSchema<[v.PicklistSchema<["endTurn", "stopSequence", "maxTokens"], undefined>, v.StringSchema<undefined>], undefined>, undefined>;
2605
- readonly role: v.PicklistSchema<["user", "assistant"], undefined>;
2606
- readonly content: v.VariantSchema<"type", [v.ObjectSchema<{
2607
- readonly type: v.LiteralSchema<"text", undefined>;
2608
- /**
2609
- * The text content of the message.
2610
- */
2611
- readonly text: v.StringSchema<undefined>;
2612
- /**
2613
- * See [MCP specification](https://github.com/modelcontextprotocol/modelcontextprotocol/blob/47339c03c143bb4ec01a26e721a1b8fe66634ebe/docs/specification/draft/basic/index.mdx#general-fields)
2614
- * for notes on _meta usage.
2615
- */
2616
- readonly _meta: v.OptionalSchema<v.ObjectSchema<{}, undefined>, undefined>;
2617
- }, undefined>, v.ObjectSchema<{
2618
- readonly type: v.LiteralSchema<"image", undefined>;
2619
- /**
2620
- * The base64-encoded image data.
2621
- */
2622
- readonly data: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.Base64Action<string, undefined>]>;
2623
- /**
2624
- * The MIME type of the image. Different providers may support different image types.
2625
- */
2626
- readonly mimeType: v.StringSchema<undefined>;
2627
- /**
2628
- * See [MCP specification](https://github.com/modelcontextprotocol/modelcontextprotocol/blob/47339c03c143bb4ec01a26e721a1b8fe66634ebe/docs/specification/draft/basic/index.mdx#general-fields)
2629
- * for notes on _meta usage.
2630
- */
2631
- readonly _meta: v.OptionalSchema<v.ObjectSchema<{}, undefined>, undefined>;
2632
- }, undefined>, v.ObjectSchema<{
2633
- readonly type: v.LiteralSchema<"audio", undefined>;
2634
- /**
2635
- * The base64-encoded audio data.
2636
- */
2637
- readonly data: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.Base64Action<string, undefined>]>;
2638
- /**
2639
- * The MIME type of the audio. Different providers may support different audio types.
2640
- */
2641
- readonly mimeType: v.StringSchema<undefined>;
2642
- /**
2643
- * See [MCP specification](https://github.com/modelcontextprotocol/modelcontextprotocol/blob/47339c03c143bb4ec01a26e721a1b8fe66634ebe/docs/specification/draft/basic/index.mdx#general-fields)
2644
- * for notes on _meta usage.
2645
- */
2646
- readonly _meta: v.OptionalSchema<v.ObjectSchema<{}, undefined>, undefined>;
2647
- }, undefined>], undefined>;
2648
- /**
2649
- * See [MCP specification](https://github.com/modelcontextprotocol/modelcontextprotocol/blob/47339c03c143bb4ec01a26e721a1b8fe66634ebe/docs/specification/draft/basic/index.mdx#general-fields)
2650
- * for notes on _meta usage.
2651
- */
2652
- readonly _meta: v.OptionalSchema<v.LooseObjectSchema<{}, undefined>, undefined>;
2653
- }, undefined>;
2654
- /**
2655
- * Primitive schema definition for boolean fields.
2656
- */
2657
- export const BooleanSchemaSchema: v.ObjectSchema<{
2658
- readonly type: v.LiteralSchema<"boolean", undefined>;
2659
- readonly title: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
2660
- readonly description: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
2661
- readonly default: v.OptionalSchema<v.BooleanSchema<undefined>, undefined>;
2662
- }, undefined>;
2663
- /**
2664
- * Primitive schema definition for string fields.
2665
- */
2666
- export const StringSchemaSchema: v.ObjectSchema<{
2667
- readonly type: v.LiteralSchema<"string", undefined>;
2668
- readonly title: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
2669
- readonly description: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
2670
- readonly minLength: v.OptionalSchema<v.NumberSchema<undefined>, undefined>;
2671
- readonly maxLength: v.OptionalSchema<v.NumberSchema<undefined>, undefined>;
2672
- readonly format: v.OptionalSchema<v.PicklistSchema<["email", "uri", "date", "date-time"], undefined>, undefined>;
2673
- }, undefined>;
2674
- /**
2675
- * Primitive schema definition for number fields.
2676
- */
2677
- export const NumberSchemaSchema: v.ObjectSchema<{
2678
- readonly type: v.PicklistSchema<["number", "integer"], undefined>;
2679
- readonly title: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
2680
- readonly description: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
2681
- readonly minimum: v.OptionalSchema<v.NumberSchema<undefined>, undefined>;
2682
- readonly maximum: v.OptionalSchema<v.NumberSchema<undefined>, undefined>;
2683
- }, undefined>;
2684
- /**
2685
- * Primitive schema definition for enum fields.
2686
- */
2687
- export const EnumSchemaSchema: v.ObjectSchema<{
2688
- readonly type: v.LiteralSchema<"string", undefined>;
2689
- readonly title: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
2690
- readonly description: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
2691
- readonly enum: v.ArraySchema<v.StringSchema<undefined>, undefined>;
2692
- readonly enumNames: v.OptionalSchema<v.ArraySchema<v.StringSchema<undefined>, undefined>, undefined>;
2693
- }, undefined>;
2694
- /**
2695
- * Union of all primitive schema definitions.
2696
- */
2697
- export const PrimitiveSchemaDefinitionSchema: v.UnionSchema<[v.ObjectSchema<{
2698
- readonly type: v.LiteralSchema<"boolean", undefined>;
2699
- readonly title: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
2700
- readonly description: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
2701
- readonly default: v.OptionalSchema<v.BooleanSchema<undefined>, undefined>;
2702
- }, undefined>, v.ObjectSchema<{
2703
- readonly type: v.LiteralSchema<"string", undefined>;
2704
- readonly title: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
2705
- readonly description: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
2706
- readonly minLength: v.OptionalSchema<v.NumberSchema<undefined>, undefined>;
2707
- readonly maxLength: v.OptionalSchema<v.NumberSchema<undefined>, undefined>;
2708
- readonly format: v.OptionalSchema<v.PicklistSchema<["email", "uri", "date", "date-time"], undefined>, undefined>;
2709
- }, undefined>, v.ObjectSchema<{
2710
- readonly type: v.PicklistSchema<["number", "integer"], undefined>;
2711
- readonly title: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
2712
- readonly description: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
2713
- readonly minimum: v.OptionalSchema<v.NumberSchema<undefined>, undefined>;
2714
- readonly maximum: v.OptionalSchema<v.NumberSchema<undefined>, undefined>;
2715
- }, undefined>, v.ObjectSchema<{
2716
- readonly type: v.LiteralSchema<"string", undefined>;
2717
- readonly title: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
2718
- readonly description: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
2719
- readonly enum: v.ArraySchema<v.StringSchema<undefined>, undefined>;
2720
- readonly enumNames: v.OptionalSchema<v.ArraySchema<v.StringSchema<undefined>, undefined>, undefined>;
2721
- }, undefined>], undefined>;
2722
- /**
2723
- * A request from the server to elicit user input via the client.
2724
- * The client should present the message and form fields to the user.
2725
- */
2726
- export const ElicitRequestSchema: v.ObjectSchema<{
2727
- readonly method: v.LiteralSchema<"elicitation/create", undefined>;
2728
- readonly params: v.ObjectSchema<{
2729
- /**
2730
- * The message to present to the user.
2731
- */
2732
- readonly message: v.StringSchema<undefined>;
2733
- /**
2734
- * The schema for the requested user input.
2735
- */
2736
- readonly requestedSchema: v.ObjectSchema<{
2737
- readonly type: v.LiteralSchema<"object", undefined>;
2738
- readonly properties: v.RecordSchema<v.StringSchema<undefined>, v.UnionSchema<[v.ObjectSchema<{
2739
- readonly type: v.LiteralSchema<"boolean", undefined>;
2740
- readonly title: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
2741
- readonly description: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
2742
- readonly default: v.OptionalSchema<v.BooleanSchema<undefined>, undefined>;
2743
- }, undefined>, v.ObjectSchema<{
2744
- readonly type: v.LiteralSchema<"string", undefined>;
2745
- readonly title: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
2746
- readonly description: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
2747
- readonly minLength: v.OptionalSchema<v.NumberSchema<undefined>, undefined>;
2748
- readonly maxLength: v.OptionalSchema<v.NumberSchema<undefined>, undefined>;
2749
- readonly format: v.OptionalSchema<v.PicklistSchema<["email", "uri", "date", "date-time"], undefined>, undefined>;
2750
- }, undefined>, v.ObjectSchema<{
2751
- readonly type: v.PicklistSchema<["number", "integer"], undefined>;
2752
- readonly title: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
2753
- readonly description: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
2754
- readonly minimum: v.OptionalSchema<v.NumberSchema<undefined>, undefined>;
2755
- readonly maximum: v.OptionalSchema<v.NumberSchema<undefined>, undefined>;
2756
- }, undefined>, v.ObjectSchema<{
2757
- readonly type: v.LiteralSchema<"string", undefined>;
2758
- readonly title: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
2759
- readonly description: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
2760
- readonly enum: v.ArraySchema<v.StringSchema<undefined>, undefined>;
2761
- readonly enumNames: v.OptionalSchema<v.ArraySchema<v.StringSchema<undefined>, undefined>, undefined>;
2762
- }, undefined>], undefined>, undefined>;
2763
- readonly required: v.OptionalSchema<v.ArraySchema<v.StringSchema<undefined>, undefined>, undefined>;
2764
- }, undefined>;
2765
- readonly _meta: v.OptionalSchema<v.LooseObjectSchema<{
2766
- /**
2767
- * If specified, the caller is requesting out-of-band progress notifications for this request (as represented by notifications/progress). The value of this parameter is an opaque token that will be attached to any subsequent notifications. The receiver is not obligated to provide these notifications.
2768
- */
2769
- readonly progressToken: v.OptionalSchema<v.UnionSchema<[v.StringSchema<undefined>, v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>]>], undefined>, undefined>;
2770
- }, undefined>, undefined>;
2771
- }, undefined>;
2772
- }, undefined>;
2773
- /**
2774
- * The client's response to an elicitation/create request from the server.
2775
- */
2776
- export const ElicitResultSchema: v.ObjectSchema<{
2777
- /**
2778
- * The user's response action.
2779
- */
2780
- readonly action: v.PicklistSchema<["accept", "decline", "cancel"], undefined>;
2781
- /**
2782
- * The collected user input content (only present if action is "accept").
2783
- */
2784
- readonly content: v.OptionalSchema<v.RecordSchema<v.StringSchema<undefined>, v.UnknownSchema, undefined>, undefined>;
2785
- /**
2786
- * See [MCP specification](https://github.com/modelcontextprotocol/modelcontextprotocol/blob/47339c03c143bb4ec01a26e721a1b8fe66634ebe/docs/specification/draft/basic/index.mdx#general-fields)
2787
- * for notes on _meta usage.
2788
- */
2789
- readonly _meta: v.OptionalSchema<v.LooseObjectSchema<{}, undefined>, undefined>;
2790
- }, undefined>;
2791
- /**
2792
- * A reference to a resource or resource template definition.
2793
- */
2794
- export const ResourceTemplateReferenceSchema: v.ObjectSchema<{
2795
- readonly type: v.LiteralSchema<"ref/resource", undefined>;
2796
- /**
2797
- * The URI or URI template of the resource.
2798
- */
2799
- readonly uri: v.StringSchema<undefined>;
2800
- }, undefined>;
2801
- /**
2802
- * @deprecated Use ResourceTemplateReferenceSchema instead
2803
- */
2804
- export const ResourceReferenceSchema: v.ObjectSchema<{
2805
- readonly type: v.LiteralSchema<"ref/resource", undefined>;
2806
- /**
2807
- * The URI or URI template of the resource.
2808
- */
2809
- readonly uri: v.StringSchema<undefined>;
2810
- }, undefined>;
2811
- /**
2812
- * Identifies a prompt.
2813
- */
2814
- export const PromptReferenceSchema: v.ObjectSchema<{
2815
- readonly type: v.LiteralSchema<"ref/prompt", undefined>;
2816
- /**
2817
- * The name of the prompt or prompt template
2818
- */
2819
- readonly name: v.StringSchema<undefined>;
2820
- }, undefined>;
2821
- /**
2822
- * A request from the client to the server, to ask for completion options.
2823
- */
2824
- export const CompleteRequestSchema: v.ObjectSchema<{
2825
- readonly method: v.LiteralSchema<"completion/complete", undefined>;
2826
- readonly params: v.ObjectSchema<{
2827
- readonly ref: v.UnionSchema<[v.ObjectSchema<{
2828
- readonly type: v.LiteralSchema<"ref/prompt", undefined>;
2829
- /**
2830
- * The name of the prompt or prompt template
2831
- */
2832
- readonly name: v.StringSchema<undefined>;
2833
- }, undefined>, v.ObjectSchema<{
2834
- readonly type: v.LiteralSchema<"ref/resource", undefined>;
2835
- /**
2836
- * The URI or URI template of the resource.
2837
- */
2838
- readonly uri: v.StringSchema<undefined>;
2839
- }, undefined>], undefined>;
2840
- /**
2841
- * The argument's information
2842
- */
2843
- readonly argument: v.ObjectSchema<{
2844
- /**
2845
- * The name of the argument
2846
- */
2847
- readonly name: v.StringSchema<undefined>;
2848
- /**
2849
- * The value of the argument to use for completion matching.
2850
- */
2851
- readonly value: v.StringSchema<undefined>;
2852
- }, undefined>;
2853
- readonly context: v.OptionalSchema<v.ObjectSchema<{
2854
- /**
2855
- * Previously-resolved variables in a URI template or prompt.
2856
- */
2857
- readonly arguments: v.OptionalSchema<v.RecordSchema<v.StringSchema<undefined>, v.StringSchema<undefined>, undefined>, undefined>;
2858
- }, undefined>, undefined>;
2859
- readonly _meta: v.OptionalSchema<v.LooseObjectSchema<{
2860
- /**
2861
- * If specified, the caller is requesting out-of-band progress notifications for this request (as represented by notifications/progress). The value of this parameter is an opaque token that will be attached to any subsequent notifications. The receiver is not obligated to provide these notifications.
2862
- */
2863
- readonly progressToken: v.OptionalSchema<v.UnionSchema<[v.StringSchema<undefined>, v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>]>], undefined>, undefined>;
2864
- }, undefined>, undefined>;
2865
- }, undefined>;
2866
- }, undefined>;
2867
- /**
2868
- * The server's response to a completion/complete request
2869
- */
2870
- export const CompleteResultSchema: v.ObjectSchema<{
2871
- readonly completion: v.ObjectSchema<{
2872
- /**
2873
- * An array of completion values. Must not exceed 100 items.
2874
- */
2875
- readonly values: v.SchemaWithPipe<readonly [v.ArraySchema<v.StringSchema<undefined>, undefined>, v.MaxLengthAction<string[], 100, undefined>]>;
2876
- /**
2877
- * The total number of completion options available. This can exceed the number of values actually sent in the response.
2878
- */
2879
- readonly total: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>]>, undefined>;
2880
- /**
2881
- * Indicates whether there are additional completion options beyond those provided in the current response, even if the exact total is unknown.
2882
- */
2883
- readonly hasMore: v.OptionalSchema<v.BooleanSchema<undefined>, undefined>;
2884
- }, undefined>;
2885
- /**
2886
- * See [MCP specification](https://github.com/modelcontextprotocol/modelcontextprotocol/blob/47339c03c143bb4ec01a26e721a1b8fe66634ebe/docs/specification/draft/basic/index.mdx#general-fields)
2887
- * for notes on _meta usage.
2888
- */
2889
- readonly _meta: v.OptionalSchema<v.LooseObjectSchema<{}, undefined>, undefined>;
2890
- }, undefined>;
2891
- /**
2892
- * Represents a root directory or file that the server can operate on.
2893
- */
2894
- export const RootSchema: v.ObjectSchema<{
2895
- /**
2896
- * The URI identifying the root. This *must* start with file:// for now.
2897
- */
2898
- readonly uri: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.StartsWithAction<string, "file://", undefined>]>;
2899
- /**
2900
- * An optional name for the root.
2901
- */
2902
- readonly name: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
2903
- /**
2904
- * See [MCP specification](https://github.com/modelcontextprotocol/modelcontextprotocol/blob/47339c03c143bb4ec01a26e721a1b8fe66634ebe/docs/specification/draft/basic/index.mdx#general-fields)
2905
- * for notes on _meta usage.
2906
- */
2907
- readonly _meta: v.OptionalSchema<v.ObjectSchema<{}, undefined>, undefined>;
2908
- }, undefined>;
2909
- /**
2910
- * Sent from the server to request a list of root URIs from the client.
2911
- */
2912
- export const ListRootsRequestSchema: v.ObjectSchema<{
2913
- readonly method: v.LiteralSchema<"roots/list", undefined>;
2914
- readonly params: v.OptionalSchema<v.LooseObjectSchema<{
2915
- readonly _meta: v.OptionalSchema<v.LooseObjectSchema<{
2916
- /**
2917
- * If specified, the caller is requesting out-of-band progress notifications for this request (as represented by notifications/progress). The value of this parameter is an opaque token that will be attached to any subsequent notifications. The receiver is not obligated to provide these notifications.
2918
- */
2919
- readonly progressToken: v.OptionalSchema<v.UnionSchema<[v.StringSchema<undefined>, v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>]>], undefined>, undefined>;
2920
- }, undefined>, undefined>;
2921
- }, undefined>, undefined>;
2922
- }, undefined>;
2923
- /**
2924
- * The client's response to a roots/list request from the server.
2925
- */
2926
- export const ListRootsResultSchema: v.ObjectSchema<{
2927
- readonly roots: v.ArraySchema<v.ObjectSchema<{
2928
- /**
2929
- * The URI identifying the root. This *must* start with file:// for now.
2930
- */
2931
- readonly uri: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.StartsWithAction<string, "file://", undefined>]>;
2932
- /**
2933
- * An optional name for the root.
2934
- */
2935
- readonly name: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
2936
- /**
2937
- * See [MCP specification](https://github.com/modelcontextprotocol/modelcontextprotocol/blob/47339c03c143bb4ec01a26e721a1b8fe66634ebe/docs/specification/draft/basic/index.mdx#general-fields)
2938
- * for notes on _meta usage.
2939
- */
2940
- readonly _meta: v.OptionalSchema<v.ObjectSchema<{}, undefined>, undefined>;
2941
- }, undefined>, undefined>;
2942
- /**
2943
- * See [MCP specification](https://github.com/modelcontextprotocol/modelcontextprotocol/blob/47339c03c143bb4ec01a26e721a1b8fe66634ebe/docs/specification/draft/basic/index.mdx#general-fields)
2944
- * for notes on _meta usage.
2945
- */
2946
- readonly _meta: v.OptionalSchema<v.LooseObjectSchema<{}, undefined>, undefined>;
2947
- }, undefined>;
2948
- /**
2949
- * A notification from the client to the server, informing it that the list of roots has changed.
2950
- */
2951
- export const RootsListChangedNotificationSchema: v.ObjectSchema<{
2952
- readonly method: v.LiteralSchema<"notifications/roots/list_changed", undefined>;
2953
- readonly params: v.OptionalSchema<v.LooseObjectSchema<{
2954
- /**
2955
- * See [MCP specification](https://github.com/modelcontextprotocol/modelcontextprotocol/blob/47339c03c143bb4ec01a26e721a1b8fe66634ebe/docs/specification/draft/basic/index.mdx#general-fields)
2956
- * for notes on _meta usage.
2957
- */
2958
- readonly _meta: v.OptionalSchema<v.LooseObjectSchema<{}, undefined>, undefined>;
2959
- }, undefined>, undefined>;
2960
- }, undefined>;
2961
- export const ClientRequestSchema: v.UnionSchema<[v.ObjectSchema<{
2962
- readonly method: v.LiteralSchema<"ping", undefined>;
2963
- readonly params: v.OptionalSchema<v.LooseObjectSchema<{
2964
- readonly _meta: v.OptionalSchema<v.LooseObjectSchema<{
2965
- /**
2966
- * If specified, the caller is requesting out-of-band progress notifications for this request (as represented by notifications/progress). The value of this parameter is an opaque token that will be attached to any subsequent notifications. The receiver is not obligated to provide these notifications.
2967
- */
2968
- readonly progressToken: v.OptionalSchema<v.UnionSchema<[v.StringSchema<undefined>, v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>]>], undefined>, undefined>;
2969
- }, undefined>, undefined>;
2970
- }, undefined>, undefined>;
2971
- }, undefined>, v.ObjectSchema<{
2972
- readonly method: v.LiteralSchema<"initialize", undefined>;
2973
- readonly params: v.ObjectSchema<{
2974
- /**
2975
- * The latest version of the Model Context Protocol that the client supports. The client MAY decide to support older versions as well.
2976
- */
2977
- readonly protocolVersion: v.StringSchema<undefined>;
2978
- readonly capabilities: v.ObjectSchema<{
2979
- /**
2980
- * Experimental, non-standard capabilities that the client supports.
2981
- */
2982
- readonly experimental: v.OptionalSchema<v.ObjectSchema<{}, undefined>, undefined>;
2983
- /**
2984
- * Present if the client supports sampling from an LLM.
2985
- */
2986
- readonly sampling: v.OptionalSchema<v.ObjectSchema<{}, undefined>, undefined>;
2987
- /**
2988
- * Present if the client supports eliciting user input.
2989
- */
2990
- readonly elicitation: v.OptionalSchema<v.ObjectSchema<{}, undefined>, undefined>;
2991
- /**
2992
- * Present if the client supports listing roots.
2993
- */
2994
- readonly roots: v.OptionalSchema<v.ObjectSchema<{
2995
- /**
2996
- * Whether the client supports issuing notifications for changes to the roots list.
2997
- */
2998
- readonly listChanged: v.OptionalSchema<v.BooleanSchema<undefined>, undefined>;
2999
- }, undefined>, undefined>;
3000
- }, undefined>;
3001
- readonly clientInfo: v.ObjectSchema<{
3002
- readonly version: v.StringSchema<undefined>;
3003
- /** Intended for programmatic or logical use, but used as a display name in past specs or fallback */
3004
- readonly name: v.StringSchema<undefined>;
3005
- /**
3006
- * Intended for UI and end-user contexts — optimized to be human-readable and easily understood,
3007
- * even by those unfamiliar with domain-specific terminology.
3008
- *
3009
- * If not provided, the name should be used for display (except for Tool,
3010
- * where `annotations.title` should be given precedence over using `name`,
3011
- * if present).
3012
- */
3013
- readonly title: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
3014
- }, undefined>;
3015
- readonly _meta: v.OptionalSchema<v.LooseObjectSchema<{
3016
- /**
3017
- * If specified, the caller is requesting out-of-band progress notifications for this request (as represented by notifications/progress). The value of this parameter is an opaque token that will be attached to any subsequent notifications. The receiver is not obligated to provide these notifications.
3018
- */
3019
- readonly progressToken: v.OptionalSchema<v.UnionSchema<[v.StringSchema<undefined>, v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>]>], undefined>, undefined>;
3020
- }, undefined>, undefined>;
3021
- }, undefined>;
3022
- }, undefined>, v.ObjectSchema<{
3023
- readonly method: v.LiteralSchema<"completion/complete", undefined>;
3024
- readonly params: v.ObjectSchema<{
3025
- readonly ref: v.UnionSchema<[v.ObjectSchema<{
3026
- readonly type: v.LiteralSchema<"ref/prompt", undefined>;
3027
- /**
3028
- * The name of the prompt or prompt template
3029
- */
3030
- readonly name: v.StringSchema<undefined>;
3031
- }, undefined>, v.ObjectSchema<{
3032
- readonly type: v.LiteralSchema<"ref/resource", undefined>;
3033
- /**
3034
- * The URI or URI template of the resource.
3035
- */
3036
- readonly uri: v.StringSchema<undefined>;
3037
- }, undefined>], undefined>;
3038
- /**
3039
- * The argument's information
3040
- */
3041
- readonly argument: v.ObjectSchema<{
3042
- /**
3043
- * The name of the argument
3044
- */
3045
- readonly name: v.StringSchema<undefined>;
3046
- /**
3047
- * The value of the argument to use for completion matching.
3048
- */
3049
- readonly value: v.StringSchema<undefined>;
3050
- }, undefined>;
3051
- readonly context: v.OptionalSchema<v.ObjectSchema<{
3052
- /**
3053
- * Previously-resolved variables in a URI template or prompt.
3054
- */
3055
- readonly arguments: v.OptionalSchema<v.RecordSchema<v.StringSchema<undefined>, v.StringSchema<undefined>, undefined>, undefined>;
3056
- }, undefined>, undefined>;
3057
- readonly _meta: v.OptionalSchema<v.LooseObjectSchema<{
3058
- /**
3059
- * If specified, the caller is requesting out-of-band progress notifications for this request (as represented by notifications/progress). The value of this parameter is an opaque token that will be attached to any subsequent notifications. The receiver is not obligated to provide these notifications.
3060
- */
3061
- readonly progressToken: v.OptionalSchema<v.UnionSchema<[v.StringSchema<undefined>, v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>]>], undefined>, undefined>;
3062
- }, undefined>, undefined>;
3063
- }, undefined>;
3064
- }, undefined>, v.ObjectSchema<{
3065
- readonly method: v.LiteralSchema<"logging/setLevel", undefined>;
3066
- readonly params: v.ObjectSchema<{
3067
- /**
3068
- * The level of logging that the client wants to receive from the server. The server should send all logs at this level and higher (i.e., more severe) to the client as notifications/logging/message.
3069
- */
3070
- readonly level: v.PicklistSchema<["debug", "info", "notice", "warning", "error", "critical", "alert", "emergency"], undefined>;
3071
- readonly _meta: v.OptionalSchema<v.LooseObjectSchema<{
3072
- /**
3073
- * If specified, the caller is requesting out-of-band progress notifications for this request (as represented by notifications/progress). The value of this parameter is an opaque token that will be attached to any subsequent notifications. The receiver is not obligated to provide these notifications.
3074
- */
3075
- readonly progressToken: v.OptionalSchema<v.UnionSchema<[v.StringSchema<undefined>, v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>]>], undefined>, undefined>;
3076
- }, undefined>, undefined>;
3077
- }, undefined>;
3078
- }, undefined>, v.ObjectSchema<{
3079
- readonly method: v.LiteralSchema<"prompts/get", undefined>;
3080
- readonly params: v.ObjectSchema<{
3081
- /**
3082
- * The name of the prompt or prompt template.
3083
- */
3084
- readonly name: v.StringSchema<undefined>;
3085
- /**
3086
- * Arguments to use for templating the prompt.
3087
- */
3088
- readonly arguments: v.OptionalSchema<v.RecordSchema<v.StringSchema<undefined>, v.StringSchema<undefined>, undefined>, undefined>;
3089
- readonly _meta: v.OptionalSchema<v.LooseObjectSchema<{
3090
- /**
3091
- * If specified, the caller is requesting out-of-band progress notifications for this request (as represented by notifications/progress). The value of this parameter is an opaque token that will be attached to any subsequent notifications. The receiver is not obligated to provide these notifications.
3092
- */
3093
- readonly progressToken: v.OptionalSchema<v.UnionSchema<[v.StringSchema<undefined>, v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>]>], undefined>, undefined>;
3094
- }, undefined>, undefined>;
3095
- }, undefined>;
3096
- }, undefined>, v.ObjectSchema<{
3097
- readonly method: v.LiteralSchema<"prompts/list", undefined>;
3098
- readonly params: v.OptionalSchema<v.ObjectSchema<{
3099
- /**
3100
- * An opaque token representing the current pagination position.
3101
- * If provided, the server should return results starting after this cursor.
3102
- */
3103
- readonly cursor: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
3104
- readonly _meta: v.OptionalSchema<v.LooseObjectSchema<{
3105
- /**
3106
- * If specified, the caller is requesting out-of-band progress notifications for this request (as represented by notifications/progress). The value of this parameter is an opaque token that will be attached to any subsequent notifications. The receiver is not obligated to provide these notifications.
3107
- */
3108
- readonly progressToken: v.OptionalSchema<v.UnionSchema<[v.StringSchema<undefined>, v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>]>], undefined>, undefined>;
3109
- }, undefined>, undefined>;
3110
- }, undefined>, undefined>;
3111
- }, undefined>, v.ObjectSchema<{
3112
- readonly method: v.LiteralSchema<"resources/list", undefined>;
3113
- readonly params: v.OptionalSchema<v.ObjectSchema<{
3114
- /**
3115
- * An opaque token representing the current pagination position.
3116
- * If provided, the server should return results starting after this cursor.
3117
- */
3118
- readonly cursor: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
3119
- readonly _meta: v.OptionalSchema<v.LooseObjectSchema<{
3120
- /**
3121
- * If specified, the caller is requesting out-of-band progress notifications for this request (as represented by notifications/progress). The value of this parameter is an opaque token that will be attached to any subsequent notifications. The receiver is not obligated to provide these notifications.
3122
- */
3123
- readonly progressToken: v.OptionalSchema<v.UnionSchema<[v.StringSchema<undefined>, v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>]>], undefined>, undefined>;
3124
- }, undefined>, undefined>;
3125
- }, undefined>, undefined>;
3126
- }, undefined>, v.ObjectSchema<{
3127
- readonly method: v.LiteralSchema<"resources/templates/list", undefined>;
3128
- readonly params: v.OptionalSchema<v.ObjectSchema<{
3129
- /**
3130
- * An opaque token representing the current pagination position.
3131
- * If provided, the server should return results starting after this cursor.
3132
- */
3133
- readonly cursor: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
3134
- readonly _meta: v.OptionalSchema<v.LooseObjectSchema<{
3135
- /**
3136
- * If specified, the caller is requesting out-of-band progress notifications for this request (as represented by notifications/progress). The value of this parameter is an opaque token that will be attached to any subsequent notifications. The receiver is not obligated to provide these notifications.
3137
- */
3138
- readonly progressToken: v.OptionalSchema<v.UnionSchema<[v.StringSchema<undefined>, v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>]>], undefined>, undefined>;
3139
- }, undefined>, undefined>;
3140
- }, undefined>, undefined>;
3141
- }, undefined>, v.ObjectSchema<{
3142
- readonly method: v.LiteralSchema<"resources/read", undefined>;
3143
- readonly params: v.ObjectSchema<{
3144
- /**
3145
- * The URI of the resource to read. The URI can use any protocol; it is up to the server how to interpret it.
3146
- */
3147
- readonly uri: v.StringSchema<undefined>;
3148
- readonly _meta: v.OptionalSchema<v.LooseObjectSchema<{
3149
- /**
3150
- * If specified, the caller is requesting out-of-band progress notifications for this request (as represented by notifications/progress). The value of this parameter is an opaque token that will be attached to any subsequent notifications. The receiver is not obligated to provide these notifications.
3151
- */
3152
- readonly progressToken: v.OptionalSchema<v.UnionSchema<[v.StringSchema<undefined>, v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>]>], undefined>, undefined>;
3153
- }, undefined>, undefined>;
3154
- }, undefined>;
3155
- }, undefined>, v.ObjectSchema<{
3156
- readonly method: v.LiteralSchema<"resources/subscribe", undefined>;
3157
- readonly params: v.ObjectSchema<{
3158
- /**
3159
- * The URI of the resource to subscribe to. The URI can use any protocol; it is up to the server how to interpret it.
3160
- */
3161
- readonly uri: v.StringSchema<undefined>;
3162
- readonly _meta: v.OptionalSchema<v.LooseObjectSchema<{
3163
- /**
3164
- * If specified, the caller is requesting out-of-band progress notifications for this request (as represented by notifications/progress). The value of this parameter is an opaque token that will be attached to any subsequent notifications. The receiver is not obligated to provide these notifications.
3165
- */
3166
- readonly progressToken: v.OptionalSchema<v.UnionSchema<[v.StringSchema<undefined>, v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>]>], undefined>, undefined>;
3167
- }, undefined>, undefined>;
3168
- }, undefined>;
3169
- }, undefined>, v.ObjectSchema<{
3170
- readonly method: v.LiteralSchema<"resources/unsubscribe", undefined>;
3171
- readonly params: v.ObjectSchema<{
3172
- /**
3173
- * The URI of the resource to unsubscribe from.
3174
- */
3175
- readonly uri: v.StringSchema<undefined>;
3176
- readonly _meta: v.OptionalSchema<v.LooseObjectSchema<{
3177
- /**
3178
- * If specified, the caller is requesting out-of-band progress notifications for this request (as represented by notifications/progress). The value of this parameter is an opaque token that will be attached to any subsequent notifications. The receiver is not obligated to provide these notifications.
3179
- */
3180
- readonly progressToken: v.OptionalSchema<v.UnionSchema<[v.StringSchema<undefined>, v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>]>], undefined>, undefined>;
3181
- }, undefined>, undefined>;
3182
- }, undefined>;
3183
- }, undefined>, v.ObjectSchema<{
3184
- readonly method: v.LiteralSchema<"tools/call", undefined>;
3185
- readonly params: v.ObjectSchema<{
3186
- readonly name: v.StringSchema<undefined>;
3187
- readonly arguments: v.OptionalSchema<v.RecordSchema<v.StringSchema<undefined>, v.UnknownSchema, undefined>, undefined>;
3188
- readonly _meta: v.OptionalSchema<v.LooseObjectSchema<{
3189
- /**
3190
- * If specified, the caller is requesting out-of-band progress notifications for this request (as represented by notifications/progress). The value of this parameter is an opaque token that will be attached to any subsequent notifications. The receiver is not obligated to provide these notifications.
3191
- */
3192
- readonly progressToken: v.OptionalSchema<v.UnionSchema<[v.StringSchema<undefined>, v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>]>], undefined>, undefined>;
3193
- }, undefined>, undefined>;
3194
- }, undefined>;
3195
- }, undefined>, v.ObjectSchema<{
3196
- readonly method: v.LiteralSchema<"tools/list", undefined>;
3197
- readonly params: v.OptionalSchema<v.ObjectSchema<{
3198
- /**
3199
- * An opaque token representing the current pagination position.
3200
- * If provided, the server should return results starting after this cursor.
3201
- */
3202
- readonly cursor: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
3203
- readonly _meta: v.OptionalSchema<v.LooseObjectSchema<{
3204
- /**
3205
- * If specified, the caller is requesting out-of-band progress notifications for this request (as represented by notifications/progress). The value of this parameter is an opaque token that will be attached to any subsequent notifications. The receiver is not obligated to provide these notifications.
3206
- */
3207
- readonly progressToken: v.OptionalSchema<v.UnionSchema<[v.StringSchema<undefined>, v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>]>], undefined>, undefined>;
3208
- }, undefined>, undefined>;
3209
- }, undefined>, undefined>;
3210
- }, undefined>], undefined>;
3211
- export const ClientNotificationSchema: v.UnionSchema<[v.ObjectSchema<{
3212
- readonly method: v.LiteralSchema<"notifications/cancelled", undefined>;
3213
- readonly params: v.ObjectSchema<{
3214
- /**
3215
- * The ID of the request to cancel.
3216
- *
3217
- * This MUST correspond to the ID of a request previously issued in the same direction.
3218
- */
3219
- readonly requestId: v.UnionSchema<[v.StringSchema<undefined>, v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>]>], undefined>;
3220
- /**
3221
- * An optional string describing the reason for the cancellation. This MAY be logged or presented to the user.
3222
- */
3223
- readonly reason: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
3224
- /**
3225
- * See [MCP specification](https://github.com/modelcontextprotocol/modelcontextprotocol/blob/47339c03c143bb4ec01a26e721a1b8fe66634ebe/docs/specification/draft/basic/index.mdx#general-fields)
3226
- * for notes on _meta usage.
3227
- */
3228
- readonly _meta: v.OptionalSchema<v.LooseObjectSchema<{}, undefined>, undefined>;
3229
- }, undefined>;
3230
- }, undefined>, v.ObjectSchema<{
3231
- readonly method: v.LiteralSchema<"notifications/progress", undefined>;
3232
- readonly params: v.ObjectSchema<{
3233
- /**
3234
- * The progress token which was given in the initial request, used to associate this notification with the request that is proceeding.
3235
- */
3236
- readonly progressToken: v.UnionSchema<[v.StringSchema<undefined>, v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>]>], undefined>;
3237
- /**
3238
- * The progress thus far. This should increase every time progress is made, even if the total is unknown.
3239
- */
3240
- readonly progress: v.NumberSchema<undefined>;
3241
- /**
3242
- * Total number of items to process (or total progress required), if known.
3243
- */
3244
- readonly total: v.OptionalSchema<v.NumberSchema<undefined>, undefined>;
3245
- /**
3246
- * An optional message describing the current progress.
3247
- */
3248
- readonly message: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
3249
- /**
3250
- * See [MCP specification](https://github.com/modelcontextprotocol/modelcontextprotocol/blob/47339c03c143bb4ec01a26e721a1b8fe66634ebe/docs/specification/draft/basic/index.mdx#general-fields)
3251
- * for notes on _meta usage.
3252
- */
3253
- readonly _meta: v.OptionalSchema<v.LooseObjectSchema<{}, undefined>, undefined>;
3254
- }, undefined>;
3255
- }, undefined>, v.ObjectSchema<{
3256
- readonly method: v.LiteralSchema<"notifications/initialized", undefined>;
3257
- readonly params: v.OptionalSchema<v.LooseObjectSchema<{
3258
- /**
3259
- * See [MCP specification](https://github.com/modelcontextprotocol/modelcontextprotocol/blob/47339c03c143bb4ec01a26e721a1b8fe66634ebe/docs/specification/draft/basic/index.mdx#general-fields)
3260
- * for notes on _meta usage.
3261
- */
3262
- readonly _meta: v.OptionalSchema<v.LooseObjectSchema<{}, undefined>, undefined>;
3263
- }, undefined>, undefined>;
3264
- }, undefined>, v.ObjectSchema<{
3265
- readonly method: v.LiteralSchema<"notifications/roots/list_changed", undefined>;
3266
- readonly params: v.OptionalSchema<v.LooseObjectSchema<{
3267
- /**
3268
- * See [MCP specification](https://github.com/modelcontextprotocol/modelcontextprotocol/blob/47339c03c143bb4ec01a26e721a1b8fe66634ebe/docs/specification/draft/basic/index.mdx#general-fields)
3269
- * for notes on _meta usage.
3270
- */
3271
- readonly _meta: v.OptionalSchema<v.LooseObjectSchema<{}, undefined>, undefined>;
3272
- }, undefined>, undefined>;
3273
- }, undefined>], undefined>;
3274
- export const ClientResultSchema: v.UnionSchema<[v.StrictObjectSchema<{
3275
- /**
3276
- * See [MCP specification](https://github.com/modelcontextprotocol/modelcontextprotocol/blob/47339c03c143bb4ec01a26e721a1b8fe66634ebe/docs/specification/draft/basic/index.mdx#general-fields)
3277
- * for notes on _meta usage.
3278
- */
3279
- readonly _meta: v.OptionalSchema<v.LooseObjectSchema<{}, undefined>, undefined>;
3280
- }, undefined>, v.ObjectSchema<{
3281
- /**
3282
- * The name of the model that generated the message.
3283
- */
3284
- readonly model: v.StringSchema<undefined>;
3285
- /**
3286
- * The reason why sampling stopped.
3287
- */
3288
- readonly stopReason: v.OptionalSchema<v.UnionSchema<[v.PicklistSchema<["endTurn", "stopSequence", "maxTokens"], undefined>, v.StringSchema<undefined>], undefined>, undefined>;
3289
- readonly role: v.PicklistSchema<["user", "assistant"], undefined>;
3290
- readonly content: v.VariantSchema<"type", [v.ObjectSchema<{
3291
- readonly type: v.LiteralSchema<"text", undefined>;
3292
- /**
3293
- * The text content of the message.
3294
- */
3295
- readonly text: v.StringSchema<undefined>;
3296
- /**
3297
- * See [MCP specification](https://github.com/modelcontextprotocol/modelcontextprotocol/blob/47339c03c143bb4ec01a26e721a1b8fe66634ebe/docs/specification/draft/basic/index.mdx#general-fields)
3298
- * for notes on _meta usage.
3299
- */
3300
- readonly _meta: v.OptionalSchema<v.ObjectSchema<{}, undefined>, undefined>;
3301
- }, undefined>, v.ObjectSchema<{
3302
- readonly type: v.LiteralSchema<"image", undefined>;
3303
- /**
3304
- * The base64-encoded image data.
3305
- */
3306
- readonly data: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.Base64Action<string, undefined>]>;
3307
- /**
3308
- * The MIME type of the image. Different providers may support different image types.
3309
- */
3310
- readonly mimeType: v.StringSchema<undefined>;
3311
- /**
3312
- * See [MCP specification](https://github.com/modelcontextprotocol/modelcontextprotocol/blob/47339c03c143bb4ec01a26e721a1b8fe66634ebe/docs/specification/draft/basic/index.mdx#general-fields)
3313
- * for notes on _meta usage.
3314
- */
3315
- readonly _meta: v.OptionalSchema<v.ObjectSchema<{}, undefined>, undefined>;
3316
- }, undefined>, v.ObjectSchema<{
3317
- readonly type: v.LiteralSchema<"audio", undefined>;
3318
- /**
3319
- * The base64-encoded audio data.
3320
- */
3321
- readonly data: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.Base64Action<string, undefined>]>;
3322
- /**
3323
- * The MIME type of the audio. Different providers may support different audio types.
3324
- */
3325
- readonly mimeType: v.StringSchema<undefined>;
3326
- /**
3327
- * See [MCP specification](https://github.com/modelcontextprotocol/modelcontextprotocol/blob/47339c03c143bb4ec01a26e721a1b8fe66634ebe/docs/specification/draft/basic/index.mdx#general-fields)
3328
- * for notes on _meta usage.
3329
- */
3330
- readonly _meta: v.OptionalSchema<v.ObjectSchema<{}, undefined>, undefined>;
3331
- }, undefined>], undefined>;
3332
- /**
3333
- * See [MCP specification](https://github.com/modelcontextprotocol/modelcontextprotocol/blob/47339c03c143bb4ec01a26e721a1b8fe66634ebe/docs/specification/draft/basic/index.mdx#general-fields)
3334
- * for notes on _meta usage.
3335
- */
3336
- readonly _meta: v.OptionalSchema<v.LooseObjectSchema<{}, undefined>, undefined>;
3337
- }, undefined>, v.ObjectSchema<{
3338
- /**
3339
- * The user's response action.
3340
- */
3341
- readonly action: v.PicklistSchema<["accept", "decline", "cancel"], undefined>;
3342
- /**
3343
- * The collected user input content (only present if action is "accept").
3344
- */
3345
- readonly content: v.OptionalSchema<v.RecordSchema<v.StringSchema<undefined>, v.UnknownSchema, undefined>, undefined>;
3346
- /**
3347
- * See [MCP specification](https://github.com/modelcontextprotocol/modelcontextprotocol/blob/47339c03c143bb4ec01a26e721a1b8fe66634ebe/docs/specification/draft/basic/index.mdx#general-fields)
3348
- * for notes on _meta usage.
3349
- */
3350
- readonly _meta: v.OptionalSchema<v.LooseObjectSchema<{}, undefined>, undefined>;
3351
- }, undefined>, v.ObjectSchema<{
3352
- readonly roots: v.ArraySchema<v.ObjectSchema<{
3353
- /**
3354
- * The URI identifying the root. This *must* start with file:// for now.
3355
- */
3356
- readonly uri: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.StartsWithAction<string, "file://", undefined>]>;
3357
- /**
3358
- * An optional name for the root.
3359
- */
3360
- readonly name: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
3361
- /**
3362
- * See [MCP specification](https://github.com/modelcontextprotocol/modelcontextprotocol/blob/47339c03c143bb4ec01a26e721a1b8fe66634ebe/docs/specification/draft/basic/index.mdx#general-fields)
3363
- * for notes on _meta usage.
3364
- */
3365
- readonly _meta: v.OptionalSchema<v.ObjectSchema<{}, undefined>, undefined>;
3366
- }, undefined>, undefined>;
3367
- /**
3368
- * See [MCP specification](https://github.com/modelcontextprotocol/modelcontextprotocol/blob/47339c03c143bb4ec01a26e721a1b8fe66634ebe/docs/specification/draft/basic/index.mdx#general-fields)
3369
- * for notes on _meta usage.
3370
- */
3371
- readonly _meta: v.OptionalSchema<v.LooseObjectSchema<{}, undefined>, undefined>;
3372
- }, undefined>], undefined>;
3373
- export const ServerRequestSchema: v.UnionSchema<[v.ObjectSchema<{
3374
- readonly method: v.LiteralSchema<"ping", undefined>;
3375
- readonly params: v.OptionalSchema<v.LooseObjectSchema<{
3376
- readonly _meta: v.OptionalSchema<v.LooseObjectSchema<{
3377
- /**
3378
- * If specified, the caller is requesting out-of-band progress notifications for this request (as represented by notifications/progress). The value of this parameter is an opaque token that will be attached to any subsequent notifications. The receiver is not obligated to provide these notifications.
3379
- */
3380
- readonly progressToken: v.OptionalSchema<v.UnionSchema<[v.StringSchema<undefined>, v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>]>], undefined>, undefined>;
3381
- }, undefined>, undefined>;
3382
- }, undefined>, undefined>;
3383
- }, undefined>, v.ObjectSchema<{
3384
- readonly method: v.LiteralSchema<"sampling/createMessage", undefined>;
3385
- readonly params: v.ObjectSchema<{
3386
- readonly messages: v.ArraySchema<v.ObjectSchema<{
3387
- readonly role: v.PicklistSchema<["user", "assistant"], undefined>;
3388
- readonly content: v.UnionSchema<[v.ObjectSchema<{
3389
- readonly type: v.LiteralSchema<"text", undefined>;
3390
- /**
3391
- * The text content of the message.
3392
- */
3393
- readonly text: v.StringSchema<undefined>;
3394
- /**
3395
- * See [MCP specification](https://github.com/modelcontextprotocol/modelcontextprotocol/blob/47339c03c143bb4ec01a26e721a1b8fe66634ebe/docs/specification/draft/basic/index.mdx#general-fields)
3396
- * for notes on _meta usage.
3397
- */
3398
- readonly _meta: v.OptionalSchema<v.ObjectSchema<{}, undefined>, undefined>;
3399
- }, undefined>, v.ObjectSchema<{
3400
- readonly type: v.LiteralSchema<"image", undefined>;
3401
- /**
3402
- * The base64-encoded image data.
3403
- */
3404
- readonly data: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.Base64Action<string, undefined>]>;
3405
- /**
3406
- * The MIME type of the image. Different providers may support different image types.
3407
- */
3408
- readonly mimeType: v.StringSchema<undefined>;
3409
- /**
3410
- * See [MCP specification](https://github.com/modelcontextprotocol/modelcontextprotocol/blob/47339c03c143bb4ec01a26e721a1b8fe66634ebe/docs/specification/draft/basic/index.mdx#general-fields)
3411
- * for notes on _meta usage.
3412
- */
3413
- readonly _meta: v.OptionalSchema<v.ObjectSchema<{}, undefined>, undefined>;
3414
- }, undefined>, v.ObjectSchema<{
3415
- readonly type: v.LiteralSchema<"audio", undefined>;
3416
- /**
3417
- * The base64-encoded audio data.
3418
- */
3419
- readonly data: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.Base64Action<string, undefined>]>;
3420
- /**
3421
- * The MIME type of the audio. Different providers may support different audio types.
3422
- */
3423
- readonly mimeType: v.StringSchema<undefined>;
3424
- /**
3425
- * See [MCP specification](https://github.com/modelcontextprotocol/modelcontextprotocol/blob/47339c03c143bb4ec01a26e721a1b8fe66634ebe/docs/specification/draft/basic/index.mdx#general-fields)
3426
- * for notes on _meta usage.
3427
- */
3428
- readonly _meta: v.OptionalSchema<v.ObjectSchema<{}, undefined>, undefined>;
3429
- }, undefined>], undefined>;
3430
- }, undefined>, undefined>;
3431
- /**
3432
- * An optional system prompt the server wants to use for sampling. The client MAY modify or omit this prompt.
3433
- */
3434
- readonly systemPrompt: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
3435
- /**
3436
- * A request to include context from one or more MCP servers (including the caller), to be attached to the prompt. The client MAY ignore this request.
3437
- */
3438
- readonly includeContext: v.OptionalSchema<v.PicklistSchema<["none", "thisServer", "allServers"], undefined>, undefined>;
3439
- readonly temperature: v.OptionalSchema<v.NumberSchema<undefined>, undefined>;
3440
- /**
3441
- * The maximum number of tokens to sample, as requested by the server. The client MAY choose to sample fewer tokens than requested.
3442
- */
3443
- readonly maxTokens: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>]>;
3444
- readonly stopSequences: v.OptionalSchema<v.ArraySchema<v.StringSchema<undefined>, undefined>, undefined>;
3445
- /**
3446
- * Optional metadata to pass through to the LLM provider. The format of this metadata is provider-specific.
3447
- */
3448
- readonly metadata: v.OptionalSchema<v.ObjectSchema<{}, undefined>, undefined>;
3449
- /**
3450
- * The server's preferences for which model to select.
3451
- */
3452
- readonly modelPreferences: v.OptionalSchema<v.ObjectSchema<{
3453
- /**
3454
- * Optional hints to use for model selection.
3455
- */
3456
- readonly hints: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
3457
- /**
3458
- * A hint for a model name.
3459
- */
3460
- readonly name: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
3461
- }, undefined>, undefined>, undefined>;
3462
- /**
3463
- * How much to prioritize cost when selecting a model.
3464
- */
3465
- readonly costPriority: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.MinValueAction<number, 0, undefined>, v.MaxValueAction<number, 1, undefined>]>, undefined>;
3466
- /**
3467
- * How much to prioritize sampling speed (latency) when selecting a model.
3468
- */
3469
- readonly speedPriority: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.MinValueAction<number, 0, undefined>, v.MaxValueAction<number, 1, undefined>]>, undefined>;
3470
- /**
3471
- * How much to prioritize intelligence and capabilities when selecting a model.
3472
- */
3473
- readonly intelligencePriority: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.MinValueAction<number, 0, undefined>, v.MaxValueAction<number, 1, undefined>]>, undefined>;
3474
- }, undefined>, undefined>;
3475
- readonly _meta: v.OptionalSchema<v.LooseObjectSchema<{
3476
- /**
3477
- * If specified, the caller is requesting out-of-band progress notifications for this request (as represented by notifications/progress). The value of this parameter is an opaque token that will be attached to any subsequent notifications. The receiver is not obligated to provide these notifications.
3478
- */
3479
- readonly progressToken: v.OptionalSchema<v.UnionSchema<[v.StringSchema<undefined>, v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>]>], undefined>, undefined>;
3480
- }, undefined>, undefined>;
3481
- }, undefined>;
3482
- }, undefined>, v.ObjectSchema<{
3483
- readonly method: v.LiteralSchema<"elicitation/create", undefined>;
3484
- readonly params: v.ObjectSchema<{
3485
- /**
3486
- * The message to present to the user.
3487
- */
3488
- readonly message: v.StringSchema<undefined>;
3489
- /**
3490
- * The schema for the requested user input.
3491
- */
3492
- readonly requestedSchema: v.ObjectSchema<{
3493
- readonly type: v.LiteralSchema<"object", undefined>;
3494
- readonly properties: v.RecordSchema<v.StringSchema<undefined>, v.UnionSchema<[v.ObjectSchema<{
3495
- readonly type: v.LiteralSchema<"boolean", undefined>;
3496
- readonly title: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
3497
- readonly description: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
3498
- readonly default: v.OptionalSchema<v.BooleanSchema<undefined>, undefined>;
3499
- }, undefined>, v.ObjectSchema<{
3500
- readonly type: v.LiteralSchema<"string", undefined>;
3501
- readonly title: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
3502
- readonly description: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
3503
- readonly minLength: v.OptionalSchema<v.NumberSchema<undefined>, undefined>;
3504
- readonly maxLength: v.OptionalSchema<v.NumberSchema<undefined>, undefined>;
3505
- readonly format: v.OptionalSchema<v.PicklistSchema<["email", "uri", "date", "date-time"], undefined>, undefined>;
3506
- }, undefined>, v.ObjectSchema<{
3507
- readonly type: v.PicklistSchema<["number", "integer"], undefined>;
3508
- readonly title: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
3509
- readonly description: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
3510
- readonly minimum: v.OptionalSchema<v.NumberSchema<undefined>, undefined>;
3511
- readonly maximum: v.OptionalSchema<v.NumberSchema<undefined>, undefined>;
3512
- }, undefined>, v.ObjectSchema<{
3513
- readonly type: v.LiteralSchema<"string", undefined>;
3514
- readonly title: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
3515
- readonly description: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
3516
- readonly enum: v.ArraySchema<v.StringSchema<undefined>, undefined>;
3517
- readonly enumNames: v.OptionalSchema<v.ArraySchema<v.StringSchema<undefined>, undefined>, undefined>;
3518
- }, undefined>], undefined>, undefined>;
3519
- readonly required: v.OptionalSchema<v.ArraySchema<v.StringSchema<undefined>, undefined>, undefined>;
3520
- }, undefined>;
3521
- readonly _meta: v.OptionalSchema<v.LooseObjectSchema<{
3522
- /**
3523
- * If specified, the caller is requesting out-of-band progress notifications for this request (as represented by notifications/progress). The value of this parameter is an opaque token that will be attached to any subsequent notifications. The receiver is not obligated to provide these notifications.
3524
- */
3525
- readonly progressToken: v.OptionalSchema<v.UnionSchema<[v.StringSchema<undefined>, v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>]>], undefined>, undefined>;
3526
- }, undefined>, undefined>;
3527
- }, undefined>;
3528
- }, undefined>, v.ObjectSchema<{
3529
- readonly method: v.LiteralSchema<"roots/list", undefined>;
3530
- readonly params: v.OptionalSchema<v.LooseObjectSchema<{
3531
- readonly _meta: v.OptionalSchema<v.LooseObjectSchema<{
3532
- /**
3533
- * If specified, the caller is requesting out-of-band progress notifications for this request (as represented by notifications/progress). The value of this parameter is an opaque token that will be attached to any subsequent notifications. The receiver is not obligated to provide these notifications.
3534
- */
3535
- readonly progressToken: v.OptionalSchema<v.UnionSchema<[v.StringSchema<undefined>, v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>]>], undefined>, undefined>;
3536
- }, undefined>, undefined>;
3537
- }, undefined>, undefined>;
3538
- }, undefined>], undefined>;
3539
- export const ServerNotificationSchema: v.UnionSchema<[v.ObjectSchema<{
3540
- readonly method: v.LiteralSchema<"notifications/cancelled", undefined>;
3541
- readonly params: v.ObjectSchema<{
3542
- /**
3543
- * The ID of the request to cancel.
3544
- *
3545
- * This MUST correspond to the ID of a request previously issued in the same direction.
3546
- */
3547
- readonly requestId: v.UnionSchema<[v.StringSchema<undefined>, v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>]>], undefined>;
3548
- /**
3549
- * An optional string describing the reason for the cancellation. This MAY be logged or presented to the user.
3550
- */
3551
- readonly reason: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
3552
- /**
3553
- * See [MCP specification](https://github.com/modelcontextprotocol/modelcontextprotocol/blob/47339c03c143bb4ec01a26e721a1b8fe66634ebe/docs/specification/draft/basic/index.mdx#general-fields)
3554
- * for notes on _meta usage.
3555
- */
3556
- readonly _meta: v.OptionalSchema<v.LooseObjectSchema<{}, undefined>, undefined>;
3557
- }, undefined>;
3558
- }, undefined>, v.ObjectSchema<{
3559
- readonly method: v.LiteralSchema<"notifications/progress", undefined>;
3560
- readonly params: v.ObjectSchema<{
3561
- /**
3562
- * The progress token which was given in the initial request, used to associate this notification with the request that is proceeding.
3563
- */
3564
- readonly progressToken: v.UnionSchema<[v.StringSchema<undefined>, v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>]>], undefined>;
3565
- /**
3566
- * The progress thus far. This should increase every time progress is made, even if the total is unknown.
3567
- */
3568
- readonly progress: v.NumberSchema<undefined>;
3569
- /**
3570
- * Total number of items to process (or total progress required), if known.
3571
- */
3572
- readonly total: v.OptionalSchema<v.NumberSchema<undefined>, undefined>;
3573
- /**
3574
- * An optional message describing the current progress.
3575
- */
3576
- readonly message: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
3577
- /**
3578
- * See [MCP specification](https://github.com/modelcontextprotocol/modelcontextprotocol/blob/47339c03c143bb4ec01a26e721a1b8fe66634ebe/docs/specification/draft/basic/index.mdx#general-fields)
3579
- * for notes on _meta usage.
3580
- */
3581
- readonly _meta: v.OptionalSchema<v.LooseObjectSchema<{}, undefined>, undefined>;
3582
- }, undefined>;
3583
- }, undefined>, v.ObjectSchema<{
3584
- readonly method: v.LiteralSchema<"notifications/message", undefined>;
3585
- readonly params: v.ObjectSchema<{
3586
- /**
3587
- * The severity of this log message.
3588
- */
3589
- readonly level: v.PicklistSchema<["debug", "info", "notice", "warning", "error", "critical", "alert", "emergency"], undefined>;
3590
- /**
3591
- * An optional name of the logger issuing this message.
3592
- */
3593
- readonly logger: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
3594
- /**
3595
- * The data to be logged, such as a string message or an object. Any JSON serializable type is allowed here.
3596
- */
3597
- readonly data: v.UnknownSchema;
3598
- /**
3599
- * See [MCP specification](https://github.com/modelcontextprotocol/modelcontextprotocol/blob/47339c03c143bb4ec01a26e721a1b8fe66634ebe/docs/specification/draft/basic/index.mdx#general-fields)
3600
- * for notes on _meta usage.
3601
- */
3602
- readonly _meta: v.OptionalSchema<v.LooseObjectSchema<{}, undefined>, undefined>;
3603
- }, undefined>;
3604
- }, undefined>, v.ObjectSchema<{
3605
- readonly method: v.LiteralSchema<"notifications/resources/updated", undefined>;
3606
- readonly params: v.ObjectSchema<{
3607
- /**
3608
- * The URI of the resource that has been updated. This might be a sub-resource of the one that the client actually subscribed to.
3609
- */
3610
- readonly uri: v.StringSchema<undefined>;
3611
- /**
3612
- * See [MCP specification](https://github.com/modelcontextprotocol/modelcontextprotocol/blob/47339c03c143bb4ec01a26e721a1b8fe66634ebe/docs/specification/draft/basic/index.mdx#general-fields)
3613
- * for notes on _meta usage.
3614
- */
3615
- readonly _meta: v.OptionalSchema<v.LooseObjectSchema<{}, undefined>, undefined>;
3616
- }, undefined>;
3617
- }, undefined>, v.ObjectSchema<{
3618
- readonly method: v.LiteralSchema<"notifications/resources/list_changed", undefined>;
3619
- readonly params: v.OptionalSchema<v.LooseObjectSchema<{
3620
- /**
3621
- * See [MCP specification](https://github.com/modelcontextprotocol/modelcontextprotocol/blob/47339c03c143bb4ec01a26e721a1b8fe66634ebe/docs/specification/draft/basic/index.mdx#general-fields)
3622
- * for notes on _meta usage.
3623
- */
3624
- readonly _meta: v.OptionalSchema<v.LooseObjectSchema<{}, undefined>, undefined>;
3625
- }, undefined>, undefined>;
3626
- }, undefined>, v.ObjectSchema<{
3627
- readonly method: v.LiteralSchema<"notifications/tools/list_changed", undefined>;
3628
- readonly params: v.OptionalSchema<v.LooseObjectSchema<{
3629
- /**
3630
- * See [MCP specification](https://github.com/modelcontextprotocol/modelcontextprotocol/blob/47339c03c143bb4ec01a26e721a1b8fe66634ebe/docs/specification/draft/basic/index.mdx#general-fields)
3631
- * for notes on _meta usage.
3632
- */
3633
- readonly _meta: v.OptionalSchema<v.LooseObjectSchema<{}, undefined>, undefined>;
3634
- }, undefined>, undefined>;
3635
- }, undefined>, v.ObjectSchema<{
3636
- readonly method: v.LiteralSchema<"notifications/prompts/list_changed", undefined>;
3637
- readonly params: v.OptionalSchema<v.LooseObjectSchema<{
3638
- /**
3639
- * See [MCP specification](https://github.com/modelcontextprotocol/modelcontextprotocol/blob/47339c03c143bb4ec01a26e721a1b8fe66634ebe/docs/specification/draft/basic/index.mdx#general-fields)
3640
- * for notes on _meta usage.
3641
- */
3642
- readonly _meta: v.OptionalSchema<v.LooseObjectSchema<{}, undefined>, undefined>;
3643
- }, undefined>, undefined>;
3644
- }, undefined>], undefined>;
3645
- export const ServerResultSchema: v.UnionSchema<[v.StrictObjectSchema<{
3646
- /**
3647
- * See [MCP specification](https://github.com/modelcontextprotocol/modelcontextprotocol/blob/47339c03c143bb4ec01a26e721a1b8fe66634ebe/docs/specification/draft/basic/index.mdx#general-fields)
3648
- * for notes on _meta usage.
3649
- */
3650
- readonly _meta: v.OptionalSchema<v.LooseObjectSchema<{}, undefined>, undefined>;
3651
- }, undefined>, v.ObjectSchema<{
3652
- /**
3653
- * The version of the Model Context Protocol that the server wants to use. This may not match the version that the client requested. If the client cannot support this version, it MUST disconnect.
3654
- */
3655
- readonly protocolVersion: v.StringSchema<undefined>;
3656
- readonly capabilities: v.ObjectSchema<{
3657
- /**
3658
- * Experimental, non-standard capabilities that the server supports.
3659
- */
3660
- readonly experimental: v.OptionalSchema<v.ObjectSchema<{}, undefined>, undefined>;
3661
- /**
3662
- * Present if the server supports sending log messages to the client.
3663
- */
3664
- readonly logging: v.OptionalSchema<v.ObjectSchema<{}, undefined>, undefined>;
3665
- /**
3666
- * Present if the server supports sending completions to the client.
3667
- */
3668
- readonly completions: v.OptionalSchema<v.ObjectSchema<{}, undefined>, undefined>;
3669
- /**
3670
- * Present if the server offers any prompt templates.
3671
- */
3672
- readonly prompts: v.OptionalSchema<v.ObjectSchema<{
3673
- /**
3674
- * Whether this server supports issuing notifications for changes to the prompt list.
3675
- */
3676
- readonly listChanged: v.OptionalSchema<v.BooleanSchema<undefined>, undefined>;
3677
- }, undefined>, undefined>;
3678
- /**
3679
- * Present if the server offers any resources to read.
3680
- */
3681
- readonly resources: v.OptionalSchema<v.ObjectSchema<{
3682
- /**
3683
- * Whether this server supports clients subscribing to resource updates.
3684
- */
3685
- readonly subscribe: v.OptionalSchema<v.BooleanSchema<undefined>, undefined>;
3686
- /**
3687
- * Whether this server supports issuing notifications for changes to the resource list.
3688
- */
3689
- readonly listChanged: v.OptionalSchema<v.BooleanSchema<undefined>, undefined>;
3690
- }, undefined>, undefined>;
3691
- /**
3692
- * Present if the server offers any tools to call.
3693
- */
3694
- readonly tools: v.OptionalSchema<v.ObjectSchema<{
3695
- /**
3696
- * Whether this server supports issuing notifications for changes to the tool list.
3697
- */
3698
- readonly listChanged: v.OptionalSchema<v.BooleanSchema<undefined>, undefined>;
3699
- }, undefined>, undefined>;
3700
- }, undefined>;
3701
- readonly serverInfo: v.ObjectSchema<{
3702
- readonly version: v.StringSchema<undefined>;
3703
- /** Intended for programmatic or logical use, but used as a display name in past specs or fallback */
3704
- readonly name: v.StringSchema<undefined>;
3705
- /**
3706
- * Intended for UI and end-user contexts — optimized to be human-readable and easily understood,
3707
- * even by those unfamiliar with domain-specific terminology.
3708
- *
3709
- * If not provided, the name should be used for display (except for Tool,
3710
- * where `annotations.title` should be given precedence over using `name`,
3711
- * if present).
3712
- */
3713
- readonly title: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
3714
- }, undefined>;
3715
- /**
3716
- * Instructions describing how to use the server and its features.
3717
- *
3718
- * This can be used by clients to improve the LLM's understanding of available tools, resources, etc. It can be thought of like a "hint" to the model. For example, this information MAY be added to the system prompt.
3719
- */
3720
- readonly instructions: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
3721
- /**
3722
- * See [MCP specification](https://github.com/modelcontextprotocol/modelcontextprotocol/blob/47339c03c143bb4ec01a26e721a1b8fe66634ebe/docs/specification/draft/basic/index.mdx#general-fields)
3723
- * for notes on _meta usage.
3724
- */
3725
- readonly _meta: v.OptionalSchema<v.LooseObjectSchema<{}, undefined>, undefined>;
3726
- }, undefined>, v.ObjectSchema<{
3727
- readonly completion: v.ObjectSchema<{
3728
- /**
3729
- * An array of completion values. Must not exceed 100 items.
3730
- */
3731
- readonly values: v.SchemaWithPipe<readonly [v.ArraySchema<v.StringSchema<undefined>, undefined>, v.MaxLengthAction<string[], 100, undefined>]>;
3732
- /**
3733
- * The total number of completion options available. This can exceed the number of values actually sent in the response.
3734
- */
3735
- readonly total: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>]>, undefined>;
3736
- /**
3737
- * Indicates whether there are additional completion options beyond those provided in the current response, even if the exact total is unknown.
3738
- */
3739
- readonly hasMore: v.OptionalSchema<v.BooleanSchema<undefined>, undefined>;
3740
- }, undefined>;
3741
- /**
3742
- * See [MCP specification](https://github.com/modelcontextprotocol/modelcontextprotocol/blob/47339c03c143bb4ec01a26e721a1b8fe66634ebe/docs/specification/draft/basic/index.mdx#general-fields)
3743
- * for notes on _meta usage.
3744
- */
3745
- readonly _meta: v.OptionalSchema<v.LooseObjectSchema<{}, undefined>, undefined>;
3746
- }, undefined>, v.ObjectSchema<{
3747
- /**
3748
- * An optional description for the prompt.
3749
- */
3750
- readonly description: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
3751
- readonly messages: v.ArraySchema<v.ObjectSchema<{
3752
- readonly role: v.PicklistSchema<["user", "assistant"], undefined>;
3753
- readonly content: v.UnionSchema<[v.ObjectSchema<{
3754
- readonly type: v.LiteralSchema<"text", undefined>;
3755
- /**
3756
- * The text content of the message.
3757
- */
3758
- readonly text: v.StringSchema<undefined>;
3759
- /**
3760
- * See [MCP specification](https://github.com/modelcontextprotocol/modelcontextprotocol/blob/47339c03c143bb4ec01a26e721a1b8fe66634ebe/docs/specification/draft/basic/index.mdx#general-fields)
3761
- * for notes on _meta usage.
3762
- */
3763
- readonly _meta: v.OptionalSchema<v.ObjectSchema<{}, undefined>, undefined>;
3764
- }, undefined>, v.ObjectSchema<{
3765
- readonly type: v.LiteralSchema<"image", undefined>;
3766
- /**
3767
- * The base64-encoded image data.
3768
- */
3769
- readonly data: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.Base64Action<string, undefined>]>;
3770
- /**
3771
- * The MIME type of the image. Different providers may support different image types.
3772
- */
3773
- readonly mimeType: v.StringSchema<undefined>;
3774
- /**
3775
- * See [MCP specification](https://github.com/modelcontextprotocol/modelcontextprotocol/blob/47339c03c143bb4ec01a26e721a1b8fe66634ebe/docs/specification/draft/basic/index.mdx#general-fields)
3776
- * for notes on _meta usage.
3777
- */
3778
- readonly _meta: v.OptionalSchema<v.ObjectSchema<{}, undefined>, undefined>;
3779
- }, undefined>, v.ObjectSchema<{
3780
- readonly type: v.LiteralSchema<"audio", undefined>;
3781
- /**
3782
- * The base64-encoded audio data.
3783
- */
3784
- readonly data: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.Base64Action<string, undefined>]>;
3785
- /**
3786
- * The MIME type of the audio. Different providers may support different audio types.
3787
- */
3788
- readonly mimeType: v.StringSchema<undefined>;
3789
- /**
3790
- * See [MCP specification](https://github.com/modelcontextprotocol/modelcontextprotocol/blob/47339c03c143bb4ec01a26e721a1b8fe66634ebe/docs/specification/draft/basic/index.mdx#general-fields)
3791
- * for notes on _meta usage.
3792
- */
3793
- readonly _meta: v.OptionalSchema<v.ObjectSchema<{}, undefined>, undefined>;
3794
- }, undefined>, v.ObjectSchema<{
3795
- readonly type: v.LiteralSchema<"resource_link", undefined>;
3796
- /**
3797
- * The URI of this resource.
3798
- */
3799
- readonly uri: v.StringSchema<undefined>;
3800
- /**
3801
- * A description of what this resource represents.
3802
- *
3803
- * This can be used by clients to improve the LLM's understanding of available resources. It can be thought of like a "hint" to the model.
3804
- */
3805
- readonly description: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
3806
- /**
3807
- * The MIME type of this resource, if known.
3808
- */
3809
- readonly mimeType: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
3810
- /**
3811
- * See [MCP specification](https://github.com/modelcontextprotocol/modelcontextprotocol/blob/47339c03c143bb4ec01a26e721a1b8fe66634ebe/docs/specification/draft/basic/index.mdx#general-fields)
3812
- * for notes on _meta usage.
3813
- */
3814
- readonly _meta: v.OptionalSchema<v.ObjectSchema<{}, undefined>, undefined>;
3815
- /** Intended for programmatic or logical use, but used as a display name in past specs or fallback */
3816
- readonly name: v.StringSchema<undefined>;
3817
- /**
3818
- * Intended for UI and end-user contexts — optimized to be human-readable and easily understood,
3819
- * even by those unfamiliar with domain-specific terminology.
3820
- *
3821
- * If not provided, the name should be used for display (except for Tool,
3822
- * where `annotations.title` should be given precedence over using `name`,
3823
- * if present).
3824
- */
3825
- readonly title: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
3826
- }, undefined>, v.ObjectSchema<{
3827
- readonly type: v.LiteralSchema<"resource", undefined>;
3828
- readonly resource: v.UnionSchema<[v.ObjectSchema<{
3829
- /**
3830
- * The text of the item. This must only be set if the item can actually be represented as text (not binary data).
3831
- */
3832
- readonly text: v.StringSchema<undefined>;
3833
- /**
3834
- * The URI of this resource.
3835
- */
3836
- readonly uri: v.StringSchema<undefined>;
3837
- /**
3838
- * The MIME type of this resource, if known.
3839
- */
3840
- readonly mimeType: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
3841
- /**
3842
- * See [MCP specification](https://github.com/modelcontextprotocol/modelcontextprotocol/blob/47339c03c143bb4ec01a26e721a1b8fe66634ebe/docs/specification/draft/basic/index.mdx#general-fields)
3843
- * for notes on _meta usage.
3844
- */
3845
- readonly _meta: v.OptionalSchema<v.ObjectSchema<{}, undefined>, undefined>;
3846
- }, undefined>, v.ObjectSchema<{
3847
- /**
3848
- * A base64-encoded string representing the binary data of the item.
3849
- */
3850
- readonly blob: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.Base64Action<string, undefined>]>;
3851
- /**
3852
- * The URI of this resource.
3853
- */
3854
- readonly uri: v.StringSchema<undefined>;
3855
- /**
3856
- * The MIME type of this resource, if known.
3857
- */
3858
- readonly mimeType: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
3859
- /**
3860
- * See [MCP specification](https://github.com/modelcontextprotocol/modelcontextprotocol/blob/47339c03c143bb4ec01a26e721a1b8fe66634ebe/docs/specification/draft/basic/index.mdx#general-fields)
3861
- * for notes on _meta usage.
3862
- */
3863
- readonly _meta: v.OptionalSchema<v.ObjectSchema<{}, undefined>, undefined>;
3864
- }, undefined>], undefined>;
3865
- /**
3866
- * See [MCP specification](https://github.com/modelcontextprotocol/modelcontextprotocol/blob/47339c03c143bb4ec01a26e721a1b8fe66634ebe/docs/specification/draft/basic/index.mdx#general-fields)
3867
- * for notes on _meta usage.
3868
- */
3869
- readonly _meta: v.OptionalSchema<v.ObjectSchema<{}, undefined>, undefined>;
3870
- }, undefined>], undefined>;
3871
- }, undefined>, undefined>;
3872
- /**
3873
- * See [MCP specification](https://github.com/modelcontextprotocol/modelcontextprotocol/blob/47339c03c143bb4ec01a26e721a1b8fe66634ebe/docs/specification/draft/basic/index.mdx#general-fields)
3874
- * for notes on _meta usage.
3875
- */
3876
- readonly _meta: v.OptionalSchema<v.LooseObjectSchema<{}, undefined>, undefined>;
3877
- }, undefined>, v.ObjectSchema<{
3878
- readonly prompts: v.ArraySchema<v.ObjectSchema<{
3879
- /**
3880
- * An optional description of what this prompt provides
3881
- */
3882
- readonly description: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
3883
- /**
3884
- * A list of arguments to use for templating the prompt.
3885
- */
3886
- readonly arguments: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
3887
- /**
3888
- * The name of the argument.
3889
- */
3890
- readonly name: v.StringSchema<undefined>;
3891
- /**
3892
- * A human-readable description of the argument.
3893
- */
3894
- readonly description: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
3895
- /**
3896
- * Whether this argument must be provided.
3897
- */
3898
- readonly required: v.OptionalSchema<v.BooleanSchema<undefined>, undefined>;
3899
- }, undefined>, undefined>, undefined>;
3900
- /**
3901
- * See [MCP specification](https://github.com/modelcontextprotocol/modelcontextprotocol/blob/47339c03c143bb4ec01a26e721a1b8fe66634ebe/docs/specification/draft/basic/index.mdx#general-fields)
3902
- * for notes on _meta usage.
3903
- */
3904
- readonly _meta: v.OptionalSchema<v.ObjectSchema<{}, undefined>, undefined>;
3905
- /** Intended for programmatic or logical use, but used as a display name in past specs or fallback */
3906
- readonly name: v.StringSchema<undefined>;
3907
- /**
3908
- * Intended for UI and end-user contexts — optimized to be human-readable and easily understood,
3909
- * even by those unfamiliar with domain-specific terminology.
3910
- *
3911
- * If not provided, the name should be used for display (except for Tool,
3912
- * where `annotations.title` should be given precedence over using `name`,
3913
- * if present).
3914
- */
3915
- readonly title: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
3916
- }, undefined>, undefined>;
3917
- /**
3918
- * An opaque token representing the pagination position after the last returned result.
3919
- * If present, there may be more results available.
3920
- */
3921
- readonly nextCursor: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
3922
- /**
3923
- * See [MCP specification](https://github.com/modelcontextprotocol/modelcontextprotocol/blob/47339c03c143bb4ec01a26e721a1b8fe66634ebe/docs/specification/draft/basic/index.mdx#general-fields)
3924
- * for notes on _meta usage.
3925
- */
3926
- readonly _meta: v.OptionalSchema<v.LooseObjectSchema<{}, undefined>, undefined>;
3927
- }, undefined>, v.ObjectSchema<{
3928
- readonly resources: v.ArraySchema<v.ObjectSchema<{
3929
- /**
3930
- * The URI of this resource.
3931
- */
3932
- readonly uri: v.StringSchema<undefined>;
3933
- /**
3934
- * A description of what this resource represents.
3935
- *
3936
- * This can be used by clients to improve the LLM's understanding of available resources. It can be thought of like a "hint" to the model.
3937
- */
3938
- readonly description: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
3939
- /**
3940
- * The MIME type of this resource, if known.
3941
- */
3942
- readonly mimeType: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
3943
- /**
3944
- * See [MCP specification](https://github.com/modelcontextprotocol/modelcontextprotocol/blob/47339c03c143bb4ec01a26e721a1b8fe66634ebe/docs/specification/draft/basic/index.mdx#general-fields)
3945
- * for notes on _meta usage.
3946
- */
3947
- readonly _meta: v.OptionalSchema<v.ObjectSchema<{}, undefined>, undefined>;
3948
- /** Intended for programmatic or logical use, but used as a display name in past specs or fallback */
3949
- readonly name: v.StringSchema<undefined>;
3950
- /**
3951
- * Intended for UI and end-user contexts — optimized to be human-readable and easily understood,
3952
- * even by those unfamiliar with domain-specific terminology.
3953
- *
3954
- * If not provided, the name should be used for display (except for Tool,
3955
- * where `annotations.title` should be given precedence over using `name`,
3956
- * if present).
3957
- */
3958
- readonly title: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
3959
- }, undefined>, undefined>;
3960
- /**
3961
- * An opaque token representing the pagination position after the last returned result.
3962
- * If present, there may be more results available.
3963
- */
3964
- readonly nextCursor: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
3965
- /**
3966
- * See [MCP specification](https://github.com/modelcontextprotocol/modelcontextprotocol/blob/47339c03c143bb4ec01a26e721a1b8fe66634ebe/docs/specification/draft/basic/index.mdx#general-fields)
3967
- * for notes on _meta usage.
3968
- */
3969
- readonly _meta: v.OptionalSchema<v.LooseObjectSchema<{}, undefined>, undefined>;
3970
- }, undefined>, v.ObjectSchema<{
3971
- readonly resourceTemplates: v.ArraySchema<v.ObjectSchema<{
3972
- /**
3973
- * A URI template (according to RFC 6570) that can be used to construct resource URIs.
3974
- */
3975
- readonly uriTemplate: v.StringSchema<undefined>;
3976
- /**
3977
- * A description of what this template is for.
3978
- *
3979
- * This can be used by clients to improve the LLM's understanding of available resources. It can be thought of like a "hint" to the model.
3980
- */
3981
- readonly description: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
3982
- /**
3983
- * The MIME type for all resources that match this template. This should only be included if all resources matching this template have the same type.
3984
- */
3985
- readonly mimeType: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
3986
- /**
3987
- * See [MCP specification](https://github.com/modelcontextprotocol/modelcontextprotocol/blob/47339c03c143bb4ec01a26e721a1b8fe66634ebe/docs/specification/draft/basic/index.mdx#general-fields)
3988
- * for notes on _meta usage.
3989
- */
3990
- readonly _meta: v.OptionalSchema<v.ObjectSchema<{}, undefined>, undefined>;
3991
- /** Intended for programmatic or logical use, but used as a display name in past specs or fallback */
3992
- readonly name: v.StringSchema<undefined>;
3993
- /**
3994
- * Intended for UI and end-user contexts — optimized to be human-readable and easily understood,
3995
- * even by those unfamiliar with domain-specific terminology.
3996
- *
3997
- * If not provided, the name should be used for display (except for Tool,
3998
- * where `annotations.title` should be given precedence over using `name`,
3999
- * if present).
4000
- */
4001
- readonly title: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
4002
- }, undefined>, undefined>;
4003
- /**
4004
- * An opaque token representing the pagination position after the last returned result.
4005
- * If present, there may be more results available.
4006
- */
4007
- readonly nextCursor: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
4008
- /**
4009
- * See [MCP specification](https://github.com/modelcontextprotocol/modelcontextprotocol/blob/47339c03c143bb4ec01a26e721a1b8fe66634ebe/docs/specification/draft/basic/index.mdx#general-fields)
4010
- * for notes on _meta usage.
4011
- */
4012
- readonly _meta: v.OptionalSchema<v.LooseObjectSchema<{}, undefined>, undefined>;
4013
- }, undefined>, v.ObjectSchema<{
4014
- readonly contents: v.ArraySchema<v.UnionSchema<[v.ObjectSchema<{
4015
- /**
4016
- * The text of the item. This must only be set if the item can actually be represented as text (not binary data).
4017
- */
4018
- readonly text: v.StringSchema<undefined>;
4019
- /**
4020
- * The URI of this resource.
4021
- */
4022
- readonly uri: v.StringSchema<undefined>;
4023
- /**
4024
- * The MIME type of this resource, if known.
4025
- */
4026
- readonly mimeType: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
4027
- /**
4028
- * See [MCP specification](https://github.com/modelcontextprotocol/modelcontextprotocol/blob/47339c03c143bb4ec01a26e721a1b8fe66634ebe/docs/specification/draft/basic/index.mdx#general-fields)
4029
- * for notes on _meta usage.
4030
- */
4031
- readonly _meta: v.OptionalSchema<v.ObjectSchema<{}, undefined>, undefined>;
4032
- }, undefined>, v.ObjectSchema<{
4033
- /**
4034
- * A base64-encoded string representing the binary data of the item.
4035
- */
4036
- readonly blob: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.Base64Action<string, undefined>]>;
4037
- /**
4038
- * The URI of this resource.
4039
- */
4040
- readonly uri: v.StringSchema<undefined>;
4041
- /**
4042
- * The MIME type of this resource, if known.
4043
- */
4044
- readonly mimeType: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
4045
- /**
4046
- * See [MCP specification](https://github.com/modelcontextprotocol/modelcontextprotocol/blob/47339c03c143bb4ec01a26e721a1b8fe66634ebe/docs/specification/draft/basic/index.mdx#general-fields)
4047
- * for notes on _meta usage.
4048
- */
4049
- readonly _meta: v.OptionalSchema<v.ObjectSchema<{}, undefined>, undefined>;
4050
- }, undefined>], undefined>, undefined>;
4051
- /**
4052
- * See [MCP specification](https://github.com/modelcontextprotocol/modelcontextprotocol/blob/47339c03c143bb4ec01a26e721a1b8fe66634ebe/docs/specification/draft/basic/index.mdx#general-fields)
4053
- * for notes on _meta usage.
4054
- */
4055
- readonly _meta: v.OptionalSchema<v.LooseObjectSchema<{}, undefined>, undefined>;
4056
- }, undefined>, v.ObjectSchema<{
4057
- /**
4058
- * A list of content objects that represent the result of the tool call.
4059
- *
4060
- * If the Tool does not define an outputSchema, this field MUST be present in the result.
4061
- * For backwards compatibility, this field is always present, but it may be empty.
4062
- */
4063
- readonly content: v.OptionalSchema<v.ArraySchema<v.UnionSchema<[v.ObjectSchema<{
4064
- readonly type: v.LiteralSchema<"text", undefined>;
4065
- /**
4066
- * The text content of the message.
4067
- */
4068
- readonly text: v.StringSchema<undefined>;
4069
- /**
4070
- * See [MCP specification](https://github.com/modelcontextprotocol/modelcontextprotocol/blob/47339c03c143bb4ec01a26e721a1b8fe66634ebe/docs/specification/draft/basic/index.mdx#general-fields)
4071
- * for notes on _meta usage.
4072
- */
4073
- readonly _meta: v.OptionalSchema<v.ObjectSchema<{}, undefined>, undefined>;
4074
- }, undefined>, v.ObjectSchema<{
4075
- readonly type: v.LiteralSchema<"image", undefined>;
4076
- /**
4077
- * The base64-encoded image data.
4078
- */
4079
- readonly data: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.Base64Action<string, undefined>]>;
4080
- /**
4081
- * The MIME type of the image. Different providers may support different image types.
4082
- */
4083
- readonly mimeType: v.StringSchema<undefined>;
4084
- /**
4085
- * See [MCP specification](https://github.com/modelcontextprotocol/modelcontextprotocol/blob/47339c03c143bb4ec01a26e721a1b8fe66634ebe/docs/specification/draft/basic/index.mdx#general-fields)
4086
- * for notes on _meta usage.
4087
- */
4088
- readonly _meta: v.OptionalSchema<v.ObjectSchema<{}, undefined>, undefined>;
4089
- }, undefined>, v.ObjectSchema<{
4090
- readonly type: v.LiteralSchema<"audio", undefined>;
4091
- /**
4092
- * The base64-encoded audio data.
4093
- */
4094
- readonly data: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.Base64Action<string, undefined>]>;
4095
- /**
4096
- * The MIME type of the audio. Different providers may support different audio types.
4097
- */
4098
- readonly mimeType: v.StringSchema<undefined>;
4099
- /**
4100
- * See [MCP specification](https://github.com/modelcontextprotocol/modelcontextprotocol/blob/47339c03c143bb4ec01a26e721a1b8fe66634ebe/docs/specification/draft/basic/index.mdx#general-fields)
4101
- * for notes on _meta usage.
4102
- */
4103
- readonly _meta: v.OptionalSchema<v.ObjectSchema<{}, undefined>, undefined>;
4104
- }, undefined>, v.ObjectSchema<{
4105
- readonly type: v.LiteralSchema<"resource_link", undefined>;
4106
- /**
4107
- * The URI of this resource.
4108
- */
4109
- readonly uri: v.StringSchema<undefined>;
4110
- /**
4111
- * A description of what this resource represents.
4112
- *
4113
- * This can be used by clients to improve the LLM's understanding of available resources. It can be thought of like a "hint" to the model.
4114
- */
4115
- readonly description: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
4116
- /**
4117
- * The MIME type of this resource, if known.
4118
- */
4119
- readonly mimeType: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
4120
- /**
4121
- * See [MCP specification](https://github.com/modelcontextprotocol/modelcontextprotocol/blob/47339c03c143bb4ec01a26e721a1b8fe66634ebe/docs/specification/draft/basic/index.mdx#general-fields)
4122
- * for notes on _meta usage.
4123
- */
4124
- readonly _meta: v.OptionalSchema<v.ObjectSchema<{}, undefined>, undefined>;
4125
- /** Intended for programmatic or logical use, but used as a display name in past specs or fallback */
4126
- readonly name: v.StringSchema<undefined>;
4127
- /**
4128
- * Intended for UI and end-user contexts — optimized to be human-readable and easily understood,
4129
- * even by those unfamiliar with domain-specific terminology.
4130
- *
4131
- * If not provided, the name should be used for display (except for Tool,
4132
- * where `annotations.title` should be given precedence over using `name`,
4133
- * if present).
4134
- */
4135
- readonly title: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
4136
- }, undefined>, v.ObjectSchema<{
4137
- readonly type: v.LiteralSchema<"resource", undefined>;
4138
- readonly resource: v.UnionSchema<[v.ObjectSchema<{
4139
- /**
4140
- * The text of the item. This must only be set if the item can actually be represented as text (not binary data).
4141
- */
4142
- readonly text: v.StringSchema<undefined>;
4143
- /**
4144
- * The URI of this resource.
4145
- */
4146
- readonly uri: v.StringSchema<undefined>;
4147
- /**
4148
- * The MIME type of this resource, if known.
4149
- */
4150
- readonly mimeType: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
4151
- /**
4152
- * See [MCP specification](https://github.com/modelcontextprotocol/modelcontextprotocol/blob/47339c03c143bb4ec01a26e721a1b8fe66634ebe/docs/specification/draft/basic/index.mdx#general-fields)
4153
- * for notes on _meta usage.
4154
- */
4155
- readonly _meta: v.OptionalSchema<v.ObjectSchema<{}, undefined>, undefined>;
4156
- }, undefined>, v.ObjectSchema<{
4157
- /**
4158
- * A base64-encoded string representing the binary data of the item.
4159
- */
4160
- readonly blob: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.Base64Action<string, undefined>]>;
4161
- /**
4162
- * The URI of this resource.
4163
- */
4164
- readonly uri: v.StringSchema<undefined>;
4165
- /**
4166
- * The MIME type of this resource, if known.
4167
- */
4168
- readonly mimeType: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
4169
- /**
4170
- * See [MCP specification](https://github.com/modelcontextprotocol/modelcontextprotocol/blob/47339c03c143bb4ec01a26e721a1b8fe66634ebe/docs/specification/draft/basic/index.mdx#general-fields)
4171
- * for notes on _meta usage.
4172
- */
4173
- readonly _meta: v.OptionalSchema<v.ObjectSchema<{}, undefined>, undefined>;
4174
- }, undefined>], undefined>;
4175
- /**
4176
- * See [MCP specification](https://github.com/modelcontextprotocol/modelcontextprotocol/blob/47339c03c143bb4ec01a26e721a1b8fe66634ebe/docs/specification/draft/basic/index.mdx#general-fields)
4177
- * for notes on _meta usage.
4178
- */
4179
- readonly _meta: v.OptionalSchema<v.ObjectSchema<{}, undefined>, undefined>;
4180
- }, undefined>], undefined>, undefined>, readonly []>;
4181
- /**
4182
- * An object containing structured tool output.
4183
- *
4184
- * If the Tool defines an outputSchema, this field MUST be present in the result, and contain a JSON object that matches the schema.
4185
- */
4186
- readonly structuredContent: v.OptionalSchema<v.LooseObjectSchema<{}, undefined>, undefined>;
4187
- /**
4188
- * Whether the tool call ended in an error.
4189
- *
4190
- * If not set, this is assumed to be false (the call was successful).
4191
- *
4192
- * Any errors that originate from the tool SHOULD be reported inside the result
4193
- * object, with `isError` set to true, _not_ as an MCP protocol-level error
4194
- * response. Otherwise, the LLM would not be able to see that an error occurred
4195
- * and self-correct.
4196
- *
4197
- * However, any errors in _finding_ the tool, an error indicating that the
4198
- * server does not support tool calls, or any other exceptional conditions,
4199
- * should be reported as an MCP error response.
4200
- */
4201
- readonly isError: v.OptionalSchema<v.BooleanSchema<undefined>, undefined>;
4202
- /**
4203
- * See [MCP specification](https://github.com/modelcontextprotocol/modelcontextprotocol/blob/47339c03c143bb4ec01a26e721a1b8fe66634ebe/docs/specification/draft/basic/index.mdx#general-fields)
4204
- * for notes on _meta usage.
4205
- */
4206
- readonly _meta: v.OptionalSchema<v.LooseObjectSchema<{}, undefined>, undefined>;
4207
- }, undefined>, v.ObjectSchema<{
4208
- readonly tools: v.ArraySchema<v.ObjectSchema<{
4209
- /**
4210
- * A human-readable description of the tool.
4211
- */
4212
- readonly description: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
4213
- /**
4214
- * A JSON Schema object defining the expected parameters for the tool.
4215
- */
4216
- readonly inputSchema: v.ObjectSchema<{
4217
- readonly type: v.LiteralSchema<"object", undefined>;
4218
- readonly properties: v.OptionalSchema<v.ObjectSchema<{}, undefined>, undefined>;
4219
- readonly required: v.OptionalSchema<v.ArraySchema<v.StringSchema<undefined>, undefined>, undefined>;
4220
- }, undefined>;
4221
- /**
4222
- * An optional JSON Schema object defining the structure of the tool's output returned in
4223
- * the structuredContent field of a CallToolResult.
4224
- */
4225
- readonly outputSchema: v.OptionalSchema<v.ObjectSchema<{
4226
- readonly type: v.LiteralSchema<"object", undefined>;
4227
- readonly properties: v.OptionalSchema<v.ObjectSchema<{}, undefined>, undefined>;
4228
- readonly required: v.OptionalSchema<v.ArraySchema<v.StringSchema<undefined>, undefined>, undefined>;
4229
- }, undefined>, undefined>;
4230
- /**
4231
- * Optional additional tool information.
4232
- */
4233
- readonly annotations: v.OptionalSchema<v.ObjectSchema<{
4234
- /**
4235
- * A human-readable title for the tool.
4236
- */
4237
- readonly title: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
4238
- /**
4239
- * If true, the tool does not modify its environment.
4240
- *
4241
- * Default: false
4242
- */
4243
- readonly readOnlyHint: v.OptionalSchema<v.BooleanSchema<undefined>, undefined>;
4244
- /**
4245
- * If true, the tool may perform destructive updates to its environment.
4246
- * If false, the tool performs only additive updates.
4247
- *
4248
- * (This property is meaningful only when `readOnlyHint == false`)
4249
- *
4250
- * Default: true
4251
- */
4252
- readonly destructiveHint: v.OptionalSchema<v.BooleanSchema<undefined>, undefined>;
4253
- /**
4254
- * If true, calling the tool repeatedly with the same arguments
4255
- * will have no additional effect on the its environment.
4256
- *
4257
- * (This property is meaningful only when `readOnlyHint == false`)
4258
- *
4259
- * Default: false
4260
- */
4261
- readonly idempotentHint: v.OptionalSchema<v.BooleanSchema<undefined>, undefined>;
4262
- /**
4263
- * If true, this tool may interact with an "open world" of external
4264
- * entities. If false, the tool's domain of interaction is closed.
4265
- * For example, the world of a web search tool is open, whereas that
4266
- * of a memory tool is not.
4267
- *
4268
- * Default: true
4269
- */
4270
- readonly openWorldHint: v.OptionalSchema<v.BooleanSchema<undefined>, undefined>;
4271
- }, undefined>, undefined>;
4272
- /**
4273
- * See [MCP specification](https://github.com/modelcontextprotocol/modelcontextprotocol/blob/47339c03c143bb4ec01a26e721a1b8fe66634ebe/docs/specification/draft/basic/index.mdx#general-fields)
4274
- * for notes on _meta usage.
4275
- */
4276
- readonly _meta: v.OptionalSchema<v.ObjectSchema<{}, undefined>, undefined>;
4277
- /** Intended for programmatic or logical use, but used as a display name in past specs or fallback */
4278
- readonly name: v.StringSchema<undefined>;
4279
- /**
4280
- * Intended for UI and end-user contexts — optimized to be human-readable and easily understood,
4281
- * even by those unfamiliar with domain-specific terminology.
4282
- *
4283
- * If not provided, the name should be used for display (except for Tool,
4284
- * where `annotations.title` should be given precedence over using `name`,
4285
- * if present).
4286
- */
4287
- readonly title: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
4288
- }, undefined>, undefined>;
4289
- /**
4290
- * An opaque token representing the pagination position after the last returned result.
4291
- * If present, there may be more results available.
4292
- */
4293
- readonly nextCursor: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
4294
- /**
4295
- * See [MCP specification](https://github.com/modelcontextprotocol/modelcontextprotocol/blob/47339c03c143bb4ec01a26e721a1b8fe66634ebe/docs/specification/draft/basic/index.mdx#general-fields)
4296
- * for notes on _meta usage.
4297
- */
4298
- readonly _meta: v.OptionalSchema<v.LooseObjectSchema<{}, undefined>, undefined>;
4299
- }, undefined>], undefined>;
4300
- export type ClientCapabilities = v.InferInput<typeof ClientCapabilitiesSchema>;
4301
- export type ServerCapabilities = v.InferInput<typeof ServerCapabilitiesSchema>;
4302
- export type ClientInfo = v.InferInput<typeof ImplementationSchema>;
4303
- export type ServerInfo = v.InferInput<typeof ImplementationSchema>;
4304
- export type InitializeRequestParams = v.InferInput<typeof InitializeRequestParamsSchema>;
4305
- export type CallToolResult = v.InferInput<typeof CallToolResultSchema>;
4306
- export type ReadResourceResult = v.InferInput<typeof ReadResourceResultSchema>;
4307
- export type GetPromptResult = v.InferInput<typeof GetPromptResultSchema>;
4308
- export type CompleteResult = v.InferInput<typeof CompleteResultSchema>;
4309
- export type CreateMessageRequestParams = v.InferInput<typeof CreateMessageRequestParamsSchema>;
4310
- export type CreateMessageResult = v.InferInput<typeof CreateMessageResultSchema>;
4311
- export type ModelPreferences = v.InferInput<typeof ModelPreferencesSchema>;
4312
- export type SamplingMessage = v.InferInput<typeof SamplingMessageSchema>;
4313
- export type ModelHint = v.InferInput<typeof ModelHintSchema>;
4314
- export type Resource = v.InferInput<typeof ResourceSchema>;
4315
- export type JSONRPCRequest = v.InferInput<typeof JSONRPCRequestSchema>;
4316
- export type JSONRPCResponse = v.InferInput<typeof JSONRPCResponseSchema>;
4317
- export type LoggingLevel = v.InferInput<typeof LoggingLevelSchema>;
4318
- export type ToolAnnotations = v.InferInput<typeof ToolAnnotationsSchema>;
4319
- import * as v from 'valibot';