Skip to content

Commit 9a4738a

Browse files
Merge pull request modelcontextprotocol#11 from modelcontextprotocol/justin/resource-descriptions
Add description to Resource
2 parents e47d2d8 + 6d00174 commit 9a4738a

File tree

2 files changed

+23
-5
lines changed

2 files changed

+23
-5
lines changed

schema/schema.json

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1106,12 +1106,16 @@
11061106
"Resource": {
11071107
"description": "A known resource that the server is capable of reading.",
11081108
"properties": {
1109+
"description": {
1110+
"description": "A description of what this resource represents.\n\nThis 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.",
1111+
"type": "string"
1112+
},
11091113
"mimeType": {
11101114
"description": "The MIME type of this resource, if known.",
11111115
"type": "string"
11121116
},
11131117
"name": {
1114-
"description": "An optional human-readable name for this resource.\n\nThis can be used by clients to populate UI elements.",
1118+
"description": "A human-readable name for this resource.\n\nThis can be used by clients to populate UI elements.",
11151119
"type": "string"
11161120
},
11171121
"uri": {
@@ -1191,15 +1195,15 @@
11911195
"description": "A template description for resources available on the server.",
11921196
"properties": {
11931197
"description": {
1194-
"description": "A human-readable description of what this template is for.",
1198+
"description": "A description of what this template is for.\n\nThis 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.",
11951199
"type": "string"
11961200
},
11971201
"mimeType": {
11981202
"description": "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.",
11991203
"type": "string"
12001204
},
12011205
"name": {
1202-
"description": "A human-readable name for the type of resource this template refers to.",
1206+
"description": "A human-readable name for the type of resource this template refers to.\n\nThis can be used by clients to populate UI elements.",
12031207
"type": "string"
12041208
},
12051209
"uriTemplate": {

schema/schema.ts

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -333,12 +333,19 @@ export interface Resource {
333333
uri: string;
334334

335335
/**
336-
* An optional human-readable name for this resource.
336+
* A human-readable name for this resource.
337337
*
338338
* This can be used by clients to populate UI elements.
339339
*/
340340
name: string;
341341

342+
/**
343+
* A description of what this resource represents.
344+
*
345+
* 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.
346+
*/
347+
description?: string;
348+
342349
/**
343350
* The MIME type of this resource, if known.
344351
*/
@@ -355,14 +362,21 @@ export interface ResourceTemplate {
355362
* @format uri-template
356363
*/
357364
uriTemplate: string;
365+
358366
/**
359367
* A human-readable name for the type of resource this template refers to.
368+
*
369+
* This can be used by clients to populate UI elements.
360370
*/
361371
name: string;
372+
362373
/**
363-
* A human-readable description of what this template is for.
374+
* A description of what this template is for.
375+
*
376+
* 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.
364377
*/
365378
description?: string;
379+
366380
/**
367381
* 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.
368382
*/

0 commit comments

Comments
 (0)