fix(mcp): stop advertising complete Evidence in input examples (#1560)
Hosts forward every tool's input schema to the model on each request. Seventeen tools advertised a canonical example that embedded a complete producer Evidence record, up to 22 KB each, accounting for 116 KB of the 450 KB of advertised input schemas. Advertised examples now show an embedded Evidence record as its exact retained-evidence reference when the canonical input accepts one, and omit an example that can only carry inline Evidence. Canonical contract examples, their executable tests, and validation are unchanged. Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
2d426c924c
commit
a53689c55d
+10
-1
@@ -26,7 +26,16 @@ health transition leaves that catalog unchanged and does not emit
|
||||
Advertised input and output schemas contain no reachable recursive references.
|
||||
Schemas share repeated definitions through schema-local references while
|
||||
preserving complete nested fields and validation rules. Input properties retain
|
||||
their descriptions and literal examples. Root object unions are presented as
|
||||
their descriptions and literal examples.
|
||||
|
||||
Hosts forward input schemas to the model with every request, so advertised
|
||||
examples never copy complete producer Evidence. An embedded Evidence record is
|
||||
shown as its exact `{"kind":"retained-evidence","evidence_id":"ev_..."}`
|
||||
reference where the tool accepts one. An example that can only carry inline
|
||||
Evidence stays in the canonical contract and its executable tests, but is not
|
||||
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.
|
||||
|
||||
Reference in New Issue
Block a user