Skip to content

fixes metadata for listed resources from resource templates so that they favor their own metadata #574

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

carlpeaslee
Copy link

@carlpeaslee carlpeaslee commented May 30, 2025

This updates the way metadata is assigned to resources that are defined by the list property of a ResourceTemplate so that they favor their own metadata over that of the ResourceTemplate.

Motivation and Context

#573

How Has This Been Tested?

Here is some code:
https://github.com/loopwork-ai/test-mcp/blob/e8219285e8758cf42ffda2a3950bc879d75c8e92/src/index.ts#L247-L289

Before (broken):
image

After (fixed):

image

Breaking Changes

This shouldn't result in breaking changes unless a listed resource was misconfigured and relying on inheriting the correct metadata from the ResourceTemplate.

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

@carlpeaslee carlpeaslee changed the title updates listed resources from resource templates to favor their own metadata fixes metadata use for listed resources from resource templates so that they favor their own metadata May 30, 2025
@carlpeaslee carlpeaslee changed the title fixes metadata use for listed resources from resource templates so that they favor their own metadata fixes metadata for listed resources from resource templates so that they favor their own metadata May 30, 2025
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.

1 participant