Skip to content

Conversation

@pushpak1300
Copy link
Member

@pushpak1300 pushpak1300 commented Nov 18, 2025

The Text and Blob content classes were including name and title fields in their toResource() output, which are not part of the MCP specification for resource contents.

Changes

  • Removed name and title from Text::toResource() in src/Server/Content/Text.php
  • Removed name and title from Blob::toResource() in src/Server/Content/Blob.php
  • Updated all affected test expectations to match the corrected schema

According to the https://modelcontextprotocol.io/specification/2025-06-18/schema#textresourcecontents:

TextResourceContents should only include:

  • uri (required)
  • mimeType (optional)
  • text (required)
  • _meta (optional)

BlobResourceContents should only include:

  • uri (required)
  • mimeType (optional)
  • blob (required)
  • _meta (optional)

The name and title fields belong to the resource descriptor itself, not the content payload.

@pushpak1300 pushpak1300 marked this pull request as ready for review November 18, 2025 10:47
@taylorotwell taylorotwell merged commit 0b86fb6 into main Nov 18, 2025
18 checks passed
@taylorotwell taylorotwell deleted the fix/resource_schema branch November 18, 2025 14:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants