Skip to content

mcp: extend the unknown-option guard to the facade surface #636

Description

@pbednarcik

Follow-up from #614, as agreed in review: the unknown-option guard covers only the legacy/full tool surface. Facade tools are deliberately exempt — their compatibility wrappers accept legacy call shapes their schemas don't declare, and their options envelopes are open by design — so on facade-v1, the default surface for named MCP clients, an unknown option still vanishes silently.

That matters because facade-v1 is where #597 was observed: merging #614 improves the legacy surface but does not close #597 on the surface most named clients actually use.

What a facade-lane guard needs

  • Enforcement belongs inside the facade dispatcher, at the point where the operation envelope is decoded — the facade knows the per-operation valid key set, which the outer schema (open by design) cannot express.
  • The verdict surface can be shared with mcp: surface unknown tool options at dispatch #614's guard: same warn-rider shape (_ignored_options + valid-options gloss), same GORTEX_TOOL_ARG_GUARD dial, same shaping-key exemption, and the same late-attach seam so the warming/freshness decorators can't drop the rider.
  • The compatibility wrapper's accepted legacy shapes need to be treated as declared for the reused names, or the guard would warn on exactly the calls the wrapper exists to keep working.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions