Skip to content

MCP INV-5: complete response-shape coverage — remaining read tools, write-tool outputs, error-path shapes #437

Description

@thewrz

Context

Follow-up to #403 / PR #434, which landed the INV-5 response-shape gate as a first slice: it validates the 6 seed-drivable read tools' success payloads against their mapped OpenAPI response schemas (reusing the REST validator), with an honest burn-down (INV5_READ_PENDING, 21 tools) and 3 documented shape exemptions (INV5_SHAPE_EXEMPT). CodeRabbit correctly noted the gate does not yet cover the full #403 ask.

Remaining coverage (burn-down)

  1. Remaining read tools — drive the 21 INV5_READ_PENDING tools once per-tool non-empty fixtures exist (each needs representative seeded entities). Move each from pending → driven as its fixture lands.
  2. Write/destructive tool response shapes — INV-4 pins write-tool request fields, but their response payloads are unvalidated. Add success-shape validation for write tools (needs stateful setup/teardown per tool).
  3. Error-path shapes — validate the { isError: true, content } failure envelope shape across tools (currently only success shapes are checked).
  4. Reconcile the 3 exemptionsget_spec, get_library_conventions, get_project_revision_nomenclature reshape vs their REST ops (inherited inside payload vs meta.inherited at envelope top level). Decide: align the MCP payloads to REST, or keep exempt with a documented rationale.

Gating

  • Each addition keeps the contract gate green and the completeness invariant honest (driven + exempt + pending must equal the full mapped set).
  • Update ADR-044 as coverage lands.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    Status
    Backlog

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions