Add Mcp Content Ladder
tasks26/26
1. Contract and response shape
- 1.1 Implement the fixed
read_record_fieldinput schema fromdesign.md, including selector exclusivity and bound checks. - 1.2 Implement the fixed
read_record_fieldoutput schema fromdesign.md, and configure MCP output-schema validation forstructuredContent. - 1.3 Add
content_laddermetadata tosearch,query_records, andfetchfor resource-backed fields. - 1.4 Implement URL-safe record and field resource handles for
pdpp://record/{handle}andpdpp://field-window/{handle}. - 1.5 Update MCP server instructions without repeating long connector or recovery prose.
2. Adapter implementation
- 2.1 Add the bounded field-window read tool and route reads through existing grant-enforced resource-server APIs.
- 2.2 Add record and field MCP resource templates and
resources/readhandlers. - 2.3 Add
resource_linkblocks to tool results where the MCP SDK supports them. - 2.4 Update
search,query_records, andfetchformatting to expose the content ladder without requiring prose parsing. - 2.5 Keep binary/blob fields metadata-only by default, with resource/export handles rather than large base64 text.
3. Resource-server substrate
- 3.1 Prove resource-server APIs can return bounded text windows.
- 3.2 Add the resource-server field-window endpoint when existing APIs cannot satisfy the bounded-read contract.
- 3.3 Preserve grant enforcement for stream, field, time-range, resource, and connection constraints on window/resource reads.
- 3.4 Add SQLite and Postgres conformance tests for the field-window substrate.
4. Compatibility and regression coverage
- 4.3 Add structured-content-aware client assertions that follow
content_laddermetadata without parsing prose. - 4.4 Add resource-aware client simulation that follows
resource_linkURIs throughresources/read. - 4.5 Add full tests for invalid selector combinations, default bounds, max bounds, out-of-grant reads, malformed handles, stale cursors, and binary fields.
- 4.6 Add regression coverage that no adapter-owned opaque-only marker is emitted as the sole path to long content.
- 4.7 Extend existing token-budget tests so the new ladder does not regress default
tools/list, search, query, or fetch budgets. - 4.8 Add a
resources/listindependence test: aresource_linkreturned by a tool is readable even when it is not listed byresources/list.
5. Documentation and closeout
- 5.1 Update MCP package documentation with content-ladder examples and client compatibility notes.
- 5.2 Add a concise compatibility matrix for Codex, Claude Code/Desktop, Gemini CLI, Hermes, opencode, Cursor, ChatGPT, and Claude app surfaces where evidence exists.
- 5.3 Run
openspec validate add-mcp-content-ladder --strict. - 5.4 Run the MCP server test suite and targeted compatibility simulations.
- 5.5 Record MCP spec version details for tool-result, resource-link, output-schema, and resource-read semantics.
- 5.6 Record live-client smoke gaps as residual risks rather than claiming unsupported client behavior.