Skip to content

Make the MCP language catalog filterable, pageable, and byte-bounded #4896

Description

@Widthdom

Summary

The MCP language catalog can force clients to receive the full catalog, while CLI supports direct lookup, limits, cursors, and byte budgets.

Audit IDs: G-18. Reproduced with locally built cdidx v1.40.3 at 404db09489c305f17d94f37026e00564d3ac527a.

Existing issue relationship

Follow-up to closed #4730's MCP pagination work.

Expected behavior and PR scope

Expose exact language/alias/extension filters and stable bounded pagination in the MCP tool schema/result. Keep language-count semantics in its separate issue.

Implementation guide for Codex 5.6 sol xhigh

  • Reuse the canonical catalog/filter logic and query-fingerprinted cursor rather than MCP-only rules.
  • Add limit/cursor/max-bytes and completion metadata to input/output schemas.
  • Bind cursor to filters/sort/catalog generation and return typed stale/mismatch errors.
  • Cover alias/extension lookup, ambiguous extension, empty/final pages, full enumeration, Unicode, and exact byte boundaries.
  • Add focused regression/contract tests, run the full net8.0 and net9.0 suite, and add the required bilingual changelog.d/unreleased/ fragment.

Acceptance criteria

  • Clients can fetch one language or enumerate the full catalog without gaps.
  • Pages remain deterministic under identical filters.
  • Responses stay within the advertised byte budget.

Metadata

Metadata

Assignees

No one assigned

    Labels

    .NETPull requests that update .NET codeenhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions