@jangmanj/mcp 0.0.0-stage → 0.13.0

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