Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 12 additions & 7 deletions docs/mcp-contracts.md
Original file line number Diff line number Diff line change
Expand Up @@ -664,10 +664,14 @@ advertised. Every advertised example is a distinct valid canonical input.

Root object unions are presented as
one object without root `anyOf`, `oneOf`, or `allOf` for model API compatibility.
The projection merges properties, retains shared required fields and
group-specific field dependencies, and describes the accepted input groups.
Canonical runtime validation enforces the exact union, including exclusions
that the advertised projection does not express. Tests validate the schemas
The projection merges properties, retains shared required fields, and
describes the accepted input groups. Which fields belong together is guidance
in that description rather than a `dependentRequired` or `dependencies`
keyword, because Gemini function declarations reject both and one unknown
keyword fails the client's whole tool catalog. Canonical runtime validation
enforces the exact union, including partner fields and exclusions that the
advertised projection does not express, so a client must not rely on the
advertised schema to reject an incomplete group. Tests validate the schemas
Comment on lines +672 to +674

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Correct the remaining incomplete-pair promise

Although this general paragraph was corrected, the fresh evidence is the unchanged “Comparison input shapes” paragraph at lines 697–700, which still promises that the advertised compare_web_captures schema rejects incomplete pairs. This commit's test at src/contracts/toolInputReferences.test.ts:350-363 now establishes that { before_scenario: 1, normalization: true } passes advertised validation while the canonical parser rejects it, so users following the concrete tool documentation can incorrectly assume the client schema will catch such calls; update that section to match the new server-side-only partner enforcement.

AGENTS.md reference: AGENTS.md:L25-L25

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in ea4cfc9. "Comparison input shapes" now says that mixed families, and normalization without both scenario captures, can pass advertised validation and are rejected by the SDK against the canonical schema. Incomplete pairs themselves are still rejected by the advertised schema, so that sentence stays.

after SDK conversion and check advertised validation and actual calls.
Individual model APIs can impose additional nesting limits; complete producer
captures can exceed ten structural levels.
Expand Down Expand Up @@ -768,9 +772,10 @@ identities remains unknown.
`normalization` defaults to `{ "rules": [] }`.

The advertised schema includes complete nested capture fields and rejects
incomplete pairs and structurally malformed captures. Mixed comparison families
can pass advertised validation; the SDK rejects them against the canonical
input schema before invoking the handler. Domain validation additionally checks
incomplete pairs and structurally malformed captures. Mixed comparison families,
and `normalization` without both scenario captures, can pass advertised
validation; the SDK rejects them against the canonical input schema before
invoking the handler. Domain validation additionally checks
relationships such as event sequence references and retained counts; JSON
Schema does not express those cross-field invariants.

Expand Down
Loading