Skip to content

Commit 248e4bc

Browse files
authored
Merge pull request modelcontextprotocol#710 from mbleigh/meta-on-resources
feat: Adds _meta to additional interface types.
2 parents 8719898 + 21f6ec1 commit 248e4bc

File tree

2 files changed

+120
-0
lines changed

2 files changed

+120
-0
lines changed

schema/draft/schema.json

Lines changed: 69 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

schema/draft/schema.ts

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ export interface Request {
3030
* If specified, the caller is requesting out-of-band progress notifications for this request (as represented by notifications/progress). The value of this parameter is an opaque token that will be attached to any subsequent notifications. The receiver is not obligated to provide these notifications.
3131
*/
3232
progressToken?: ProgressToken;
33+
[key: string]: unknown;
3334
};
3435
[key: string]: unknown;
3536
};
@@ -484,6 +485,11 @@ export interface Resource extends BaseMetadata {
484485
* This can be used by Hosts to display file sizes and estimate context window usage.
485486
*/
486487
size?: number;
488+
489+
/**
490+
* Reserved field for additional metadata.
491+
*/
492+
_meta?: { [key: string]: unknown };
487493
}
488494

489495
/**
@@ -513,6 +519,11 @@ export interface ResourceTemplate extends BaseMetadata {
513519
* Optional annotations for the client.
514520
*/
515521
annotations?: Annotations;
522+
523+
/**
524+
* Reserved field for additional metadata.
525+
*/
526+
_meta?: { [key: string]: unknown };
516527
}
517528

518529
/**
@@ -529,6 +540,11 @@ export interface ResourceContents {
529540
* The MIME type of this resource, if known.
530541
*/
531542
mimeType?: string;
543+
544+
/**
545+
* Reserved field for additional metadata.
546+
*/
547+
_meta?: { [key: string]: unknown };
532548
}
533549

534550
export interface TextResourceContents extends ResourceContents {
@@ -602,6 +618,11 @@ export interface Prompt extends BaseMetadata {
602618
* A list of arguments to use for templating the prompt.
603619
*/
604620
arguments?: PromptArgument[];
621+
622+
/**
623+
* Reserved field for additional metadata.
624+
*/
625+
_meta?: { [key: string]: unknown };
605626
}
606627

607628
/**
@@ -657,6 +678,11 @@ export interface EmbeddedResource {
657678
* Optional annotations for the client.
658679
*/
659680
annotations?: Annotations;
681+
682+
/**
683+
* Reserved field for additional metadata.
684+
*/
685+
_meta?: { [key: string]: unknown };
660686
}
661687
/**
662688
* An optional notification from the server to the client, informing it that the list of prompts it offers has changed. This may be issued by servers without any previous subscription from the client.
@@ -819,6 +845,11 @@ export interface Tool extends BaseMetadata {
819845
* Display name precedence order is: title, annotations.title, then name.
820846
*/
821847
annotations?: ToolAnnotations;
848+
849+
/**
850+
* Reserved field for additional metadata.
851+
*/
852+
_meta?: { [key: string]: unknown };
822853
}
823854

824855
/* Logging */
@@ -988,6 +1019,11 @@ export interface TextContent {
9881019
* Optional annotations for the client.
9891020
*/
9901021
annotations?: Annotations;
1022+
1023+
/**
1024+
* Reserved field for additional metadata.
1025+
*/
1026+
_meta?: { [key: string]: unknown };
9911027
}
9921028

9931029
/**
@@ -1012,6 +1048,11 @@ export interface ImageContent {
10121048
* Optional annotations for the client.
10131049
*/
10141050
annotations?: Annotations;
1051+
1052+
/**
1053+
* Reserved field for additional metadata.
1054+
*/
1055+
_meta?: { [key: string]: unknown };
10151056
}
10161057

10171058
/**
@@ -1036,6 +1077,11 @@ export interface AudioContent {
10361077
* Optional annotations for the client.
10371078
*/
10381079
annotations?: Annotations;
1080+
1081+
/**
1082+
* Reserved field for additional metadata.
1083+
*/
1084+
_meta?: { [key: string]: unknown };
10391085
}
10401086

10411087
/**
@@ -1233,6 +1279,11 @@ export interface Root {
12331279
* referencing the root in other parts of the application.
12341280
*/
12351281
name?: string;
1282+
1283+
/**
1284+
* Reserved field for additional metadata.
1285+
*/
1286+
_meta?: { [key: string]: unknown };
12361287
}
12371288

12381289
/**

0 commit comments

Comments
 (0)