Skip to content

SEP-3119: Structured resource and embedded resource update - #3119

Open
tobiasBora wants to merge 1 commit into
modelcontextprotocol:mainfrom
tobiasBora:main
Open

SEP-3119: Structured resource and embedded resource update#3119
tobiasBora wants to merge 1 commit into
modelcontextprotocol:mainfrom
tobiasBora:main

Conversation

@tobiasBora

Copy link
Copy Markdown

Motivation and Context

As pointed in #611, many applications (e.g. robotics…) need to have events to allow the client to get notified when its environment changes (I also need it to allow clients to get notified when the user modifies a file/tab/state of my application…). Importantly:

  • the event content must be embedded inside the update event to avoid an extra round of reading + race conditions if the event is updated before the reading occurs.
  • the event may contain structured data linked with a schema to validate it. This was also asked in Enable structured inputs/outputs for Resources #956 and allow for an easier interaction with tools.

Instead of creating yet another kind of event, this PR improves resources to allow for embedded resources in the notification & structured resources. This way, one can receive an event with something like:

{
  "jsonrpc": "2.0",
  "method": "notifications/resources/updated",
  "params": {
    "_meta": {
      "io.modelcontextprotocol/subscriptionId": 1
    },
    "uri": "app://temperature",
    "contentSchema": "app://temperature_schema",
    "structuredContent": {"temperature": 35}
  }
}

The contentSchema points itself to a resource for efficiency reasons since a schema may be fairly large and cached locally.

Breaking Changes

This is in the draft, so not really breaking anything. And changes

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation update

Checklist

  • I have read the MCP Documentation
  • My code follows the repository's style guidelines
  • New and existing tests pass locally
  • I have added appropriate error handling
  • I have added or updated documentation as needed

Additional context

@localden localden changed the title Structured resource and embeded resource update (fix #956 and #611) SEP-3119: Structured resource and embedded resource update Jul 23, 2026
@localden localden added proposal SEP proposal without a sponsor. SEP labels Jul 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

proposal SEP proposal without a sponsor. SEP

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

2 participants