Skip to content

Commit e47d2d8

Browse files
Merge pull request modelcontextprotocol#8 from modelcontextprotocol/justin/resource-names
Add 'name' to resources
2 parents d06853c + 2ba0c81 commit e47d2d8

File tree

2 files changed

+15
-1
lines changed

2 files changed

+15
-1
lines changed

schema/schema.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1110,13 +1110,18 @@
11101110
"description": "The MIME type of this resource, if known.",
11111111
"type": "string"
11121112
},
1113+
"name": {
1114+
"description": "An optional human-readable name for this resource.\n\nThis can be used by clients to populate UI elements.",
1115+
"type": "string"
1116+
},
11131117
"uri": {
11141118
"description": "The URI of this resource.",
11151119
"format": "uri",
11161120
"type": "string"
11171121
}
11181122
},
11191123
"required": [
1124+
"name",
11201125
"uri"
11211126
],
11221127
"type": "object"
@@ -1204,6 +1209,7 @@
12041209
}
12051210
},
12061211
"required": [
1212+
"name",
12071213
"uriTemplate"
12081214
],
12091215
"type": "object"

schema/schema.ts

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -331,6 +331,14 @@ export interface Resource {
331331
* @format uri
332332
*/
333333
uri: string;
334+
335+
/**
336+
* An optional human-readable name for this resource.
337+
*
338+
* This can be used by clients to populate UI elements.
339+
*/
340+
name: string;
341+
334342
/**
335343
* The MIME type of this resource, if known.
336344
*/
@@ -350,7 +358,7 @@ export interface ResourceTemplate {
350358
/**
351359
* A human-readable name for the type of resource this template refers to.
352360
*/
353-
name?: string;
361+
name: string;
354362
/**
355363
* A human-readable description of what this template is for.
356364
*/

0 commit comments

Comments
 (0)