Skip to content

Conversation

@maxisbey
Copy link
Contributor

Motivation and Context

Backport of #1840 to the v1.x branch.

The current implementations of ChatGPT Apps and MCP Apps rely on Resource metadata. This adds the missing meta field support to the Python SDK's Resource and ResourceTemplate types.

Changes

Adds meta: dict[str, Any] | None field to:

  • Resource (base class)
  • ResourceTemplate
  • FunctionResource.from_function()
  • ReadResourceContents
  • FastMCP.resource() decorator

The metadata propagates through list operations (list_resources, list_resource_templates) and read responses via the _meta protocol field.

Breaking Changes

No

Cherry-pick of 0da9a07 (PR #1840).

Add meta field support to Resource, ResourceTemplate, FunctionResource,
and ReadResourceContents. The metadata is propagated through the decorator,
resource/template storage, list operations, and read responses via the
_meta protocol field.

Cherry-picked from 0da9a07 (PR #1840).
@maxisbey maxisbey force-pushed the backport/1840-resource-metadata branch from 72de62c to 7f4bdeb Compare January 22, 2026 13:28
@maxisbey maxisbey merged commit d891525 into v1.x Jan 22, 2026
19 checks passed
@maxisbey maxisbey deleted the backport/1840-resource-metadata branch January 22, 2026 14:02
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.

4 participants