Repository navigation
Python: Verify MCP Skills resource content - #10597
Draft
Jose Alvarez (jpalvarezl) wants to merge 1 commit into
Draft
Jose Alvarez (jpalvarezl) wants to merge 1 commit into
Jose Alvarez (jpalvarezl) wants to merge 1 commit into
Conversation
Contributor
Code coverage overviewLanguages: Python Python / code-coverage/python
View coverage of the 2 most impacted files.
ℹ️ Calculations represent line coverage. Results may change as calculations are updated. |
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation & Context
MCP Skills discovery needs to verify the server-provided resources before exposing them to an agent. This layer builds on the opt-in SDK integration, listed-skill runtime, and bounded catalog discovery in the earlier stack layers.
Description & Review Guide
What are the major changes? Verify extension-listed resource URIs and single text/binary content blocks; enforce per-skill resource and byte budgets; verify declared sizes and SHA-256 digests; and compare the complete
SKILL.mdfrontmatter with the listed descriptor, including URI aliases. Dynamic manifests use synchronized accounting, and failed verification does not publish verified content or consume the budget. Add regression tests and update core guidance.What is the impact of these changes? Extension-listed skills default to 512 resources and 16 MiB per skill, including
SKILL.md; callers may override these positive limits. Limits apply after the SDK receives each response, not at the transport boundary. Verification failures propagate rather than falling back to the legacy index. Legacy index and archive behavior is unchanged. Listed skills remain bound to their originating client, cached responses are revalidated, private cache isolation is preserved, and server-providedallowed-toolsdoes not grant permissions. A matching digest verifies consistency, not server trust.With an existing connected client, the prior call remains valid with the new defaults; callers can instead set tighter limits:
The agreed approach is extension-only verification with configurable resource limits. From
python\, these targeted checks passed:A full build and the complete unit-test suite were not run. The commit used
--no-verifybecause the existingpoe-checkhook reformats unrelated lines in_mcp.pyandsecurity.py; the changed Python files were checked separately with Ruff.What do you want reviewers to focus on? The frontmatter comparison, alias handling, resource accounting under concurrent reads, and revalidation of cached responses.
Related Issue
Fixes #9582
This is layer 4 of a dependent stack, not a competing implementation: SDK foundation, listed-skill runtime, and catalog paging are the preceding layers. The issue currently has neither a
ready-for-implementationlabel nor an on-issue maintainer agreement comment.AI Assistance
AI assistance details: Copilot assisted with implementation, tests, documentation, and this description. Human review and acceptance have not yet been confirmed for this draft.
Contribution Checklist
breaking changelabel (or add "[BREAKING]" to the title prefix, before or after any language prefix) — a workflow keeps the label and title prefix in sync automatically.