Skip to content

Expose MCP resource discovery controls to AI clients - #4817

Merged
Widthdom merged 1 commit into
mainfrom
codex/audit-mcp-ai-guidance
Jul 26, 2026
Merged

Expose MCP resource discovery controls to AI clients#4817
Widthdom merged 1 commit into
mainfrom
codex/audit-mcp-ai-guidance

Conversation

@Widthdom

Copy link
Copy Markdown
Owner

Summary

  • Teach MCP initialize.instructions how to use exact-path resource templates, filtered resources/list discovery, cursor continuation, and bounded resources/read calls.
  • Publish the accepted resources/list extension parameters, bounds, generated-file default, and cursor semantics under result._meta.discovery_contract.
  • Add regression coverage, bilingual user/developer documentation, and a bilingual changelog fragment.

Why

resources/list supports useful non-standard parameters (path, lang, includeGenerated, and maxBytes), but protocol methods do not expose a tool-style input schema. AI clients therefore had to guess that these controls existed even though the implementation and documentation already supported them.

This change makes the current resource-discovery contract discoverable in-band without changing existing request behavior.

Impact

AI clients can now choose exact-path reads or bounded repository browsing directly from the MCP handshake and response metadata. Pagination remains opaque and bound to both the index generation and the canonical filters.

Serializer audit

The separately reported trimmed-release tools/list failure involving missing System.String JsonTypeInfo metadata was already tracked as #178 and fixed by #1066. That fix is included in the v1.40.1 tag, and its existing serializer-fallback regression test passes in both target frameworks. No duplicate serializer change is included here.

Validation

@Widthdom
Widthdom marked this pull request as ready for review July 26, 2026 06:11
@Widthdom
Widthdom merged commit 4fdac3e into main Jul 26, 2026
12 checks passed
@Widthdom
Widthdom deleted the codex/audit-mcp-ai-guidance branch July 26, 2026 06:37
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