-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Description
Describe the bug
https://github.com/modelcontextprotocol/modelcontextprotocol/blob/d262272c506d71adc56ae5ea07823d966f1a6df7/docs/specification/2025-06-18/server/resources.mdx#data-types suggests the resource contents contain a name/title property. But I do not see anything in the specification's schema that suggests name/title are valid on a resource contents:
modelcontextprotocol/schema/2025-06-18/schema.ts
Lines 582 to 614 in 1462ac7
| export interface ResourceContents { | |
| /** | |
| * The URI of this resource. | |
| * | |
| * @format uri | |
| */ | |
| uri: string; | |
| /** | |
| * The MIME type of this resource, if known. | |
| */ | |
| mimeType?: string; | |
| /** | |
| * See [General fields: `_meta`](/specification/2025-06-18/basic/index#meta) for notes on `_meta` usage. | |
| */ | |
| _meta?: { [key: string]: unknown }; | |
| } | |
| export interface TextResourceContents extends ResourceContents { | |
| /** | |
| * The text of the item. This must only be set if the item can actually be represented as text (not binary data). | |
| */ | |
| text: string; | |
| } | |
| export interface BlobResourceContents extends ResourceContents { | |
| /** | |
| * A base64-encoded string representing the binary data of the item. | |
| * | |
| * @format byte | |
| */ | |
| blob: string; | |
| } |
modelcontextprotocol/schema/2025-06-18/schema.json
Lines 77 to 98 in 1462ac7
| "BlobResourceContents": { | |
| "properties": { | |
| "_meta": { | |
| "additionalProperties": {}, | |
| "description": "See [General fields: `_meta`](/specification/2025-06-18/basic/index#meta) for notes on `_meta` usage.", | |
| "type": "object" | |
| }, | |
| "blob": { | |
| "description": "A base64-encoded string representing the binary data of the item.", | |
| "format": "byte", | |
| "type": "string" | |
| }, | |
| "mimeType": { | |
| "description": "The MIME type of this resource, if known.", | |
| "type": "string" | |
| }, | |
| "uri": { | |
| "description": "The URI of this resource.", | |
| "format": "uri", | |
| "type": "string" | |
| } | |
| }, |
nor on a ReadResourceResult:
modelcontextprotocol/schema/2025-06-18/schema.ts
Lines 440 to 442 in 1462ac7
| export interface ReadResourceResult extends Result { | |
| contents: (TextResourceContents | BlobResourceContents)[]; | |
| } |
modelcontextprotocol/schema/2025-06-18/schema.ts
Lines 59 to 65 in 1462ac7
| export interface Result { | |
| /** | |
| * See [General fields: `_meta`](/specification/2025-06-18/basic/index#meta) for notes on `_meta` usage. | |
| */ | |
| _meta?: { [key: string]: unknown }; | |
| [key: string]: unknown; | |
| } |
modelcontextprotocol/schema/2025-06-18/schema.json
Lines 1697 to 1718 in 1462ac7
| "ReadResourceResult": { | |
| "description": "The server's response to a resources/read request from the client.", | |
| "properties": { | |
| "_meta": { | |
| "additionalProperties": {}, | |
| "description": "See [General fields: `_meta`](/specification/2025-06-18/basic/index#meta) for notes on `_meta` usage.", | |
| "type": "object" | |
| }, | |
| "contents": { | |
| "items": { | |
| "anyOf": [ | |
| { | |
| "$ref": "#/definitions/TextResourceContents" | |
| }, | |
| { | |
| "$ref": "#/definitions/BlobResourceContents" | |
| } | |
| ] | |
| }, | |
| "type": "array" | |
| } | |
| }, |
To Reproduce
Look at the docs.
Expected behavior
The docs are consistent with the schema.
Logs
n/a
Additional context
n/a