|
3 | 3 | * |
4 | 4 | * Source: https://github.com/modelcontextprotocol/modelcontextprotocol |
5 | 5 | * Pulled from: https://raw.githubusercontent.com/modelcontextprotocol/modelcontextprotocol/main/schema/draft/schema.ts |
6 | | - * Last updated from commit: f68d864a813754e188c6df52dcc5772a12f96c63 |
| 6 | + * Last updated from commit: 71e306956a4959c9655e5036be215d41986596e6 |
7 | 7 | * |
8 | 8 | * DO NOT EDIT THIS FILE MANUALLY. Changes will be overwritten by automated updates. |
9 | 9 | * To update this file, run: pnpm run fetch:spec-types 2026-07-28 |
@@ -82,12 +82,19 @@ export interface RequestMetaObject extends MetaObject { |
82 | 82 | */ |
83 | 83 | 'io.modelcontextprotocol/protocolVersion': string; |
84 | 84 | /** |
85 | | - * Identifies the client software making the request. Required. |
| 85 | + * Identifies the client software making the request. Clients SHOULD |
| 86 | + * include this field on every request unless specifically configured not |
| 87 | + * to do so. |
86 | 88 | * |
87 | 89 | * The {@link Implementation} schema requires `name` and `version`; other |
88 | 90 | * fields are optional. |
| 91 | + * |
| 92 | + * The value is self-reported by the client and is not verified by the |
| 93 | + * protocol. It is intended for display, logging, and debugging. Servers |
| 94 | + * SHOULD NOT use it to change their behavior, and SHOULD NOT rely on it for |
| 95 | + * security decisions. |
89 | 96 | */ |
90 | | - 'io.modelcontextprotocol/clientInfo': Implementation; |
| 97 | + 'io.modelcontextprotocol/clientInfo'?: Implementation; |
91 | 98 | /** |
92 | 99 | * The client's capabilities for this specific request. Required. |
93 | 100 | * |
@@ -133,6 +140,30 @@ export interface NotificationMetaObject extends MetaObject { |
133 | 140 | 'io.modelcontextprotocol/subscriptionId'?: RequestId; |
134 | 141 | } |
135 | 142 |
|
| 143 | +/** |
| 144 | + * Extends {@link MetaObject} with additional result-specific fields. All key naming rules from `MetaObject` apply. |
| 145 | + * |
| 146 | + * @see {@link MetaObject} for key naming rules and reserved prefixes. |
| 147 | + * @see [General fields: `_meta`](/specification/draft/basic/index#meta) for more details. |
| 148 | + * @category Common Types |
| 149 | + */ |
| 150 | +export interface ResultMetaObject extends MetaObject { |
| 151 | + /** |
| 152 | + * Identifies the server software producing the response. Servers SHOULD |
| 153 | + * include this field on every response unless specifically configured not |
| 154 | + * to do so. |
| 155 | + * |
| 156 | + * The {@link Implementation} schema requires `name` and `version`; other |
| 157 | + * fields are optional. |
| 158 | + * |
| 159 | + * The value is self-reported by the server and is not verified by the |
| 160 | + * protocol. It is intended for display, logging, and debugging. Clients |
| 161 | + * SHOULD NOT use it to change their behavior, and SHOULD NOT rely on it for |
| 162 | + * security decisions. |
| 163 | + */ |
| 164 | + 'io.modelcontextprotocol/serverInfo'?: Implementation; |
| 165 | +} |
| 166 | + |
136 | 167 | /** |
137 | 168 | * A progress token, used to associate progress notifications with the original request. |
138 | 169 | * |
@@ -197,7 +228,7 @@ export type ResultType = 'complete' | 'input_required' | string; |
197 | 228 | * @category Common Types |
198 | 229 | */ |
199 | 230 | export interface Result { |
200 | | - _meta?: MetaObject; |
| 231 | + _meta?: ResultMetaObject; |
201 | 232 | /** |
202 | 233 | * Indicates the type of the result, which allows the client to determine |
203 | 234 | * how to parse the result object. |
@@ -650,10 +681,6 @@ export interface DiscoverResult extends CacheableResult { |
650 | 681 | * The capabilities of the server. |
651 | 682 | */ |
652 | 683 | capabilities: ServerCapabilities; |
653 | | - /** |
654 | | - * Information about the server software implementation. |
655 | | - */ |
656 | | - serverInfo: Implementation; |
657 | 684 | /** |
658 | 685 | * Natural-language guidance describing the server and its features. |
659 | 686 | * |
@@ -1284,13 +1311,13 @@ export interface SubscriptionsListenRequest extends JSONRPCRequest { |
1284 | 1311 | } |
1285 | 1312 |
|
1286 | 1313 | /** |
1287 | | - * Extends {@link MetaObject} with the subscription-stream identifier carried by a |
| 1314 | + * Extends {@link ResultMetaObject} with the subscription-stream identifier carried by a |
1288 | 1315 | * {@link SubscriptionsListenResult}. All key naming rules from `MetaObject` apply. |
1289 | 1316 | * |
1290 | 1317 | * @see {@link MetaObject} for key naming rules and reserved prefixes. |
1291 | 1318 | * @category `subscriptions/listen` |
1292 | 1319 | */ |
1293 | | -export interface SubscriptionsListenResultMeta extends MetaObject { |
| 1320 | +export interface SubscriptionsListenResultMeta extends ResultMetaObject { |
1294 | 1321 | /** |
1295 | 1322 | * Identifies the subscription stream this response closes, so the client can |
1296 | 1323 | * correlate it with the originating subscription — mirroring the same key on |
@@ -1333,10 +1360,16 @@ export interface SubscriptionsAcknowledgedNotificationParams extends Notificatio |
1333 | 1360 | } |
1334 | 1361 |
|
1335 | 1362 | /** |
1336 | | - * Sent by the server as the first message on a |
1337 | | - * {@link SubscriptionsListenRequest | subscriptions/listen} stream to acknowledge |
1338 | | - * that the subscription has been established and to report which notification |
1339 | | - * types it agreed to honor. |
| 1363 | + * Sent by the server to acknowledge that a |
| 1364 | + * {@link SubscriptionsListenRequest | subscriptions/listen} subscription has been |
| 1365 | + * established and to report which notification types it agreed to honor. |
| 1366 | + * |
| 1367 | + * This notification MUST be the first message the server sends carrying the |
| 1368 | + * subscription's ID in `io.modelcontextprotocol/subscriptionId`. The server MUST |
| 1369 | + * NOT send any notification on the subscription before acknowledging it. On |
| 1370 | + * stdio, where every subscription shares one channel, this ordering is defined |
| 1371 | + * per subscription ID and not per channel: messages belonging to other |
| 1372 | + * subscriptions MAY be interleaved before it. |
1340 | 1373 | * |
1341 | 1374 | * @example Listen acknowledged |
1342 | 1375 | * {@includeCode ./examples/SubscriptionsAcknowledgedNotification/listen-acknowledged.json} |
|
0 commit comments