@effect/ai 0.18.11 → 0.18.13

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,2527 @@
1
+ /**
2
+ * @since 1.0.0
3
+ */
4
+ import * as Rpc from "@effect/rpc/Rpc";
5
+ import * as RpcGroup from "@effect/rpc/RpcGroup";
6
+ import * as Schema from "effect/Schema";
7
+ /**
8
+ * A uniquely identifying ID for a request in JSON-RPC.
9
+ *
10
+ * @since 1.0.0
11
+ * @category Common
12
+ */
13
+ export declare const RequestId: Schema.Union<[
14
+ typeof Schema.String,
15
+ typeof Schema.Number
16
+ ]>;
17
+ /**
18
+ * A uniquely identifying ID for a request in JSON-RPC.
19
+ *
20
+ * @since 1.0.0
21
+ * @category Common
22
+ */
23
+ export type RequestId = typeof RequestId.Type;
24
+ /**
25
+ * A progress token, used to associate progress notifications with the original
26
+ * request.
27
+ *
28
+ * @since 1.0.0
29
+ * @category Common
30
+ */
31
+ export declare const ProgressToken: Schema.Union<[
32
+ typeof Schema.String,
33
+ typeof Schema.Number
34
+ ]>;
35
+ /**
36
+ * A progress token, used to associate progress notifications with the original
37
+ * request.
38
+ *
39
+ * @since 1.0.0
40
+ * @category Common
41
+ */
42
+ export type ProgressToken = typeof ProgressToken.Type;
43
+ declare const RequestMeta_base: Schema.Class<RequestMeta, {
44
+ _meta: Schema.optional<Schema.Struct<{
45
+ /**
46
+ * If specified, the caller is requesting out-of-band progress notifications
47
+ * for this request (as represented by notifications/progress). The value of
48
+ * this parameter is an opaque token that will be attached to any subsequent
49
+ * notifications. The receiver is not obligated to provide these
50
+ * notifications.
51
+ */
52
+ progressToken: Schema.optional<Schema.Union<[typeof Schema.String, typeof Schema.Number]>>;
53
+ }>>;
54
+ }, Schema.Struct.Encoded<{
55
+ _meta: Schema.optional<Schema.Struct<{
56
+ /**
57
+ * If specified, the caller is requesting out-of-band progress notifications
58
+ * for this request (as represented by notifications/progress). The value of
59
+ * this parameter is an opaque token that will be attached to any subsequent
60
+ * notifications. The receiver is not obligated to provide these
61
+ * notifications.
62
+ */
63
+ progressToken: Schema.optional<Schema.Union<[typeof Schema.String, typeof Schema.Number]>>;
64
+ }>>;
65
+ }>, never, {
66
+ readonly _meta?: {
67
+ readonly progressToken?: string | number | undefined;
68
+ } | undefined;
69
+ }, {}, {}>;
70
+ /**
71
+ * @since 1.0.0
72
+ * @category Common
73
+ */
74
+ export declare class RequestMeta extends RequestMeta_base {
75
+ }
76
+ declare const ResultMeta_base: Schema.Class<ResultMeta, {
77
+ /**
78
+ * This result property is reserved by the protocol to allow clients and
79
+ * servers to attach additional metadata to their responses.
80
+ */
81
+ _meta: Schema.optional<Schema.Record$<typeof Schema.String, typeof Schema.Unknown>>;
82
+ }, Schema.Struct.Encoded<{
83
+ /**
84
+ * This result property is reserved by the protocol to allow clients and
85
+ * servers to attach additional metadata to their responses.
86
+ */
87
+ _meta: Schema.optional<Schema.Record$<typeof Schema.String, typeof Schema.Unknown>>;
88
+ }>, never, {
89
+ readonly _meta?: {
90
+ readonly [x: string]: unknown;
91
+ } | undefined;
92
+ }, {}, {}>;
93
+ /**
94
+ * @since 1.0.0
95
+ * @category Common
96
+ */
97
+ export declare class ResultMeta extends ResultMeta_base {
98
+ }
99
+ declare const NotificationMeta_base: Schema.Class<NotificationMeta, {
100
+ /**
101
+ * This parameter name is reserved by MCP to allow clients and servers to
102
+ * attach additional metadata to their notifications.
103
+ */
104
+ _meta: Schema.optional<Schema.Record$<typeof Schema.String, typeof Schema.Unknown>>;
105
+ }, Schema.Struct.Encoded<{
106
+ /**
107
+ * This parameter name is reserved by MCP to allow clients and servers to
108
+ * attach additional metadata to their notifications.
109
+ */
110
+ _meta: Schema.optional<Schema.Record$<typeof Schema.String, typeof Schema.Unknown>>;
111
+ }>, never, {
112
+ readonly _meta?: {
113
+ readonly [x: string]: unknown;
114
+ } | undefined;
115
+ }, {}, {}>;
116
+ /**
117
+ * @since 1.0.0
118
+ * @category Common
119
+ */
120
+ export declare class NotificationMeta extends NotificationMeta_base {
121
+ }
122
+ /**
123
+ * An opaque token used to represent a cursor for pagination.
124
+ *
125
+ * @since 1.0.0
126
+ * @category Common
127
+ */
128
+ export declare const Cursor: typeof Schema.String;
129
+ /**
130
+ * @since 1.0.0
131
+ * @category Common
132
+ */
133
+ export type Cursor = typeof Cursor.Type;
134
+ declare const PaginatedRequestMeta_base: Schema.Class<PaginatedRequestMeta, {
135
+ /**
136
+ * An opaque token representing the current pagination position.
137
+ * If provided, the server should return results starting after this cursor.
138
+ */
139
+ cursor: Schema.optional<typeof Schema.String>;
140
+ _meta: Schema.optional<Schema.Struct<{
141
+ /**
142
+ * If specified, the caller is requesting out-of-band progress notifications
143
+ * for this request (as represented by notifications/progress). The value of
144
+ * this parameter is an opaque token that will be attached to any subsequent
145
+ * notifications. The receiver is not obligated to provide these
146
+ * notifications.
147
+ */
148
+ progressToken: Schema.optional<Schema.Union<[typeof Schema.String, typeof Schema.Number]>>;
149
+ }>>;
150
+ }, Schema.Struct.Encoded<{
151
+ /**
152
+ * An opaque token representing the current pagination position.
153
+ * If provided, the server should return results starting after this cursor.
154
+ */
155
+ cursor: Schema.optional<typeof Schema.String>;
156
+ _meta: Schema.optional<Schema.Struct<{
157
+ /**
158
+ * If specified, the caller is requesting out-of-band progress notifications
159
+ * for this request (as represented by notifications/progress). The value of
160
+ * this parameter is an opaque token that will be attached to any subsequent
161
+ * notifications. The receiver is not obligated to provide these
162
+ * notifications.
163
+ */
164
+ progressToken: Schema.optional<Schema.Union<[typeof Schema.String, typeof Schema.Number]>>;
165
+ }>>;
166
+ }>, never, {
167
+ readonly _meta?: {
168
+ readonly progressToken?: string | number | undefined;
169
+ } | undefined;
170
+ } & {
171
+ readonly cursor?: string | undefined;
172
+ }, {}, {}>;
173
+ /**
174
+ * @since 1.0.0
175
+ * @category Common
176
+ */
177
+ export declare class PaginatedRequestMeta extends PaginatedRequestMeta_base {
178
+ }
179
+ declare const PaginatedResultMeta_base: Schema.Class<PaginatedResultMeta, {
180
+ /**
181
+ * An opaque token representing the pagination position after the last returned result.
182
+ * If present, there may be more results available.
183
+ */
184
+ nextCursor: Schema.optional<typeof Schema.String>;
185
+ _meta: Schema.optional<Schema.Record$<typeof Schema.String, typeof Schema.Unknown>>;
186
+ }, Schema.Struct.Encoded<{
187
+ /**
188
+ * An opaque token representing the pagination position after the last returned result.
189
+ * If present, there may be more results available.
190
+ */
191
+ nextCursor: Schema.optional<typeof Schema.String>;
192
+ _meta: Schema.optional<Schema.Record$<typeof Schema.String, typeof Schema.Unknown>>;
193
+ }>, never, {
194
+ readonly _meta?: {
195
+ readonly [x: string]: unknown;
196
+ } | undefined;
197
+ } & {
198
+ readonly nextCursor?: string | undefined;
199
+ }, {}, {}>;
200
+ /**
201
+ * @since 1.0.0
202
+ * @category Common
203
+ */
204
+ export declare class PaginatedResultMeta extends PaginatedResultMeta_base {
205
+ }
206
+ /**
207
+ * The sender or recipient of messages and data in a conversation.
208
+ * @since 1.0.0
209
+ * @category Common
210
+ */
211
+ export declare const Role: Schema.Literal<["user", "assistant"]>;
212
+ /**
213
+ * @since 1.0.0
214
+ * @category Common
215
+ */
216
+ export type Role = typeof Role.Type;
217
+ declare const Annotations_base: Schema.Class<Annotations, {
218
+ /**
219
+ * Describes who the intended customer of this object or data is.
220
+ *
221
+ * It can include multiple entries to indicate content useful for multiple
222
+ * audiences (e.g., `["user", "assistant"]`).
223
+ */
224
+ audience: Schema.optional<Schema.Array$<Schema.Literal<["user", "assistant"]>>>;
225
+ /**
226
+ * Describes how important this data is for operating the server.
227
+ *
228
+ * A value of 1 means "most important," and indicates that the data is
229
+ * effectively required, while 0 means "least important," and indicates that
230
+ * the data is entirely optional.
231
+ */
232
+ priority: Schema.optional<Schema.filter<typeof Schema.Number>>;
233
+ }, Schema.Struct.Encoded<{
234
+ /**
235
+ * Describes who the intended customer of this object or data is.
236
+ *
237
+ * It can include multiple entries to indicate content useful for multiple
238
+ * audiences (e.g., `["user", "assistant"]`).
239
+ */
240
+ audience: Schema.optional<Schema.Array$<Schema.Literal<["user", "assistant"]>>>;
241
+ /**
242
+ * Describes how important this data is for operating the server.
243
+ *
244
+ * A value of 1 means "most important," and indicates that the data is
245
+ * effectively required, while 0 means "least important," and indicates that
246
+ * the data is entirely optional.
247
+ */
248
+ priority: Schema.optional<Schema.filter<typeof Schema.Number>>;
249
+ }>, never, {
250
+ readonly audience?: readonly ("user" | "assistant")[] | undefined;
251
+ } & {
252
+ readonly priority?: number | undefined;
253
+ }, {}, {}>;
254
+ /**
255
+ * Optional annotations for the client. The client can use annotations to
256
+ * inform how objects are used or displayed
257
+ *
258
+ * @since 1.0.0
259
+ * @category Common
260
+ */
261
+ export declare class Annotations extends Annotations_base {
262
+ }
263
+ declare const Implementation_base: Schema.Class<Implementation, {
264
+ name: typeof Schema.String;
265
+ version: typeof Schema.String;
266
+ }, Schema.Struct.Encoded<{
267
+ name: typeof Schema.String;
268
+ version: typeof Schema.String;
269
+ }>, never, {
270
+ readonly name: string;
271
+ } & {
272
+ readonly version: string;
273
+ }, {}, {}>;
274
+ /**
275
+ * Describes the name and version of an MCP implementation.
276
+ *
277
+ * @since 1.0.0
278
+ * @category Common
279
+ */
280
+ export declare class Implementation extends Implementation_base {
281
+ }
282
+ declare const ClientCapabilities_base: Schema.Class<ClientCapabilities, {
283
+ /**
284
+ * Experimental, non-standard capabilities that the client supports.
285
+ */
286
+ experimental: Schema.optional<Schema.Record$<typeof Schema.String, Schema.Struct<{}>>>;
287
+ /**
288
+ * Present if the client supports listing roots.
289
+ */
290
+ roots: Schema.optional<Schema.Struct<{
291
+ /**
292
+ * Whether the client supports notifications for changes to the roots list.
293
+ */
294
+ listChanged: Schema.optional<typeof Schema.Boolean>;
295
+ }>>;
296
+ /**
297
+ * Present if the client supports sampling from an LLM.
298
+ */
299
+ sampling: Schema.optional<Schema.Struct<{}>>;
300
+ }, Schema.Struct.Encoded<{
301
+ /**
302
+ * Experimental, non-standard capabilities that the client supports.
303
+ */
304
+ experimental: Schema.optional<Schema.Record$<typeof Schema.String, Schema.Struct<{}>>>;
305
+ /**
306
+ * Present if the client supports listing roots.
307
+ */
308
+ roots: Schema.optional<Schema.Struct<{
309
+ /**
310
+ * Whether the client supports notifications for changes to the roots list.
311
+ */
312
+ listChanged: Schema.optional<typeof Schema.Boolean>;
313
+ }>>;
314
+ /**
315
+ * Present if the client supports sampling from an LLM.
316
+ */
317
+ sampling: Schema.optional<Schema.Struct<{}>>;
318
+ }>, never, {
319
+ readonly experimental?: {
320
+ readonly [x: string]: {};
321
+ } | undefined;
322
+ } & {
323
+ readonly roots?: {
324
+ readonly listChanged?: boolean | undefined;
325
+ } | undefined;
326
+ } & {
327
+ readonly sampling?: {} | undefined;
328
+ }, {}, {}>;
329
+ /**
330
+ * Capabilities a client may support. Known capabilities are defined here, in
331
+ * this schema, but this is not a closed set: any client can define its own,
332
+ * additional capabilities.
333
+ *
334
+ * @since 1.0.0
335
+ * @category Common
336
+ */
337
+ export declare class ClientCapabilities extends ClientCapabilities_base {
338
+ }
339
+ declare const ServerCapabilities_base: Schema.Class<ServerCapabilities, {
340
+ /**
341
+ * Experimental, non-standard capabilities that the server supports.
342
+ */
343
+ experimental: Schema.optional<Schema.Record$<typeof Schema.String, Schema.Struct<{}>>>;
344
+ /**
345
+ * Present if the server supports sending log messages to the client.
346
+ */
347
+ logging: Schema.optional<Schema.Struct<{}>>;
348
+ /**
349
+ * Present if the server supports argument autocompletion suggestions.
350
+ */
351
+ completions: Schema.optional<Schema.Struct<{}>>;
352
+ /**
353
+ * Present if the server offers any prompt templates.
354
+ */
355
+ prompts: Schema.optional<Schema.Struct<{
356
+ /**
357
+ * Whether this server supports notifications for changes to the prompt list.
358
+ */
359
+ listChanged: Schema.optional<typeof Schema.Boolean>;
360
+ }>>;
361
+ /**
362
+ * Present if the server offers any resources to read.
363
+ */
364
+ resources: Schema.optional<Schema.Struct<{
365
+ /**
366
+ * Whether this server supports subscribing to resource updates.
367
+ */
368
+ subscribe: Schema.optional<typeof Schema.Boolean>;
369
+ /**
370
+ * Whether this server supports notifications for changes to the resource list.
371
+ */
372
+ listChanged: Schema.optional<typeof Schema.Boolean>;
373
+ }>>;
374
+ /**
375
+ * Present if the server offers any tools to call.
376
+ */
377
+ tools: Schema.optional<Schema.Struct<{
378
+ /**
379
+ * Whether this server supports notifications for changes to the tool list.
380
+ */
381
+ listChanged: Schema.optional<typeof Schema.Boolean>;
382
+ }>>;
383
+ }, Schema.Struct.Encoded<{
384
+ /**
385
+ * Experimental, non-standard capabilities that the server supports.
386
+ */
387
+ experimental: Schema.optional<Schema.Record$<typeof Schema.String, Schema.Struct<{}>>>;
388
+ /**
389
+ * Present if the server supports sending log messages to the client.
390
+ */
391
+ logging: Schema.optional<Schema.Struct<{}>>;
392
+ /**
393
+ * Present if the server supports argument autocompletion suggestions.
394
+ */
395
+ completions: Schema.optional<Schema.Struct<{}>>;
396
+ /**
397
+ * Present if the server offers any prompt templates.
398
+ */
399
+ prompts: Schema.optional<Schema.Struct<{
400
+ /**
401
+ * Whether this server supports notifications for changes to the prompt list.
402
+ */
403
+ listChanged: Schema.optional<typeof Schema.Boolean>;
404
+ }>>;
405
+ /**
406
+ * Present if the server offers any resources to read.
407
+ */
408
+ resources: Schema.optional<Schema.Struct<{
409
+ /**
410
+ * Whether this server supports subscribing to resource updates.
411
+ */
412
+ subscribe: Schema.optional<typeof Schema.Boolean>;
413
+ /**
414
+ * Whether this server supports notifications for changes to the resource list.
415
+ */
416
+ listChanged: Schema.optional<typeof Schema.Boolean>;
417
+ }>>;
418
+ /**
419
+ * Present if the server offers any tools to call.
420
+ */
421
+ tools: Schema.optional<Schema.Struct<{
422
+ /**
423
+ * Whether this server supports notifications for changes to the tool list.
424
+ */
425
+ listChanged: Schema.optional<typeof Schema.Boolean>;
426
+ }>>;
427
+ }>, never, {
428
+ readonly tools?: {
429
+ readonly listChanged?: boolean | undefined;
430
+ } | undefined;
431
+ } & {
432
+ readonly experimental?: {
433
+ readonly [x: string]: {};
434
+ } | undefined;
435
+ } & {
436
+ readonly logging?: {} | undefined;
437
+ } & {
438
+ readonly completions?: {} | undefined;
439
+ } & {
440
+ readonly prompts?: {
441
+ readonly listChanged?: boolean | undefined;
442
+ } | undefined;
443
+ } & {
444
+ readonly resources?: {
445
+ readonly listChanged?: boolean | undefined;
446
+ readonly subscribe?: boolean | undefined;
447
+ } | undefined;
448
+ }, {}, {}>;
449
+ /**
450
+ * Capabilities that a server may support. Known capabilities are defined
451
+ * here, in this schema, but this is not a closed set: any server can define
452
+ * its own, additional capabilities.
453
+ *
454
+ * @since 1.0.0
455
+ * @category Common
456
+ */
457
+ export declare class ServerCapabilities extends ServerCapabilities_base {
458
+ }
459
+ declare const McpError_base: Schema.Class<McpError, {
460
+ /**
461
+ * The error type that occurred.
462
+ */
463
+ code: typeof Schema.Number;
464
+ /**
465
+ * A short description of the error. The message SHOULD be limited to a
466
+ * concise single sentence.
467
+ */
468
+ message: typeof Schema.String;
469
+ /**
470
+ * Additional information about the error. The value of this member is
471
+ * defined by the sender (e.g. detailed error information, nested errors etc.).
472
+ */
473
+ data: Schema.optional<typeof Schema.Unknown>;
474
+ }, Schema.Struct.Encoded<{
475
+ /**
476
+ * The error type that occurred.
477
+ */
478
+ code: typeof Schema.Number;
479
+ /**
480
+ * A short description of the error. The message SHOULD be limited to a
481
+ * concise single sentence.
482
+ */
483
+ message: typeof Schema.String;
484
+ /**
485
+ * Additional information about the error. The value of this member is
486
+ * defined by the sender (e.g. detailed error information, nested errors etc.).
487
+ */
488
+ data: Schema.optional<typeof Schema.Unknown>;
489
+ }>, never, {
490
+ readonly data?: unknown;
491
+ } & {
492
+ readonly code: number;
493
+ } & {
494
+ readonly message: string;
495
+ }, {}, {}>;
496
+ /**
497
+ * @since 1.0.0
498
+ * @category Errors
499
+ */
500
+ export declare class McpError extends McpError_base {
501
+ }
502
+ /**
503
+ * @since 1.0.0
504
+ * @category Errors
505
+ */
506
+ export declare const INVALID_REQUEST_ERROR_CODE: -32600;
507
+ /**
508
+ * @since 1.0.0
509
+ * @category Errors
510
+ */
511
+ export declare const METHOD_NOT_FOUND_ERROR_CODE: -32601;
512
+ /**
513
+ * @since 1.0.0
514
+ * @category Errors
515
+ */
516
+ export declare const INVALID_PARAMS_ERROR_CODE: -32602;
517
+ /**
518
+ * @since 1.0.0
519
+ * @category Errors
520
+ */
521
+ export declare const INTERNAL_ERROR_CODE: -32603;
522
+ /**
523
+ * @since 1.0.0
524
+ * @category Errors
525
+ */
526
+ export declare const PARSE_ERROR_CODE: -32700;
527
+ declare const ParseError_base: Schema.TaggedErrorClass<ParseError, "ParseError", {
528
+ readonly _tag: Schema.tag<"ParseError">;
529
+ } & {
530
+ code: Schema.tag<-32700>;
531
+ message: typeof Schema.String;
532
+ data: Schema.optional<typeof Schema.Unknown>;
533
+ }>;
534
+ /**
535
+ * @since 1.0.0
536
+ * @category Errors
537
+ */
538
+ export declare class ParseError extends ParseError_base {
539
+ }
540
+ declare const InvalidRequest_base: Schema.TaggedErrorClass<InvalidRequest, "InvalidRequest", {
541
+ readonly _tag: Schema.tag<"InvalidRequest">;
542
+ } & {
543
+ code: Schema.tag<-32600>;
544
+ message: typeof Schema.String;
545
+ data: Schema.optional<typeof Schema.Unknown>;
546
+ }>;
547
+ /**
548
+ * @since 1.0.0
549
+ * @category Errors
550
+ */
551
+ export declare class InvalidRequest extends InvalidRequest_base {
552
+ }
553
+ declare const MethodNotFound_base: Schema.TaggedErrorClass<MethodNotFound, "MethodNotFound", {
554
+ readonly _tag: Schema.tag<"MethodNotFound">;
555
+ } & {
556
+ code: Schema.tag<-32601>;
557
+ message: typeof Schema.String;
558
+ data: Schema.optional<typeof Schema.Unknown>;
559
+ }>;
560
+ /**
561
+ * @since 1.0.0
562
+ * @category Errors
563
+ */
564
+ export declare class MethodNotFound extends MethodNotFound_base {
565
+ }
566
+ declare const InvalidParams_base: Schema.TaggedErrorClass<InvalidParams, "InvalidParams", {
567
+ readonly _tag: Schema.tag<"InvalidParams">;
568
+ } & {
569
+ code: Schema.tag<-32602>;
570
+ message: typeof Schema.String;
571
+ data: Schema.optional<typeof Schema.Unknown>;
572
+ }>;
573
+ /**
574
+ * @since 1.0.0
575
+ * @category Errors
576
+ */
577
+ export declare class InvalidParams extends InvalidParams_base {
578
+ }
579
+ declare const InternalError_base: Schema.TaggedErrorClass<InternalError, "InternalError", {
580
+ readonly _tag: Schema.tag<"InternalError">;
581
+ } & {
582
+ code: Schema.tag<-32603>;
583
+ message: typeof Schema.String;
584
+ data: Schema.optional<typeof Schema.Unknown>;
585
+ }>;
586
+ /**
587
+ * @since 1.0.0
588
+ * @category Errors
589
+ */
590
+ export declare class InternalError extends InternalError_base {
591
+ static readonly notImplemented: InternalError;
592
+ }
593
+ declare const Ping_base: Rpc.Rpc<"ping", typeof RequestMeta, Schema.Struct<{}>, typeof McpError, never>;
594
+ /**
595
+ * A ping, issued by either the server or the client, to check that the other
596
+ * party is still alive. The receiver must promptly respond, or else may be
597
+ * disconnected.
598
+ *
599
+ * @since 1.0.0
600
+ * @category Ping
601
+ */
602
+ export declare class Ping extends Ping_base {
603
+ }
604
+ declare const InitializeResult_base: Schema.Class<InitializeResult, {
605
+ /**
606
+ * The version of the Model Context Protocol that the server wants to use.
607
+ * This may not match the version that the client requested. If the client
608
+ * cannot support this version, it MUST disconnect.
609
+ */
610
+ protocolVersion: typeof Schema.String;
611
+ capabilities: typeof ServerCapabilities;
612
+ serverInfo: typeof Implementation;
613
+ /**
614
+ * Instructions describing how to use the server and its features.
615
+ *
616
+ * This can be used by clients to improve the LLM's understanding of available
617
+ * tools, resources, etc. It can be thought of like a "hint" to the model.
618
+ * For example, this information MAY be added to the system prompt.
619
+ */
620
+ instructions: Schema.optional<typeof Schema.String>;
621
+ _meta: Schema.optional<Schema.Record$<typeof Schema.String, typeof Schema.Unknown>>;
622
+ }, Schema.Struct.Encoded<{
623
+ /**
624
+ * The version of the Model Context Protocol that the server wants to use.
625
+ * This may not match the version that the client requested. If the client
626
+ * cannot support this version, it MUST disconnect.
627
+ */
628
+ protocolVersion: typeof Schema.String;
629
+ capabilities: typeof ServerCapabilities;
630
+ serverInfo: typeof Implementation;
631
+ /**
632
+ * Instructions describing how to use the server and its features.
633
+ *
634
+ * This can be used by clients to improve the LLM's understanding of available
635
+ * tools, resources, etc. It can be thought of like a "hint" to the model.
636
+ * For example, this information MAY be added to the system prompt.
637
+ */
638
+ instructions: Schema.optional<typeof Schema.String>;
639
+ _meta: Schema.optional<Schema.Record$<typeof Schema.String, typeof Schema.Unknown>>;
640
+ }>, never, {
641
+ readonly _meta?: {
642
+ readonly [x: string]: unknown;
643
+ } | undefined;
644
+ } & {
645
+ readonly protocolVersion: string;
646
+ } & {
647
+ readonly capabilities: ServerCapabilities;
648
+ } & {
649
+ readonly serverInfo: Implementation;
650
+ } & {
651
+ readonly instructions?: string | undefined;
652
+ }, {}, {}>;
653
+ /**
654
+ * After receiving an initialize request from the client, the server sends this
655
+ * response.
656
+ *
657
+ * @since 1.0.0
658
+ * @category Initialization
659
+ */
660
+ export declare class InitializeResult extends InitializeResult_base {
661
+ }
662
+ declare const Initialize_base: Rpc.Rpc<"initialize", Schema.Struct<{
663
+ /**
664
+ * The latest version of the Model Context Protocol that the client
665
+ * supports. The client MAY decide to support older versions as well.
666
+ */
667
+ protocolVersion: typeof Schema.String;
668
+ /**
669
+ * Capabilities a client may support. Known capabilities are defined here,
670
+ * in this schema, but this is not a closed set: any client can define its
671
+ * own, additional capabilities.
672
+ */
673
+ capabilities: typeof ClientCapabilities;
674
+ /**
675
+ * Describes the name and version of an MCP implementation.
676
+ */
677
+ clientInfo: typeof Implementation;
678
+ _meta: Schema.optional<Schema.Struct<{
679
+ /**
680
+ * If specified, the caller is requesting out-of-band progress notifications
681
+ * for this request (as represented by notifications/progress). The value of
682
+ * this parameter is an opaque token that will be attached to any subsequent
683
+ * notifications. The receiver is not obligated to provide these
684
+ * notifications.
685
+ */
686
+ progressToken: Schema.optional<Schema.Union<[typeof Schema.String, typeof Schema.Number]>>;
687
+ }>>;
688
+ }>, typeof InitializeResult, typeof McpError, never>;
689
+ /**
690
+ * This request is sent from the client to the server when it first connects,
691
+ * asking it to begin initialization.
692
+ *
693
+ * @since 1.0.0
694
+ * @category Initialization
695
+ */
696
+ export declare class Initialize extends Initialize_base {
697
+ }
698
+ declare const InitializedNotification_base: Rpc.Rpc<"notifications/initialized", typeof NotificationMeta, typeof Schema.Void, typeof Schema.Never, never>;
699
+ /**
700
+ * This notification is sent from the client to the server after initialization
701
+ * has finished.
702
+ *
703
+ * @since 1.0.0
704
+ * @category Initialization
705
+ */
706
+ export declare class InitializedNotification extends InitializedNotification_base {
707
+ }
708
+ declare const CancelledNotification_base: Rpc.Rpc<"notifications/cancelled", Schema.Struct<{
709
+ /**
710
+ * The ID of the request to cancel.
711
+ *
712
+ * This MUST correspond to the ID of a request previously issued in the
713
+ * same direction.
714
+ */
715
+ requestId: Schema.Union<[typeof Schema.String, typeof Schema.Number]>;
716
+ /**
717
+ * An optional string describing the reason for the cancellation. This MAY
718
+ * be logged or presented to the user.
719
+ */
720
+ reason: Schema.optional<typeof Schema.String>;
721
+ _meta: Schema.optional<Schema.Record$<typeof Schema.String, typeof Schema.Unknown>>;
722
+ }>, typeof Schema.Void, typeof Schema.Never, never>;
723
+ /**
724
+ * @since 1.0.0
725
+ * @category Cancellation
726
+ */
727
+ export declare class CancelledNotification extends CancelledNotification_base {
728
+ }
729
+ declare const ProgressNotification_base: Rpc.Rpc<"notifications/progress", Schema.Struct<{
730
+ /**
731
+ * The progress token which was given in the initial request, used to
732
+ * associate this notification with the request that is proceeding.
733
+ */
734
+ progressToken: Schema.Union<[typeof Schema.String, typeof Schema.Number]>;
735
+ /**
736
+ * The progress thus far. This should increase every time progress is made,
737
+ * even if the total is unknown.
738
+ */
739
+ progress: Schema.optional<typeof Schema.Number>;
740
+ /**
741
+ * Total number of items to process (or total progress required), if known.
742
+ */
743
+ total: Schema.optional<typeof Schema.Number>;
744
+ /**
745
+ * An optional message describing the current progress.
746
+ */
747
+ message: Schema.optional<typeof Schema.String>;
748
+ _meta: Schema.optional<Schema.Record$<typeof Schema.String, typeof Schema.Unknown>>;
749
+ }>, typeof Schema.Void, typeof Schema.Never, never>;
750
+ /**
751
+ * An out-of-band notification used to inform the receiver of a progress update
752
+ * for a long-running request.
753
+ *
754
+ * @since 1.0.0
755
+ * @category Progress
756
+ */
757
+ export declare class ProgressNotification extends ProgressNotification_base {
758
+ }
759
+ declare const Resource_base: Schema.Class<Resource, {
760
+ /**
761
+ * The URI of this resource.
762
+ */
763
+ uri: typeof Schema.String;
764
+ /**
765
+ * A human-readable name for this resource.
766
+ *
767
+ * This can be used by clients to populate UI elements.
768
+ */
769
+ name: typeof Schema.String;
770
+ /**
771
+ * A description of what this resource represents.
772
+ *
773
+ * This can be used by clients to improve the LLM's understanding of available
774
+ * resources. It can be thought of like a "hint" to the model.
775
+ */
776
+ description: Schema.optional<typeof Schema.String>;
777
+ /**
778
+ * The MIME type of this resource, if known.
779
+ */
780
+ mimeType: Schema.optional<typeof Schema.String>;
781
+ /**
782
+ * Optional annotations for the client.
783
+ */
784
+ annotations: Schema.optional<typeof Annotations>;
785
+ /**
786
+ * The size of the raw resource content, in bytes (i.e., before base64
787
+ * encoding or any tokenization), if known.
788
+ *
789
+ * This can be used by Hosts to display file sizes and estimate context
790
+ * window usage.
791
+ */
792
+ size: Schema.optional<typeof Schema.Number>;
793
+ }, Schema.Struct.Encoded<{
794
+ /**
795
+ * The URI of this resource.
796
+ */
797
+ uri: typeof Schema.String;
798
+ /**
799
+ * A human-readable name for this resource.
800
+ *
801
+ * This can be used by clients to populate UI elements.
802
+ */
803
+ name: typeof Schema.String;
804
+ /**
805
+ * A description of what this resource represents.
806
+ *
807
+ * This can be used by clients to improve the LLM's understanding of available
808
+ * resources. It can be thought of like a "hint" to the model.
809
+ */
810
+ description: Schema.optional<typeof Schema.String>;
811
+ /**
812
+ * The MIME type of this resource, if known.
813
+ */
814
+ mimeType: Schema.optional<typeof Schema.String>;
815
+ /**
816
+ * Optional annotations for the client.
817
+ */
818
+ annotations: Schema.optional<typeof Annotations>;
819
+ /**
820
+ * The size of the raw resource content, in bytes (i.e., before base64
821
+ * encoding or any tokenization), if known.
822
+ *
823
+ * This can be used by Hosts to display file sizes and estimate context
824
+ * window usage.
825
+ */
826
+ size: Schema.optional<typeof Schema.Number>;
827
+ }>, never, {
828
+ readonly description?: string | undefined;
829
+ } & {
830
+ readonly annotations?: Annotations | undefined;
831
+ } & {
832
+ readonly name: string;
833
+ } & {
834
+ readonly uri: string;
835
+ } & {
836
+ readonly mimeType?: string | undefined;
837
+ } & {
838
+ readonly size?: number | undefined;
839
+ }, {}, {}>;
840
+ /**
841
+ * A known resource that the server is capable of reading.
842
+ *
843
+ * @since 1.0.0
844
+ * @category Resources
845
+ */
846
+ export declare class Resource extends Resource_base {
847
+ }
848
+ declare const ResourceTemplate_base: Schema.Class<ResourceTemplate, {
849
+ /**
850
+ * A URI template (according to RFC 6570) that can be used to construct
851
+ * resource URIs.
852
+ */
853
+ uriTemplate: typeof Schema.String;
854
+ /**
855
+ * A human-readable name for the type of resource this template refers to.
856
+ *
857
+ * This can be used by clients to populate UI elements.
858
+ */
859
+ name: typeof Schema.String;
860
+ /**
861
+ * A description of what this template is for.
862
+ *
863
+ * This can be used by clients to improve the LLM's understanding of available
864
+ * resources. It can be thought of like a "hint" to the model.
865
+ */
866
+ description: Schema.optional<typeof Schema.String>;
867
+ /**
868
+ * The MIME type for all resources that match this template. This should only
869
+ * be included if all resources matching this template have the same type.
870
+ */
871
+ mimeType: Schema.optional<typeof Schema.String>;
872
+ /**
873
+ * Optional annotations for the client.
874
+ */
875
+ annotations: Schema.optional<typeof Annotations>;
876
+ }, Schema.Struct.Encoded<{
877
+ /**
878
+ * A URI template (according to RFC 6570) that can be used to construct
879
+ * resource URIs.
880
+ */
881
+ uriTemplate: typeof Schema.String;
882
+ /**
883
+ * A human-readable name for the type of resource this template refers to.
884
+ *
885
+ * This can be used by clients to populate UI elements.
886
+ */
887
+ name: typeof Schema.String;
888
+ /**
889
+ * A description of what this template is for.
890
+ *
891
+ * This can be used by clients to improve the LLM's understanding of available
892
+ * resources. It can be thought of like a "hint" to the model.
893
+ */
894
+ description: Schema.optional<typeof Schema.String>;
895
+ /**
896
+ * The MIME type for all resources that match this template. This should only
897
+ * be included if all resources matching this template have the same type.
898
+ */
899
+ mimeType: Schema.optional<typeof Schema.String>;
900
+ /**
901
+ * Optional annotations for the client.
902
+ */
903
+ annotations: Schema.optional<typeof Annotations>;
904
+ }>, never, {
905
+ readonly description?: string | undefined;
906
+ } & {
907
+ readonly annotations?: Annotations | undefined;
908
+ } & {
909
+ readonly name: string;
910
+ } & {
911
+ readonly mimeType?: string | undefined;
912
+ } & {
913
+ readonly uriTemplate: string;
914
+ }, {}, {}>;
915
+ /**
916
+ * A template description for resources available on the server.
917
+ *
918
+ * @since 1.0.0
919
+ * @category Resources
920
+ */
921
+ export declare class ResourceTemplate extends ResourceTemplate_base {
922
+ }
923
+ declare const ResourceContents_base: Schema.Class<ResourceContents, {
924
+ /**
925
+ * The URI of this resource.
926
+ */
927
+ uri: typeof Schema.String;
928
+ /**
929
+ * The MIME type of this resource, if known.
930
+ */
931
+ mimeType: Schema.optional<typeof Schema.String>;
932
+ }, Schema.Struct.Encoded<{
933
+ /**
934
+ * The URI of this resource.
935
+ */
936
+ uri: typeof Schema.String;
937
+ /**
938
+ * The MIME type of this resource, if known.
939
+ */
940
+ mimeType: Schema.optional<typeof Schema.String>;
941
+ }>, never, {
942
+ readonly uri: string;
943
+ } & {
944
+ readonly mimeType?: string | undefined;
945
+ }, {}, {}>;
946
+ /**
947
+ * The contents of a specific resource or sub-resource.
948
+ *
949
+ * @since 1.0.0
950
+ * @category Resources
951
+ */
952
+ export declare class ResourceContents extends ResourceContents_base {
953
+ }
954
+ declare const TextResourceContents_base: Schema.Class<TextResourceContents, {
955
+ /**
956
+ * The URI of this resource.
957
+ */
958
+ uri: typeof Schema.String;
959
+ /**
960
+ * The MIME type of this resource, if known.
961
+ */
962
+ mimeType: Schema.optional<typeof Schema.String>;
963
+ } & {
964
+ /**
965
+ * The text of the item. This must only be set if the item can actually be
966
+ * represented as text (not binary data).
967
+ */
968
+ text: typeof Schema.String;
969
+ }, {
970
+ readonly uri: string;
971
+ } & {
972
+ readonly mimeType?: string | undefined;
973
+ } & {
974
+ readonly text: string;
975
+ } & {}, never, {
976
+ readonly uri: string;
977
+ } & {
978
+ readonly mimeType?: string | undefined;
979
+ } & {
980
+ readonly text: string;
981
+ }, ResourceContents, {}>;
982
+ /**
983
+ * The contents of a text resource, which can be represented as a string.
984
+ *
985
+ * @since 1.0.0
986
+ * @category Resources
987
+ */
988
+ export declare class TextResourceContents extends TextResourceContents_base {
989
+ }
990
+ declare const BlobResourceContents_base: Schema.Class<BlobResourceContents, {
991
+ /**
992
+ * The URI of this resource.
993
+ */
994
+ uri: typeof Schema.String;
995
+ /**
996
+ * The MIME type of this resource, if known.
997
+ */
998
+ mimeType: Schema.optional<typeof Schema.String>;
999
+ } & {
1000
+ /**
1001
+ * The binary data of the item decoded from a base64-encoded string.
1002
+ */
1003
+ blob: Schema.Schema<Uint8Array<ArrayBufferLike>, string, never>;
1004
+ }, {
1005
+ readonly uri: string;
1006
+ } & {
1007
+ readonly mimeType?: string | undefined;
1008
+ } & {
1009
+ readonly blob: string;
1010
+ } & {}, never, {
1011
+ readonly uri: string;
1012
+ } & {
1013
+ readonly mimeType?: string | undefined;
1014
+ } & {
1015
+ readonly blob: Uint8Array<ArrayBufferLike>;
1016
+ }, ResourceContents, {}>;
1017
+ /**
1018
+ * The contents of a binary resource, which can be represented as an Uint8Array
1019
+ *
1020
+ * @since 1.0.0
1021
+ * @category Resources
1022
+ */
1023
+ export declare class BlobResourceContents extends BlobResourceContents_base {
1024
+ }
1025
+ declare const ListResourcesResult_base: Schema.Class<ListResourcesResult, {
1026
+ resources: Schema.Array$<typeof Resource>;
1027
+ nextCursor: Schema.optional<typeof Schema.String>;
1028
+ _meta: Schema.optional<Schema.Record$<typeof Schema.String, typeof Schema.Unknown>>;
1029
+ }, Schema.Struct.Encoded<{
1030
+ resources: Schema.Array$<typeof Resource>;
1031
+ nextCursor: Schema.optional<typeof Schema.String>;
1032
+ _meta: Schema.optional<Schema.Record$<typeof Schema.String, typeof Schema.Unknown>>;
1033
+ }>, never, {
1034
+ readonly _meta?: {
1035
+ readonly [x: string]: unknown;
1036
+ } | undefined;
1037
+ } & {
1038
+ readonly nextCursor?: string | undefined;
1039
+ } & {
1040
+ readonly resources: readonly Resource[];
1041
+ }, {}, {}>;
1042
+ /**
1043
+ * The server's response to a resources/list request from the client.
1044
+ *
1045
+ * @since 1.0.0
1046
+ * @category Resources
1047
+ */
1048
+ export declare class ListResourcesResult extends ListResourcesResult_base {
1049
+ }
1050
+ declare const ListResources_base: Rpc.Rpc<"resources/list", typeof PaginatedRequestMeta, typeof ListResourcesResult, typeof McpError, never>;
1051
+ /**
1052
+ * Sent from the client to request a list of resources the server has.
1053
+ *
1054
+ * @since 1.0.0
1055
+ * @category Resources
1056
+ */
1057
+ export declare class ListResources extends ListResources_base {
1058
+ }
1059
+ declare const ListResourceTemplatesResult_base: Schema.Class<ListResourceTemplatesResult, {
1060
+ resourceTemplates: Schema.Array$<typeof ResourceTemplate>;
1061
+ nextCursor: Schema.optional<typeof Schema.String>;
1062
+ _meta: Schema.optional<Schema.Record$<typeof Schema.String, typeof Schema.Unknown>>;
1063
+ }, Schema.Struct.Encoded<{
1064
+ resourceTemplates: Schema.Array$<typeof ResourceTemplate>;
1065
+ nextCursor: Schema.optional<typeof Schema.String>;
1066
+ _meta: Schema.optional<Schema.Record$<typeof Schema.String, typeof Schema.Unknown>>;
1067
+ }>, never, {
1068
+ readonly _meta?: {
1069
+ readonly [x: string]: unknown;
1070
+ } | undefined;
1071
+ } & {
1072
+ readonly nextCursor?: string | undefined;
1073
+ } & {
1074
+ readonly resourceTemplates: readonly ResourceTemplate[];
1075
+ }, {}, {}>;
1076
+ /**
1077
+ * The server's response to a resources/templates/list request from the client.
1078
+ *
1079
+ * @since 1.0.0
1080
+ * @category Resources
1081
+ */
1082
+ export declare class ListResourceTemplatesResult extends ListResourceTemplatesResult_base {
1083
+ }
1084
+ declare const ListResourceTemplates_base: Rpc.Rpc<"resources/templates/list", typeof PaginatedRequestMeta, typeof ListResourceTemplatesResult, typeof McpError, never>;
1085
+ /**
1086
+ * Sent from the client to request a list of resource templates the server has.
1087
+ *
1088
+ * @since 1.0.0
1089
+ * @category Resources
1090
+ */
1091
+ export declare class ListResourceTemplates extends ListResourceTemplates_base {
1092
+ }
1093
+ declare const ReadResourceResult_base: Schema.Class<ReadResourceResult, {
1094
+ contents: Schema.Array$<Schema.Union<[typeof TextResourceContents, typeof BlobResourceContents]>>;
1095
+ _meta: Schema.optional<Schema.Record$<typeof Schema.String, typeof Schema.Unknown>>;
1096
+ }, Schema.Struct.Encoded<{
1097
+ contents: Schema.Array$<Schema.Union<[typeof TextResourceContents, typeof BlobResourceContents]>>;
1098
+ _meta: Schema.optional<Schema.Record$<typeof Schema.String, typeof Schema.Unknown>>;
1099
+ }>, never, {
1100
+ readonly _meta?: {
1101
+ readonly [x: string]: unknown;
1102
+ } | undefined;
1103
+ } & {
1104
+ readonly contents: readonly (TextResourceContents | BlobResourceContents)[];
1105
+ }, {}, {}>;
1106
+ /**
1107
+ * The server's response to a resources/read request from the client.
1108
+ *
1109
+ * @since 1.0.0
1110
+ * @category Resources
1111
+ */
1112
+ export declare class ReadResourceResult extends ReadResourceResult_base {
1113
+ }
1114
+ declare const ReadResource_base: Rpc.Rpc<"resources/read", Schema.Struct<{
1115
+ /**
1116
+ * The URI of the resource to read. The URI can use any protocol; it is up
1117
+ * to the server how to interpret it.
1118
+ */
1119
+ uri: typeof Schema.String;
1120
+ _meta: Schema.optional<Schema.Struct<{
1121
+ /**
1122
+ * If specified, the caller is requesting out-of-band progress notifications
1123
+ * for this request (as represented by notifications/progress). The value of
1124
+ * this parameter is an opaque token that will be attached to any subsequent
1125
+ * notifications. The receiver is not obligated to provide these
1126
+ * notifications.
1127
+ */
1128
+ progressToken: Schema.optional<Schema.Union<[typeof Schema.String, typeof Schema.Number]>>;
1129
+ }>>;
1130
+ }>, typeof ReadResourceResult, typeof McpError, never>;
1131
+ /**
1132
+ * Sent from the client to the server, to read a specific resource URI.
1133
+ *
1134
+ * @since 1.0.0
1135
+ * @category Resources
1136
+ */
1137
+ export declare class ReadResource extends ReadResource_base {
1138
+ }
1139
+ declare const ResourceListChangedNotification_base: Rpc.Rpc<"notifications/resources/list_changed", typeof NotificationMeta, typeof Schema.Void, typeof Schema.Never, never>;
1140
+ /**
1141
+ * An optional notification from the server to the client, informing it that the
1142
+ * list of resources it can read from has changed. This may be issued by servers
1143
+ * without any previous subscription from the client.
1144
+ *
1145
+ * @since 1.0.0
1146
+ * @category Resources
1147
+ */
1148
+ export declare class ResourceListChangedNotification extends ResourceListChangedNotification_base {
1149
+ }
1150
+ declare const Subscribe_base: Rpc.Rpc<"resources/subscribe", Schema.Struct<{
1151
+ /**
1152
+ * The URI of the resource to subscribe to. The URI can use any protocol;
1153
+ * it is up to the server how to interpret it.
1154
+ */
1155
+ uri: typeof Schema.String;
1156
+ _meta: Schema.optional<Schema.Struct<{
1157
+ /**
1158
+ * If specified, the caller is requesting out-of-band progress notifications
1159
+ * for this request (as represented by notifications/progress). The value of
1160
+ * this parameter is an opaque token that will be attached to any subsequent
1161
+ * notifications. The receiver is not obligated to provide these
1162
+ * notifications.
1163
+ */
1164
+ progressToken: Schema.optional<Schema.Union<[typeof Schema.String, typeof Schema.Number]>>;
1165
+ }>>;
1166
+ }>, typeof Schema.Void, typeof McpError, never>;
1167
+ /**
1168
+ * Sent from the client to request resources/updated notifications from the
1169
+ * server whenever a particular resource changes.
1170
+ *
1171
+ * @since 1.0.0
1172
+ * @category Resources
1173
+ */
1174
+ export declare class Subscribe extends Subscribe_base {
1175
+ }
1176
+ declare const Unsubscribe_base: Rpc.Rpc<"resources/unsubscribe", Schema.Struct<{
1177
+ /**
1178
+ * The URI of the resource to subscribe to. The URI can use any protocol;
1179
+ * it is up to the server how to interpret it.
1180
+ */
1181
+ uri: typeof Schema.String;
1182
+ _meta: Schema.optional<Schema.Struct<{
1183
+ /**
1184
+ * If specified, the caller is requesting out-of-band progress notifications
1185
+ * for this request (as represented by notifications/progress). The value of
1186
+ * this parameter is an opaque token that will be attached to any subsequent
1187
+ * notifications. The receiver is not obligated to provide these
1188
+ * notifications.
1189
+ */
1190
+ progressToken: Schema.optional<Schema.Union<[typeof Schema.String, typeof Schema.Number]>>;
1191
+ }>>;
1192
+ }>, typeof Schema.Void, typeof McpError, never>;
1193
+ /**
1194
+ * Sent from the client to request cancellation of resources/updated
1195
+ * notifications from the server. This should follow a previous
1196
+ * resources/subscribe request.
1197
+ *
1198
+ * @since 1.0.0
1199
+ * @category Resources
1200
+ */
1201
+ export declare class Unsubscribe extends Unsubscribe_base {
1202
+ }
1203
+ declare const ResourceUpdatedNotification_base: Rpc.Rpc<"notifications/resources/updated", Schema.Struct<{
1204
+ /**
1205
+ * The URI of the resource that has been updated. This might be a sub-resource of the one that the client actually subscribed to.
1206
+ */
1207
+ uri: typeof Schema.String;
1208
+ _meta: Schema.optional<Schema.Record$<typeof Schema.String, typeof Schema.Unknown>>;
1209
+ }>, typeof Schema.Void, typeof Schema.Never, never>;
1210
+ /**
1211
+ * @since 1.0.0
1212
+ * @category Resources
1213
+ */
1214
+ export declare class ResourceUpdatedNotification extends ResourceUpdatedNotification_base {
1215
+ }
1216
+ declare const PromptArgument_base: Schema.Class<PromptArgument, {
1217
+ /**
1218
+ * The name of the argument.
1219
+ */
1220
+ name: typeof Schema.String;
1221
+ /**
1222
+ * A human-readable description of the argument.
1223
+ */
1224
+ description: Schema.optional<typeof Schema.String>;
1225
+ /**
1226
+ * Whether this argument must be provided.
1227
+ */
1228
+ required: Schema.optional<typeof Schema.Boolean>;
1229
+ }, Schema.Struct.Encoded<{
1230
+ /**
1231
+ * The name of the argument.
1232
+ */
1233
+ name: typeof Schema.String;
1234
+ /**
1235
+ * A human-readable description of the argument.
1236
+ */
1237
+ description: Schema.optional<typeof Schema.String>;
1238
+ /**
1239
+ * Whether this argument must be provided.
1240
+ */
1241
+ required: Schema.optional<typeof Schema.Boolean>;
1242
+ }>, never, {
1243
+ readonly description?: string | undefined;
1244
+ } & {
1245
+ readonly name: string;
1246
+ } & {
1247
+ readonly required?: boolean | undefined;
1248
+ }, {}, {}>;
1249
+ /**
1250
+ * Describes an argument that a prompt can accept.
1251
+ *
1252
+ * @since 1.0.0
1253
+ * @category Prompts
1254
+ */
1255
+ export declare class PromptArgument extends PromptArgument_base {
1256
+ }
1257
+ declare const Prompt_base: Schema.Class<Prompt, {
1258
+ /**
1259
+ * The name of the prompt or prompt template.
1260
+ */
1261
+ name: typeof Schema.String;
1262
+ /**
1263
+ * An optional description of what this prompt provides
1264
+ */
1265
+ description: Schema.optional<typeof Schema.String>;
1266
+ /**
1267
+ * A list of arguments to use for templating the prompt.
1268
+ */
1269
+ arguments: Schema.optional<Schema.Array$<typeof PromptArgument>>;
1270
+ }, Schema.Struct.Encoded<{
1271
+ /**
1272
+ * The name of the prompt or prompt template.
1273
+ */
1274
+ name: typeof Schema.String;
1275
+ /**
1276
+ * An optional description of what this prompt provides
1277
+ */
1278
+ description: Schema.optional<typeof Schema.String>;
1279
+ /**
1280
+ * A list of arguments to use for templating the prompt.
1281
+ */
1282
+ arguments: Schema.optional<Schema.Array$<typeof PromptArgument>>;
1283
+ }>, never, {
1284
+ readonly description?: string | undefined;
1285
+ } & {
1286
+ readonly name: string;
1287
+ } & {
1288
+ readonly arguments?: readonly PromptArgument[] | undefined;
1289
+ }, {}, {}>;
1290
+ /**
1291
+ * A prompt or prompt template that the server offers.
1292
+ *
1293
+ * @since 1.0.0
1294
+ * @category Prompts
1295
+ */
1296
+ export declare class Prompt extends Prompt_base {
1297
+ }
1298
+ declare const TextContent_base: Schema.Class<TextContent, {
1299
+ type: Schema.tag<"text">;
1300
+ /**
1301
+ * The text content of the message.
1302
+ */
1303
+ text: typeof Schema.String;
1304
+ /**
1305
+ * Optional annotations for the client.
1306
+ */
1307
+ annotations: Schema.optional<typeof Annotations>;
1308
+ }, Schema.Struct.Encoded<{
1309
+ type: Schema.tag<"text">;
1310
+ /**
1311
+ * The text content of the message.
1312
+ */
1313
+ text: typeof Schema.String;
1314
+ /**
1315
+ * Optional annotations for the client.
1316
+ */
1317
+ annotations: Schema.optional<typeof Annotations>;
1318
+ }>, never, {
1319
+ readonly annotations?: Annotations | undefined;
1320
+ } & {
1321
+ readonly text: string;
1322
+ } & {
1323
+ readonly type?: "text" | undefined;
1324
+ }, {}, {}>;
1325
+ /**
1326
+ * Text provided to or from an LLM.
1327
+ *
1328
+ * @since 1.0.0
1329
+ * @category Prompts
1330
+ */
1331
+ export declare class TextContent extends TextContent_base {
1332
+ }
1333
+ declare const ImageContent_base: Schema.Class<ImageContent, {
1334
+ type: Schema.tag<"image">;
1335
+ /**
1336
+ * The image data.
1337
+ */
1338
+ data: Schema.Schema<Uint8Array<ArrayBufferLike>, string, never>;
1339
+ /**
1340
+ * The MIME type of the image. Different providers may support different
1341
+ * image types.
1342
+ */
1343
+ mimeType: typeof Schema.String;
1344
+ /**
1345
+ * Optional annotations for the client.
1346
+ */
1347
+ annotations: Schema.optional<typeof Annotations>;
1348
+ }, Schema.Struct.Encoded<{
1349
+ type: Schema.tag<"image">;
1350
+ /**
1351
+ * The image data.
1352
+ */
1353
+ data: Schema.Schema<Uint8Array<ArrayBufferLike>, string, never>;
1354
+ /**
1355
+ * The MIME type of the image. Different providers may support different
1356
+ * image types.
1357
+ */
1358
+ mimeType: typeof Schema.String;
1359
+ /**
1360
+ * Optional annotations for the client.
1361
+ */
1362
+ annotations: Schema.optional<typeof Annotations>;
1363
+ }>, never, {
1364
+ readonly annotations?: Annotations | undefined;
1365
+ } & {
1366
+ readonly type?: "image" | undefined;
1367
+ } & {
1368
+ readonly data: Uint8Array<ArrayBufferLike>;
1369
+ } & {
1370
+ readonly mimeType: string;
1371
+ }, {}, {}>;
1372
+ /**
1373
+ * An image provided to or from an LLM.
1374
+ *
1375
+ * @since 1.0.0
1376
+ * @category Prompts
1377
+ */
1378
+ export declare class ImageContent extends ImageContent_base {
1379
+ }
1380
+ declare const AudioContent_base: Schema.Class<AudioContent, {
1381
+ type: Schema.tag<"audio">;
1382
+ /**
1383
+ * The audio data.
1384
+ */
1385
+ data: Schema.Schema<Uint8Array<ArrayBufferLike>, string, never>;
1386
+ /**
1387
+ * The MIME type of the audio. Different providers may support different
1388
+ * audio types.
1389
+ */
1390
+ mimeType: typeof Schema.String;
1391
+ /**
1392
+ * Optional annotations for the client.
1393
+ */
1394
+ annotations: Schema.optional<typeof Annotations>;
1395
+ }, Schema.Struct.Encoded<{
1396
+ type: Schema.tag<"audio">;
1397
+ /**
1398
+ * The audio data.
1399
+ */
1400
+ data: Schema.Schema<Uint8Array<ArrayBufferLike>, string, never>;
1401
+ /**
1402
+ * The MIME type of the audio. Different providers may support different
1403
+ * audio types.
1404
+ */
1405
+ mimeType: typeof Schema.String;
1406
+ /**
1407
+ * Optional annotations for the client.
1408
+ */
1409
+ annotations: Schema.optional<typeof Annotations>;
1410
+ }>, never, {
1411
+ readonly annotations?: Annotations | undefined;
1412
+ } & {
1413
+ readonly type?: "audio" | undefined;
1414
+ } & {
1415
+ readonly data: Uint8Array<ArrayBufferLike>;
1416
+ } & {
1417
+ readonly mimeType: string;
1418
+ }, {}, {}>;
1419
+ /**
1420
+ * Audio provided to or from an LLM.
1421
+ *
1422
+ * @since 1.0.0
1423
+ * @category Prompts
1424
+ */
1425
+ export declare class AudioContent extends AudioContent_base {
1426
+ }
1427
+ declare const EmbeddedResource_base: Schema.Class<EmbeddedResource, {
1428
+ type: Schema.tag<"resource">;
1429
+ resource: Schema.Union<[typeof TextResourceContents, typeof BlobResourceContents]>;
1430
+ /**
1431
+ * Optional annotations for the client.
1432
+ */
1433
+ annotations: Schema.optional<typeof Annotations>;
1434
+ }, Schema.Struct.Encoded<{
1435
+ type: Schema.tag<"resource">;
1436
+ resource: Schema.Union<[typeof TextResourceContents, typeof BlobResourceContents]>;
1437
+ /**
1438
+ * Optional annotations for the client.
1439
+ */
1440
+ annotations: Schema.optional<typeof Annotations>;
1441
+ }>, never, {
1442
+ readonly annotations?: Annotations | undefined;
1443
+ } & {
1444
+ readonly type?: "resource" | undefined;
1445
+ } & {
1446
+ readonly resource: TextResourceContents | BlobResourceContents;
1447
+ }, {}, {}>;
1448
+ /**
1449
+ * The contents of a resource, embedded into a prompt or tool call result.
1450
+ *
1451
+ * It is up to the client how best to render embedded resources for the benefit
1452
+ * of the LLM and/or the user.
1453
+ *
1454
+ * @since 1.0.0
1455
+ * @category Prompts
1456
+ */
1457
+ export declare class EmbeddedResource extends EmbeddedResource_base {
1458
+ }
1459
+ declare const PromptMessage_base: Schema.Class<PromptMessage, {
1460
+ role: Schema.Literal<["user", "assistant"]>;
1461
+ content: Schema.Union<[typeof TextContent, typeof ImageContent, typeof AudioContent, typeof EmbeddedResource]>;
1462
+ }, Schema.Struct.Encoded<{
1463
+ role: Schema.Literal<["user", "assistant"]>;
1464
+ content: Schema.Union<[typeof TextContent, typeof ImageContent, typeof AudioContent, typeof EmbeddedResource]>;
1465
+ }>, never, {
1466
+ readonly role: "user" | "assistant";
1467
+ } & {
1468
+ readonly content: TextContent | ImageContent | AudioContent | EmbeddedResource;
1469
+ }, {}, {}>;
1470
+ /**
1471
+ * Describes a message returned as part of a prompt.
1472
+ *
1473
+ * This is similar to `SamplingMessage`, but also supports the embedding of
1474
+ * resources from the MCP server.
1475
+ *
1476
+ * @since 1.0.0
1477
+ * @category Prompts
1478
+ */
1479
+ export declare class PromptMessage extends PromptMessage_base {
1480
+ }
1481
+ declare const ListPromptsResult_base: Schema.Class<ListPromptsResult, {
1482
+ prompts: Schema.Array$<typeof Prompt>;
1483
+ nextCursor: Schema.optional<typeof Schema.String>;
1484
+ _meta: Schema.optional<Schema.Record$<typeof Schema.String, typeof Schema.Unknown>>;
1485
+ }, Schema.Struct.Encoded<{
1486
+ prompts: Schema.Array$<typeof Prompt>;
1487
+ nextCursor: Schema.optional<typeof Schema.String>;
1488
+ _meta: Schema.optional<Schema.Record$<typeof Schema.String, typeof Schema.Unknown>>;
1489
+ }>, never, {
1490
+ readonly _meta?: {
1491
+ readonly [x: string]: unknown;
1492
+ } | undefined;
1493
+ } & {
1494
+ readonly nextCursor?: string | undefined;
1495
+ } & {
1496
+ readonly prompts: readonly Prompt[];
1497
+ }, {}, {}>;
1498
+ /**
1499
+ * The server's response to a prompts/list request from the client.
1500
+ *
1501
+ * @since 1.0.0
1502
+ * @category Prompts
1503
+ */
1504
+ export declare class ListPromptsResult extends ListPromptsResult_base {
1505
+ }
1506
+ declare const ListPrompts_base: Rpc.Rpc<"prompts/list", typeof PaginatedRequestMeta, typeof ListPromptsResult, typeof McpError, never>;
1507
+ /**
1508
+ * Sent from the client to request a list of prompts and prompt templates the
1509
+ * server has.
1510
+ *
1511
+ * @since 1.0.0
1512
+ * @category Prompts
1513
+ */
1514
+ export declare class ListPrompts extends ListPrompts_base {
1515
+ }
1516
+ declare const GetPromptResult_base: Schema.Class<GetPromptResult, {
1517
+ messages: Schema.Array$<typeof PromptMessage>;
1518
+ /**
1519
+ * An optional description for the prompt.
1520
+ */
1521
+ description: Schema.optional<typeof Schema.String>;
1522
+ _meta: Schema.optional<Schema.Record$<typeof Schema.String, typeof Schema.Unknown>>;
1523
+ }, Schema.Struct.Encoded<{
1524
+ messages: Schema.Array$<typeof PromptMessage>;
1525
+ /**
1526
+ * An optional description for the prompt.
1527
+ */
1528
+ description: Schema.optional<typeof Schema.String>;
1529
+ _meta: Schema.optional<Schema.Record$<typeof Schema.String, typeof Schema.Unknown>>;
1530
+ }>, never, {
1531
+ readonly description?: string | undefined;
1532
+ } & {
1533
+ readonly messages: readonly PromptMessage[];
1534
+ } & {
1535
+ readonly _meta?: {
1536
+ readonly [x: string]: unknown;
1537
+ } | undefined;
1538
+ }, {}, {}>;
1539
+ /**
1540
+ * The server's response to a prompts/get request from the client.
1541
+ *
1542
+ * @since 1.0.0
1543
+ * @category Prompts
1544
+ */
1545
+ export declare class GetPromptResult extends GetPromptResult_base {
1546
+ }
1547
+ declare const GetPrompt_base: Rpc.Rpc<"prompts/get", Schema.Struct<{
1548
+ /**
1549
+ * The name of the prompt or prompt template.
1550
+ */
1551
+ name: typeof Schema.String;
1552
+ /**
1553
+ * Arguments to use for templating the prompt.
1554
+ */
1555
+ arguments: Schema.optional<Schema.Record$<typeof Schema.String, typeof Schema.String>>;
1556
+ _meta: Schema.optional<Schema.Struct<{
1557
+ /**
1558
+ * If specified, the caller is requesting out-of-band progress notifications
1559
+ * for this request (as represented by notifications/progress). The value of
1560
+ * this parameter is an opaque token that will be attached to any subsequent
1561
+ * notifications. The receiver is not obligated to provide these
1562
+ * notifications.
1563
+ */
1564
+ progressToken: Schema.optional<Schema.Union<[typeof Schema.String, typeof Schema.Number]>>;
1565
+ }>>;
1566
+ }>, typeof GetPromptResult, typeof McpError, never>;
1567
+ /**
1568
+ * Used by the client to get a prompt provided by the server.
1569
+ *
1570
+ * @since 1.0.0
1571
+ * @category Prompts
1572
+ */
1573
+ export declare class GetPrompt extends GetPrompt_base {
1574
+ }
1575
+ declare const PromptListChangedNotification_base: Rpc.Rpc<"notifications/prompts/list_changed", typeof NotificationMeta, typeof Schema.Void, typeof Schema.Never, never>;
1576
+ /**
1577
+ * An optional notification from the server to the client, informing it that
1578
+ * the list of prompts it offers has changed. This may be issued by servers
1579
+ * without any previous subscription from the client.
1580
+ *
1581
+ * @since 1.0.0
1582
+ * @category Prompts
1583
+ */
1584
+ export declare class PromptListChangedNotification extends PromptListChangedNotification_base {
1585
+ }
1586
+ declare const ToolAnnotations_base: Schema.Class<ToolAnnotations, {
1587
+ /**
1588
+ * A human-readable title for the tool.
1589
+ */
1590
+ title: Schema.optional<typeof Schema.String>;
1591
+ /**
1592
+ * If true, the tool does not modify its environment.
1593
+ *
1594
+ * Default: `false`
1595
+ */
1596
+ readOnlyHint: Schema.optionalWith<typeof Schema.Boolean, {
1597
+ default: () => false;
1598
+ }>;
1599
+ /**
1600
+ * If true, the tool may perform destructive updates to its environment.
1601
+ * If false, the tool performs only additive updates.
1602
+ *
1603
+ * (This property is meaningful only when `readOnlyHint == false`)
1604
+ *
1605
+ * Default: `true`
1606
+ */
1607
+ destructiveHint: Schema.optionalWith<typeof Schema.Boolean, {
1608
+ default: () => true;
1609
+ }>;
1610
+ /**
1611
+ * If true, calling the tool repeatedly with the same arguments
1612
+ * will have no additional effect on the its environment.
1613
+ *
1614
+ * (This property is meaningful only when `readOnlyHint == false`)
1615
+ *
1616
+ * Default: `false`
1617
+ */
1618
+ idempotentHint: Schema.optionalWith<typeof Schema.Boolean, {
1619
+ default: () => false;
1620
+ }>;
1621
+ /**
1622
+ * If true, this tool may interact with an "open world" of external
1623
+ * entities. If false, the tool's domain of interaction is closed.
1624
+ * For example, the world of a web search tool is open, whereas that
1625
+ * of a memory tool is not.
1626
+ *
1627
+ * Default: `true`
1628
+ */
1629
+ openWorldHint: Schema.optionalWith<typeof Schema.Boolean, {
1630
+ default: () => true;
1631
+ }>;
1632
+ }, Schema.Struct.Encoded<{
1633
+ /**
1634
+ * A human-readable title for the tool.
1635
+ */
1636
+ title: Schema.optional<typeof Schema.String>;
1637
+ /**
1638
+ * If true, the tool does not modify its environment.
1639
+ *
1640
+ * Default: `false`
1641
+ */
1642
+ readOnlyHint: Schema.optionalWith<typeof Schema.Boolean, {
1643
+ default: () => false;
1644
+ }>;
1645
+ /**
1646
+ * If true, the tool may perform destructive updates to its environment.
1647
+ * If false, the tool performs only additive updates.
1648
+ *
1649
+ * (This property is meaningful only when `readOnlyHint == false`)
1650
+ *
1651
+ * Default: `true`
1652
+ */
1653
+ destructiveHint: Schema.optionalWith<typeof Schema.Boolean, {
1654
+ default: () => true;
1655
+ }>;
1656
+ /**
1657
+ * If true, calling the tool repeatedly with the same arguments
1658
+ * will have no additional effect on the its environment.
1659
+ *
1660
+ * (This property is meaningful only when `readOnlyHint == false`)
1661
+ *
1662
+ * Default: `false`
1663
+ */
1664
+ idempotentHint: Schema.optionalWith<typeof Schema.Boolean, {
1665
+ default: () => false;
1666
+ }>;
1667
+ /**
1668
+ * If true, this tool may interact with an "open world" of external
1669
+ * entities. If false, the tool's domain of interaction is closed.
1670
+ * For example, the world of a web search tool is open, whereas that
1671
+ * of a memory tool is not.
1672
+ *
1673
+ * Default: `true`
1674
+ */
1675
+ openWorldHint: Schema.optionalWith<typeof Schema.Boolean, {
1676
+ default: () => true;
1677
+ }>;
1678
+ }>, never, {
1679
+ readonly title?: string | undefined;
1680
+ } & {
1681
+ readonly readOnlyHint?: boolean | undefined;
1682
+ } & {
1683
+ readonly destructiveHint?: boolean | undefined;
1684
+ } & {
1685
+ readonly idempotentHint?: boolean | undefined;
1686
+ } & {
1687
+ readonly openWorldHint?: boolean | undefined;
1688
+ }, {}, {}>;
1689
+ /**
1690
+ * Additional properties describing a Tool to clients.
1691
+ *
1692
+ * NOTE: all properties in ToolAnnotations are **hints**. They are not
1693
+ * guaranteed to provide a faithful description of tool behavior (including
1694
+ * descriptive properties like `title`).
1695
+ *
1696
+ * Clients should never make tool use decisions based on ToolAnnotations
1697
+ * received from untrusted servers.
1698
+ *
1699
+ * @since 1.0.0
1700
+ * @category Tools
1701
+ */
1702
+ export declare class ToolAnnotations extends ToolAnnotations_base {
1703
+ }
1704
+ declare const Tool_base: Schema.Class<Tool, {
1705
+ /**
1706
+ * The name of the tool.
1707
+ */
1708
+ name: typeof Schema.String;
1709
+ /**
1710
+ * A human-readable description of the tool.
1711
+ *
1712
+ * This can be used by clients to improve the LLM's understanding of available tools. It can be thought of like a "hint" to the model.
1713
+ */
1714
+ description: Schema.optional<typeof Schema.String>;
1715
+ /**
1716
+ * A JSON Schema object defining the expected parameters for the tool.
1717
+ */
1718
+ inputSchema: typeof Schema.Unknown;
1719
+ /**
1720
+ * Optional additional tool information.
1721
+ */
1722
+ annotations: Schema.optional<typeof ToolAnnotations>;
1723
+ }, Schema.Struct.Encoded<{
1724
+ /**
1725
+ * The name of the tool.
1726
+ */
1727
+ name: typeof Schema.String;
1728
+ /**
1729
+ * A human-readable description of the tool.
1730
+ *
1731
+ * This can be used by clients to improve the LLM's understanding of available tools. It can be thought of like a "hint" to the model.
1732
+ */
1733
+ description: Schema.optional<typeof Schema.String>;
1734
+ /**
1735
+ * A JSON Schema object defining the expected parameters for the tool.
1736
+ */
1737
+ inputSchema: typeof Schema.Unknown;
1738
+ /**
1739
+ * Optional additional tool information.
1740
+ */
1741
+ annotations: Schema.optional<typeof ToolAnnotations>;
1742
+ }>, never, {
1743
+ readonly description?: string | undefined;
1744
+ } & {
1745
+ readonly annotations?: ToolAnnotations | undefined;
1746
+ } & {
1747
+ readonly name: string;
1748
+ } & {
1749
+ readonly inputSchema: unknown;
1750
+ }, {}, {}>;
1751
+ /**
1752
+ * Definition for a tool the client can call.
1753
+ *
1754
+ * @since 1.0.0
1755
+ * @category Tools
1756
+ */
1757
+ export declare class Tool extends Tool_base {
1758
+ }
1759
+ declare const ListToolsResult_base: Schema.Class<ListToolsResult, {
1760
+ tools: Schema.Array$<typeof Tool>;
1761
+ nextCursor: Schema.optional<typeof Schema.String>;
1762
+ _meta: Schema.optional<Schema.Record$<typeof Schema.String, typeof Schema.Unknown>>;
1763
+ }, Schema.Struct.Encoded<{
1764
+ tools: Schema.Array$<typeof Tool>;
1765
+ nextCursor: Schema.optional<typeof Schema.String>;
1766
+ _meta: Schema.optional<Schema.Record$<typeof Schema.String, typeof Schema.Unknown>>;
1767
+ }>, never, {
1768
+ readonly tools: readonly Tool[];
1769
+ } & {
1770
+ readonly _meta?: {
1771
+ readonly [x: string]: unknown;
1772
+ } | undefined;
1773
+ } & {
1774
+ readonly nextCursor?: string | undefined;
1775
+ }, {}, {}>;
1776
+ /**
1777
+ * The server's response to a tools/list request from the client.
1778
+ *
1779
+ * @since 1.0.0
1780
+ * @category Tools
1781
+ */
1782
+ export declare class ListToolsResult extends ListToolsResult_base {
1783
+ }
1784
+ declare const ListTools_base: Rpc.Rpc<"tools/list", typeof PaginatedRequestMeta, typeof ListToolsResult, typeof McpError, never>;
1785
+ /**
1786
+ * Sent from the client to request a list of tools the server has.
1787
+ *
1788
+ * @since 1.0.0
1789
+ * @category Tools
1790
+ */
1791
+ export declare class ListTools extends ListTools_base {
1792
+ }
1793
+ declare const CallToolResult_base: Schema.Class<CallToolResult, {
1794
+ content: Schema.Array$<Schema.Union<[typeof TextContent, typeof ImageContent, typeof AudioContent, typeof EmbeddedResource]>>;
1795
+ /**
1796
+ * Whether the tool call ended in an error.
1797
+ *
1798
+ * If not set, this is assumed to be false (the call was successful).
1799
+ */
1800
+ isError: Schema.optional<typeof Schema.Boolean>;
1801
+ _meta: Schema.optional<Schema.Record$<typeof Schema.String, typeof Schema.Unknown>>;
1802
+ }, Schema.Struct.Encoded<{
1803
+ content: Schema.Array$<Schema.Union<[typeof TextContent, typeof ImageContent, typeof AudioContent, typeof EmbeddedResource]>>;
1804
+ /**
1805
+ * Whether the tool call ended in an error.
1806
+ *
1807
+ * If not set, this is assumed to be false (the call was successful).
1808
+ */
1809
+ isError: Schema.optional<typeof Schema.Boolean>;
1810
+ _meta: Schema.optional<Schema.Record$<typeof Schema.String, typeof Schema.Unknown>>;
1811
+ }>, never, {
1812
+ readonly _meta?: {
1813
+ readonly [x: string]: unknown;
1814
+ } | undefined;
1815
+ } & {
1816
+ readonly content: readonly (TextContent | ImageContent | AudioContent | EmbeddedResource)[];
1817
+ } & {
1818
+ readonly isError?: boolean | undefined;
1819
+ }, {}, {}>;
1820
+ /**
1821
+ * The server's response to a tool call.
1822
+ *
1823
+ * Any errors that originate from the tool SHOULD be reported inside the result
1824
+ * object, with `isError` set to true, _not_ as an MCP protocol-level error
1825
+ * response. Otherwise, the LLM would not be able to see that an error occurred
1826
+ * and self-correct.
1827
+ *
1828
+ * However, any errors in _finding_ the tool, an error indicating that the
1829
+ * server does not support tool calls, or any other exceptional conditions,
1830
+ * should be reported as an MCP error response.
1831
+ *
1832
+ * @since 1.0.0
1833
+ * @category Tools
1834
+ */
1835
+ export declare class CallToolResult extends CallToolResult_base {
1836
+ }
1837
+ declare const CallTool_base: Rpc.Rpc<"tools/call", Schema.Struct<{
1838
+ name: typeof Schema.String;
1839
+ arguments: Schema.Record$<typeof Schema.String, typeof Schema.Unknown>;
1840
+ _meta: Schema.optional<Schema.Struct<{
1841
+ /**
1842
+ * If specified, the caller is requesting out-of-band progress notifications
1843
+ * for this request (as represented by notifications/progress). The value of
1844
+ * this parameter is an opaque token that will be attached to any subsequent
1845
+ * notifications. The receiver is not obligated to provide these
1846
+ * notifications.
1847
+ */
1848
+ progressToken: Schema.optional<Schema.Union<[typeof Schema.String, typeof Schema.Number]>>;
1849
+ }>>;
1850
+ }>, typeof CallToolResult, typeof McpError, never>;
1851
+ /**
1852
+ * Used by the client to invoke a tool provided by the server.
1853
+ *
1854
+ * @since 1.0.0
1855
+ * @category Tools
1856
+ */
1857
+ export declare class CallTool extends CallTool_base {
1858
+ }
1859
+ declare const ToolListChangedNotification_base: Rpc.Rpc<"notifications/tools/list_changed", typeof NotificationMeta, typeof Schema.Void, typeof Schema.Never, never>;
1860
+ /**
1861
+ * An optional notification from the server to the client, informing it that
1862
+ * the list of tools it offers has changed. This may be issued by servers
1863
+ * without any previous subscription from the client.
1864
+ *
1865
+ * @since 1.0.0
1866
+ * @category Tools
1867
+ */
1868
+ export declare class ToolListChangedNotification extends ToolListChangedNotification_base {
1869
+ }
1870
+ /**
1871
+ * The severity of a log message.
1872
+ *
1873
+ * These map to syslog message severities, as specified in RFC-5424:
1874
+ * https://datatracker.ietf.org/doc/html/rfc5424#section-6.2.1
1875
+ *
1876
+ * @since 1.0.0
1877
+ * @category Logging
1878
+ */
1879
+ export declare const LoggingLevel: Schema.Literal<[
1880
+ "debug",
1881
+ "info",
1882
+ "notice",
1883
+ "warning",
1884
+ "error",
1885
+ "critical",
1886
+ "alert",
1887
+ "emergency"
1888
+ ]>;
1889
+ /**
1890
+ * The severity of a log message.
1891
+ *
1892
+ * These map to syslog message severities, as specified in RFC-5424:
1893
+ * https://datatracker.ietf.org/doc/html/rfc5424#section-6.2.1
1894
+ *
1895
+ * @since 1.0.0
1896
+ * @category Logging
1897
+ */
1898
+ export type LoggingLevel = typeof LoggingLevel.Type;
1899
+ declare const SetLevel_base: Rpc.Rpc<"logging/setLevel", Schema.Struct<{
1900
+ /**
1901
+ * The level of logging that the client wants to receive from the server.
1902
+ * The server should send all logs at this level and higher (i.e., more
1903
+ * severe) to the client as notifications/message.
1904
+ */
1905
+ level: Schema.Literal<["debug", "info", "notice", "warning", "error", "critical", "alert", "emergency"]>;
1906
+ _meta: Schema.optional<Schema.Struct<{
1907
+ /**
1908
+ * If specified, the caller is requesting out-of-band progress notifications
1909
+ * for this request (as represented by notifications/progress). The value of
1910
+ * this parameter is an opaque token that will be attached to any subsequent
1911
+ * notifications. The receiver is not obligated to provide these
1912
+ * notifications.
1913
+ */
1914
+ progressToken: Schema.optional<Schema.Union<[typeof Schema.String, typeof Schema.Number]>>;
1915
+ }>>;
1916
+ }>, typeof Schema.Void, typeof McpError, never>;
1917
+ /**
1918
+ * A request from the client to the server, to enable or adjust logging.
1919
+ *
1920
+ * @since 1.0.0
1921
+ * @category Logging
1922
+ */
1923
+ export declare class SetLevel extends SetLevel_base {
1924
+ }
1925
+ declare const LoggingMessageNotification_base: Rpc.Rpc<"notifications/message", Schema.Struct<{
1926
+ /**
1927
+ * The severity of this log message.
1928
+ */
1929
+ level: Schema.Literal<["debug", "info", "notice", "warning", "error", "critical", "alert", "emergency"]>;
1930
+ /**
1931
+ * An optional name of the logger issuing this message.
1932
+ */
1933
+ logger: Schema.optional<typeof Schema.String>;
1934
+ /**
1935
+ * The data to be logged, such as a string message or an object. Any JSON
1936
+ * serializable type is allowed here.
1937
+ */
1938
+ data: typeof Schema.Unknown;
1939
+ _meta: Schema.optional<Schema.Record$<typeof Schema.String, typeof Schema.Unknown>>;
1940
+ }>, typeof Schema.Void, typeof Schema.Never, never>;
1941
+ /**
1942
+ * @since 1.0.0
1943
+ * @category Logging
1944
+ */
1945
+ export declare class LoggingMessageNotification extends LoggingMessageNotification_base {
1946
+ }
1947
+ declare const SamplingMessage_base: Schema.Class<SamplingMessage, {
1948
+ role: Schema.Literal<["user", "assistant"]>;
1949
+ content: Schema.Union<[typeof TextContent, typeof ImageContent, typeof AudioContent]>;
1950
+ }, Schema.Struct.Encoded<{
1951
+ role: Schema.Literal<["user", "assistant"]>;
1952
+ content: Schema.Union<[typeof TextContent, typeof ImageContent, typeof AudioContent]>;
1953
+ }>, never, {
1954
+ readonly role: "user" | "assistant";
1955
+ } & {
1956
+ readonly content: TextContent | ImageContent | AudioContent;
1957
+ }, {}, {}>;
1958
+ /**
1959
+ * Describes a message issued to or received from an LLM API.
1960
+ *
1961
+ * @since 1.0.0
1962
+ * @category Sampling
1963
+ */
1964
+ export declare class SamplingMessage extends SamplingMessage_base {
1965
+ }
1966
+ declare const ModelHint_base: Schema.Class<ModelHint, {
1967
+ /**
1968
+ * A hint for a model name.
1969
+ *
1970
+ * The client SHOULD treat this as a substring of a model name; for example:
1971
+ * - `claude-3-5-sonnet` should match `claude-3-5-sonnet-20241022`
1972
+ * - `sonnet` should match `claude-3-5-sonnet-20241022`, `claude-3-sonnet-20240229`, etc.
1973
+ * - `claude` should match any Claude model
1974
+ *
1975
+ * The client MAY also map the string to a different provider's model name or
1976
+ * a different model family, as long as it fills a similar niche; for example:
1977
+ * - `gemini-1.5-flash` could match `claude-3-haiku-20240307`
1978
+ */
1979
+ name: Schema.optional<typeof Schema.String>;
1980
+ }, Schema.Struct.Encoded<{
1981
+ /**
1982
+ * A hint for a model name.
1983
+ *
1984
+ * The client SHOULD treat this as a substring of a model name; for example:
1985
+ * - `claude-3-5-sonnet` should match `claude-3-5-sonnet-20241022`
1986
+ * - `sonnet` should match `claude-3-5-sonnet-20241022`, `claude-3-sonnet-20240229`, etc.
1987
+ * - `claude` should match any Claude model
1988
+ *
1989
+ * The client MAY also map the string to a different provider's model name or
1990
+ * a different model family, as long as it fills a similar niche; for example:
1991
+ * - `gemini-1.5-flash` could match `claude-3-haiku-20240307`
1992
+ */
1993
+ name: Schema.optional<typeof Schema.String>;
1994
+ }>, never, {
1995
+ readonly name?: string | undefined;
1996
+ }, {}, {}>;
1997
+ /**
1998
+ * Hints to use for model selection.
1999
+ *
2000
+ * Keys not declared here are currently left unspecified by the spec and are up
2001
+ * to the client to interpret.
2002
+ *
2003
+ * @since 1.0.0
2004
+ * @category Sampling
2005
+ */
2006
+ export declare class ModelHint extends ModelHint_base {
2007
+ }
2008
+ declare const ModelPreferences_base: Schema.Class<ModelPreferences, {
2009
+ /**
2010
+ * Optional hints to use for model selection.
2011
+ *
2012
+ * If multiple hints are specified, the client MUST evaluate them in order
2013
+ * (such that the first match is taken).
2014
+ *
2015
+ * The client SHOULD prioritize these hints over the numeric priorities, but
2016
+ * MAY still use the priorities to select from ambiguous matches.
2017
+ */
2018
+ hints: Schema.optional<Schema.Array$<typeof ModelHint>>;
2019
+ /**
2020
+ * How much to prioritize cost when selecting a model. A value of 0 means cost
2021
+ * is not important, while a value of 1 means cost is the most important
2022
+ * factor.
2023
+ */
2024
+ costPriority: Schema.optional<Schema.filter<typeof Schema.Number>>;
2025
+ /**
2026
+ * How much to prioritize sampling speed (latency) when selecting a model. A
2027
+ * value of 0 means speed is not important, while a value of 1 means speed is
2028
+ * the most important factor.
2029
+ */
2030
+ speedPriority: Schema.optional<Schema.filter<typeof Schema.Number>>;
2031
+ /**
2032
+ * How much to prioritize intelligence and capabilities when selecting a
2033
+ * model. A value of 0 means intelligence is not important, while a value of 1
2034
+ * means intelligence is the most important factor.
2035
+ */
2036
+ intelligencePriority: Schema.optional<Schema.filter<typeof Schema.Number>>;
2037
+ }, Schema.Struct.Encoded<{
2038
+ /**
2039
+ * Optional hints to use for model selection.
2040
+ *
2041
+ * If multiple hints are specified, the client MUST evaluate them in order
2042
+ * (such that the first match is taken).
2043
+ *
2044
+ * The client SHOULD prioritize these hints over the numeric priorities, but
2045
+ * MAY still use the priorities to select from ambiguous matches.
2046
+ */
2047
+ hints: Schema.optional<Schema.Array$<typeof ModelHint>>;
2048
+ /**
2049
+ * How much to prioritize cost when selecting a model. A value of 0 means cost
2050
+ * is not important, while a value of 1 means cost is the most important
2051
+ * factor.
2052
+ */
2053
+ costPriority: Schema.optional<Schema.filter<typeof Schema.Number>>;
2054
+ /**
2055
+ * How much to prioritize sampling speed (latency) when selecting a model. A
2056
+ * value of 0 means speed is not important, while a value of 1 means speed is
2057
+ * the most important factor.
2058
+ */
2059
+ speedPriority: Schema.optional<Schema.filter<typeof Schema.Number>>;
2060
+ /**
2061
+ * How much to prioritize intelligence and capabilities when selecting a
2062
+ * model. A value of 0 means intelligence is not important, while a value of 1
2063
+ * means intelligence is the most important factor.
2064
+ */
2065
+ intelligencePriority: Schema.optional<Schema.filter<typeof Schema.Number>>;
2066
+ }>, never, {
2067
+ readonly hints?: readonly ModelHint[] | undefined;
2068
+ } & {
2069
+ readonly costPriority?: number | undefined;
2070
+ } & {
2071
+ readonly speedPriority?: number | undefined;
2072
+ } & {
2073
+ readonly intelligencePriority?: number | undefined;
2074
+ }, {}, {}>;
2075
+ /**
2076
+ * The server's preferences for model selection, requested of the client during sampling.
2077
+ *
2078
+ * Because LLMs can vary along multiple dimensions, choosing the "best" model is
2079
+ * rarely straightforward. Different models excel in different areas—some are
2080
+ * faster but less capable, others are more capable but more expensive, and so
2081
+ * on. This interface allows servers to express their priorities across multiple
2082
+ * dimensions to help clients make an appropriate selection for their use case.
2083
+ *
2084
+ * These preferences are always advisory. The client MAY ignore them. It is also
2085
+ * up to the client to decide how to interpret these preferences and how to
2086
+ * balance them against other considerations.
2087
+ *
2088
+ * @since 1.0.0
2089
+ * @category Sampling
2090
+ */
2091
+ export declare class ModelPreferences extends ModelPreferences_base {
2092
+ }
2093
+ declare const CreateMessageResult_base: Schema.Class<CreateMessageResult, {
2094
+ /**
2095
+ * The name of the model that generated the message.
2096
+ */
2097
+ model: typeof Schema.String;
2098
+ /**
2099
+ * The reason why sampling stopped, if known.
2100
+ */
2101
+ stopReason: Schema.optional<typeof Schema.String>;
2102
+ }, Schema.Struct.Encoded<{
2103
+ /**
2104
+ * The name of the model that generated the message.
2105
+ */
2106
+ model: typeof Schema.String;
2107
+ /**
2108
+ * The reason why sampling stopped, if known.
2109
+ */
2110
+ stopReason: Schema.optional<typeof Schema.String>;
2111
+ }>, never, {
2112
+ readonly model: string;
2113
+ } & {
2114
+ readonly stopReason?: string | undefined;
2115
+ }, {}, {}>;
2116
+ /**
2117
+ * The client's response to a sampling/create_message request from the server.
2118
+ * The client should inform the user before returning the sampled message, to
2119
+ * allow them to inspect the response (human in the loop) and decide whether to
2120
+ * allow the server to see it.
2121
+ *
2122
+ * @since 1.0.0
2123
+ * @category Sampling
2124
+ */
2125
+ export declare class CreateMessageResult extends CreateMessageResult_base {
2126
+ }
2127
+ declare const CreateMessage_base: Rpc.Rpc<"sampling/createMessage", Schema.Struct<{
2128
+ messages: Schema.Array$<typeof SamplingMessage>;
2129
+ /**
2130
+ * The server's preferences for which model to select. The client MAY ignore
2131
+ * these preferences.
2132
+ */
2133
+ modelPreferences: Schema.optional<typeof ModelPreferences>;
2134
+ /**
2135
+ * An optional system prompt the server wants to use for sampling. The
2136
+ * client MAY modify or omit this prompt.
2137
+ */
2138
+ systemPrompt: Schema.optional<typeof Schema.String>;
2139
+ /**
2140
+ * A request to include context from one or more MCP servers (including the
2141
+ * caller), to be attached to the prompt. The client MAY ignore this request.
2142
+ */
2143
+ includeContext: Schema.optional<Schema.Literal<["none", "thisServer", "allServers"]>>;
2144
+ temperature: Schema.optional<typeof Schema.Number>;
2145
+ /**
2146
+ * The maximum number of tokens to sample, as requested by the server. The
2147
+ * client MAY choose to sample fewer tokens than requested.
2148
+ */
2149
+ maxTokens: typeof Schema.Number;
2150
+ stopSequences: Schema.optional<Schema.Array$<typeof Schema.String>>;
2151
+ /**
2152
+ * Optional metadata to pass through to the LLM provider. The format of
2153
+ * this metadata is provider-specific.
2154
+ */
2155
+ metadata: typeof Schema.Unknown;
2156
+ }>, typeof CreateMessageResult, typeof McpError, never>;
2157
+ /**
2158
+ * A request from the server to sample an LLM via the client. The client has
2159
+ * full discretion over which model to select. The client should also inform the
2160
+ * user before beginning sampling, to allow them to inspect the request (human
2161
+ * in the loop) and decide whether to approve it.
2162
+ *
2163
+ * @since 1.0.0
2164
+ * @category Sampling
2165
+ */
2166
+ export declare class CreateMessage extends CreateMessage_base {
2167
+ }
2168
+ declare const ResourceReference_base: Schema.Class<ResourceReference, {
2169
+ type: Schema.tag<"ref/resource">;
2170
+ /**
2171
+ * The URI or URI template of the resource.
2172
+ */
2173
+ uri: typeof Schema.String;
2174
+ }, Schema.Struct.Encoded<{
2175
+ type: Schema.tag<"ref/resource">;
2176
+ /**
2177
+ * The URI or URI template of the resource.
2178
+ */
2179
+ uri: typeof Schema.String;
2180
+ }>, never, {
2181
+ readonly type?: "ref/resource" | undefined;
2182
+ } & {
2183
+ readonly uri: string;
2184
+ }, {}, {}>;
2185
+ /**
2186
+ * A reference to a resource or resource template definition.
2187
+ *
2188
+ * @since 1.0.0
2189
+ * @category Autocomplete
2190
+ */
2191
+ export declare class ResourceReference extends ResourceReference_base {
2192
+ }
2193
+ declare const PromptReference_base: Schema.Class<PromptReference, {
2194
+ type: Schema.tag<"ref/prompt">;
2195
+ /**
2196
+ * The name of the prompt or prompt template
2197
+ */
2198
+ name: typeof Schema.String;
2199
+ }, Schema.Struct.Encoded<{
2200
+ type: Schema.tag<"ref/prompt">;
2201
+ /**
2202
+ * The name of the prompt or prompt template
2203
+ */
2204
+ name: typeof Schema.String;
2205
+ }>, never, {
2206
+ readonly name: string;
2207
+ } & {
2208
+ readonly type?: "ref/prompt" | undefined;
2209
+ }, {}, {}>;
2210
+ /**
2211
+ * Identifies a prompt.
2212
+ *
2213
+ * @since 1.0.0
2214
+ * @category Autocomplete
2215
+ */
2216
+ export declare class PromptReference extends PromptReference_base {
2217
+ }
2218
+ declare const CompleteResult_base: Schema.Class<CompleteResult, {
2219
+ completion: Schema.Struct<{
2220
+ /**
2221
+ * An array of completion values. Must not exceed 100 items.
2222
+ */
2223
+ values: Schema.Array$<typeof Schema.String>;
2224
+ /**
2225
+ * The total number of completion options available. This can exceed the
2226
+ * number of values actually sent in the response.
2227
+ */
2228
+ total: Schema.optional<typeof Schema.Number>;
2229
+ /**
2230
+ * Indicates whether there are additional completion options beyond those
2231
+ * provided in the current response, even if the exact total is unknown.
2232
+ */
2233
+ hasMore: Schema.optional<typeof Schema.Boolean>;
2234
+ }>;
2235
+ }, Schema.Struct.Encoded<{
2236
+ completion: Schema.Struct<{
2237
+ /**
2238
+ * An array of completion values. Must not exceed 100 items.
2239
+ */
2240
+ values: Schema.Array$<typeof Schema.String>;
2241
+ /**
2242
+ * The total number of completion options available. This can exceed the
2243
+ * number of values actually sent in the response.
2244
+ */
2245
+ total: Schema.optional<typeof Schema.Number>;
2246
+ /**
2247
+ * Indicates whether there are additional completion options beyond those
2248
+ * provided in the current response, even if the exact total is unknown.
2249
+ */
2250
+ hasMore: Schema.optional<typeof Schema.Boolean>;
2251
+ }>;
2252
+ }>, never, {
2253
+ readonly completion: {
2254
+ readonly values: readonly string[];
2255
+ readonly total?: number | undefined;
2256
+ readonly hasMore?: boolean | undefined;
2257
+ };
2258
+ }, {}, {}>;
2259
+ /**
2260
+ * The server's response to a completion/complete request
2261
+ *
2262
+ * @since 1.0.0
2263
+ * @category Autocomplete
2264
+ */
2265
+ export declare class CompleteResult extends CompleteResult_base {
2266
+ /**
2267
+ * @since 1.0.0
2268
+ */
2269
+ static readonly empty: CompleteResult;
2270
+ }
2271
+ declare const Complete_base: Rpc.Rpc<"completion/complete", Schema.Struct<{
2272
+ ref: Schema.Union<[typeof PromptReference, typeof ResourceReference]>;
2273
+ /**
2274
+ * The argument's information
2275
+ */
2276
+ argument: Schema.Struct<{
2277
+ /**
2278
+ * The name of the argument
2279
+ */
2280
+ name: typeof Schema.String;
2281
+ /**
2282
+ * The value of the argument to use for completion matching.
2283
+ */
2284
+ value: typeof Schema.String;
2285
+ }>;
2286
+ }>, typeof CompleteResult, typeof McpError, never>;
2287
+ /**
2288
+ * A request from the client to the server, to ask for completion options.
2289
+ *
2290
+ * @since 1.0.0
2291
+ * @category Autocomplete
2292
+ */
2293
+ export declare class Complete extends Complete_base {
2294
+ }
2295
+ declare const Root_base: Schema.Class<Root, {
2296
+ /**
2297
+ * The URI identifying the root. This *must* start with file:// for now.
2298
+ * This restriction may be relaxed in future versions of the protocol to allow
2299
+ * other URI schemes.
2300
+ */
2301
+ uri: typeof Schema.String;
2302
+ /**
2303
+ * An optional name for the root. This can be used to provide a human-readable
2304
+ * identifier for the root, which may be useful for display purposes or for
2305
+ * referencing the root in other parts of the application.
2306
+ */
2307
+ name: Schema.optional<typeof Schema.String>;
2308
+ }, Schema.Struct.Encoded<{
2309
+ /**
2310
+ * The URI identifying the root. This *must* start with file:// for now.
2311
+ * This restriction may be relaxed in future versions of the protocol to allow
2312
+ * other URI schemes.
2313
+ */
2314
+ uri: typeof Schema.String;
2315
+ /**
2316
+ * An optional name for the root. This can be used to provide a human-readable
2317
+ * identifier for the root, which may be useful for display purposes or for
2318
+ * referencing the root in other parts of the application.
2319
+ */
2320
+ name: Schema.optional<typeof Schema.String>;
2321
+ }>, never, {
2322
+ readonly name?: string | undefined;
2323
+ } & {
2324
+ readonly uri: string;
2325
+ }, {}, {}>;
2326
+ /**
2327
+ * Represents a root directory or file that the server can operate on.
2328
+ *
2329
+ * @since 1.0.0
2330
+ * @category Roots
2331
+ */
2332
+ export declare class Root extends Root_base {
2333
+ }
2334
+ declare const ListRootsResult_base: Schema.Class<ListRootsResult, {
2335
+ roots: Schema.Array$<typeof Root>;
2336
+ }, Schema.Struct.Encoded<{
2337
+ roots: Schema.Array$<typeof Root>;
2338
+ }>, never, {
2339
+ readonly roots: readonly Root[];
2340
+ }, {}, {}>;
2341
+ /**
2342
+ * The client's response to a roots/list request from the server. This result
2343
+ * contains an array of Root objects, each representing a root directory or file
2344
+ * that the server can operate on.
2345
+ *
2346
+ * @since 1.0.0
2347
+ * @category Roots
2348
+ */
2349
+ export declare class ListRootsResult extends ListRootsResult_base {
2350
+ }
2351
+ declare const ListRoots_base: Rpc.Rpc<"roots/list", typeof RequestMeta, typeof ListRootsResult, typeof McpError, never>;
2352
+ /**
2353
+ * Sent from the server to request a list of root URIs from the client. Roots
2354
+ * allow servers to ask for specific directories or files to operate on. A
2355
+ * common example for roots is providing a set of repositories or directories a
2356
+ * server should operate
2357
+ * on.
2358
+ *
2359
+ * This request is typically used when the server needs to understand the file
2360
+ * system structure or access specific locations that the client has permission
2361
+ * to read from.
2362
+ *
2363
+ * @since 1.0.0
2364
+ * @category Roots
2365
+ */
2366
+ export declare class ListRoots extends ListRoots_base {
2367
+ }
2368
+ declare const RootsListChangedNotification_base: Rpc.Rpc<"notifications/roots/list_changed", typeof NotificationMeta, typeof Schema.Void, typeof Schema.Never, never>;
2369
+ /**
2370
+ * A notification from the client to the server, informing it that the list of
2371
+ * roots has changed. This notification should be sent whenever the client adds,
2372
+ * removes, or modifies any root. The server should then request an updated list
2373
+ * of roots using the ListRootsRequest.
2374
+ *
2375
+ * @since 1.0.0
2376
+ * @category Roots
2377
+ */
2378
+ export declare class RootsListChangedNotification extends RootsListChangedNotification_base {
2379
+ }
2380
+ /**
2381
+ * @since 1.0.0
2382
+ * @category Protocol
2383
+ */
2384
+ export type RequestEncoded<Group extends RpcGroup.Any> = RpcGroup.Rpcs<Group> extends infer Rpc ? Rpc extends Rpc.Rpc<infer _Tag, infer _Payload, infer _Success, infer _Error, infer _Middleware> ? {
2385
+ readonly _tag: "Request";
2386
+ readonly id: string | number;
2387
+ readonly method: _Tag;
2388
+ readonly payload: _Payload["Encoded"];
2389
+ } : never : never;
2390
+ /**
2391
+ * @since 1.0.0
2392
+ * @category Protocol
2393
+ */
2394
+ export type NotificationEncoded<Group extends RpcGroup.Any> = RpcGroup.Rpcs<Group> extends infer Rpc ? Rpc extends Rpc.Rpc<infer _Tag, infer _Payload, infer _Success, infer _Error, infer _Middleware> ? {
2395
+ readonly _tag: "Notification";
2396
+ readonly method: _Tag;
2397
+ readonly payload: _Payload["Encoded"];
2398
+ } : never : never;
2399
+ /**
2400
+ * @since 1.0.0
2401
+ * @category Protocol
2402
+ */
2403
+ export type SuccessEncoded<Group extends RpcGroup.Any> = RpcGroup.Rpcs<Group> extends infer Rpc ? Rpc extends Rpc.Rpc<infer _Tag, infer _Payload, infer _Success, infer _Error, infer _Middleware> ? {
2404
+ readonly _tag: "Success";
2405
+ readonly id: string | number;
2406
+ readonly result: _Success["Encoded"];
2407
+ } : never : never;
2408
+ /**
2409
+ * @since 1.0.0
2410
+ * @category Protocol
2411
+ */
2412
+ export type FailureEncoded<Group extends RpcGroup.Any> = RpcGroup.Rpcs<Group> extends infer Rpc ? Rpc extends Rpc.Rpc<infer _Tag, infer _Payload, infer _Success, infer _Error, infer _Middleware> ? {
2413
+ readonly _tag: "Failure";
2414
+ readonly id: string | number;
2415
+ readonly error: _Error["Encoded"];
2416
+ } : never : never;
2417
+ declare const ClientRequestRpcs_base: RpcGroup.RpcGroup<typeof Ping | typeof Initialize | typeof ListResources | typeof ListResourceTemplates | typeof ReadResource | typeof Subscribe | typeof Unsubscribe | typeof ListPrompts | typeof GetPrompt | typeof ListTools | typeof CallTool | typeof SetLevel | typeof Complete>;
2418
+ /**
2419
+ * @since 1.0.0
2420
+ * @category Protocol
2421
+ */
2422
+ export declare class ClientRequestRpcs extends ClientRequestRpcs_base {
2423
+ }
2424
+ /**
2425
+ * @since 1.0.0
2426
+ * @category Protocol
2427
+ */
2428
+ export type ClientRequestEncoded = RequestEncoded<typeof ClientRequestRpcs>;
2429
+ declare const ClientNotificationRpcs_base: RpcGroup.RpcGroup<typeof InitializedNotification | typeof CancelledNotification | typeof ProgressNotification | typeof RootsListChangedNotification>;
2430
+ /**
2431
+ * @since 1.0.0
2432
+ * @category Protocol
2433
+ */
2434
+ export declare class ClientNotificationRpcs extends ClientNotificationRpcs_base {
2435
+ }
2436
+ /**
2437
+ * @since 1.0.0
2438
+ * @category Protocol
2439
+ */
2440
+ export type ClientNotificationEncoded = NotificationEncoded<typeof ClientNotificationRpcs>;
2441
+ declare const ClientRpcs_base: RpcGroup.RpcGroup<typeof Ping | typeof Initialize | typeof InitializedNotification | typeof CancelledNotification | typeof ProgressNotification | typeof ListResources | typeof ListResourceTemplates | typeof ReadResource | typeof Subscribe | typeof Unsubscribe | typeof ListPrompts | typeof GetPrompt | typeof ListTools | typeof CallTool | typeof SetLevel | typeof Complete | typeof RootsListChangedNotification>;
2442
+ /**
2443
+ * @since 1.0.0
2444
+ * @category Protocol
2445
+ */
2446
+ export declare class ClientRpcs extends ClientRpcs_base {
2447
+ }
2448
+ /**
2449
+ * @since 1.0.0
2450
+ * @category Protocol
2451
+ */
2452
+ export type ClientSuccessEncoded = SuccessEncoded<typeof ServerRequestRpcs>;
2453
+ /**
2454
+ * @since 1.0.0
2455
+ * @category Protocol
2456
+ */
2457
+ export type ClientFailureEncoded = FailureEncoded<typeof ServerRequestRpcs>;
2458
+ declare const ServerRequestRpcs_base: RpcGroup.RpcGroup<typeof Ping | typeof CreateMessage | typeof ListRoots>;
2459
+ /**
2460
+ * @since 1.0.0
2461
+ * @category Protocol
2462
+ */
2463
+ export declare class ServerRequestRpcs extends ServerRequestRpcs_base {
2464
+ }
2465
+ /**
2466
+ * @since 1.0.0
2467
+ * @category Protocol
2468
+ */
2469
+ export type ServerRequestEncoded = RequestEncoded<typeof ServerRequestRpcs>;
2470
+ declare const ServerNotificationRpcs_base: RpcGroup.RpcGroup<typeof CancelledNotification | typeof ProgressNotification | typeof ResourceListChangedNotification | typeof ResourceUpdatedNotification | typeof PromptListChangedNotification | typeof ToolListChangedNotification | typeof LoggingMessageNotification>;
2471
+ /**
2472
+ * @since 1.0.0
2473
+ * @category Protocol
2474
+ */
2475
+ export declare class ServerNotificationRpcs extends ServerNotificationRpcs_base {
2476
+ }
2477
+ /**
2478
+ * @since 1.0.0
2479
+ * @category Protocol
2480
+ */
2481
+ export type ServerNotificationEncoded = NotificationEncoded<typeof ServerNotificationRpcs>;
2482
+ /**
2483
+ * @since 1.0.0
2484
+ * @category Protocol
2485
+ */
2486
+ export type ServerSuccessEncoded = SuccessEncoded<typeof ClientRequestRpcs>;
2487
+ /**
2488
+ * @since 1.0.0
2489
+ * @category Protocol
2490
+ */
2491
+ export type ServerFailureEncoded = FailureEncoded<typeof ClientRequestRpcs>;
2492
+ /**
2493
+ * @since 1.0.0
2494
+ * @category Protocol
2495
+ */
2496
+ export type ServerResultEncoded = ServerSuccessEncoded | ServerFailureEncoded;
2497
+ /**
2498
+ * @since 1.0.0
2499
+ * @category Protocol
2500
+ */
2501
+ export type FromClientEncoded = ClientRequestEncoded | ClientNotificationEncoded;
2502
+ /**
2503
+ * @since 1.0.0
2504
+ * @category Protocol
2505
+ */
2506
+ export type FromServerEncoded = ServerResultEncoded | ServerNotificationEncoded;
2507
+ /**
2508
+ * @since 1.0.0
2509
+ * @category Parameters
2510
+ */
2511
+ export declare const ParamAnnotation: unique symbol;
2512
+ /**
2513
+ * @since 1.0.0
2514
+ * @category Parameters
2515
+ */
2516
+ export interface Param<Id extends string, S extends Schema.Schema.Any> extends Schema.Schema<S["Type"], S["Encoded"], S["Context"]> {
2517
+ readonly [ParamAnnotation]: Id;
2518
+ }
2519
+ /**
2520
+ * Helper to create a param for a resource URI template.
2521
+ *
2522
+ * @since 1.0.0
2523
+ * @category Parameters
2524
+ */
2525
+ export declare const param: <const Id extends string, S extends Schema.Schema.Any>(id: Id, schema: S) => Param<Id, S>;
2526
+ export {};
2527
+ //# sourceMappingURL=McpSchema.d.ts.map