Repository navigation
fix(mcp): drop placeholder arguments the tool schema would reject - #1568
TheGreatAxios merged 1 commit into
Conversation
|
No live evidence yet that this helps. The tests cover the code path: the e2e test replays the recorded The 2026-10-24 stack session that looked like evidence isn't. Its What does fail without it: A live pass needs a run on a build with this change where the model sends |
TheGreatAxios
left a comment
There was a problem hiding this comment.
Fleet review verdict: REQUEST CHANGES
PR: #1568 — fix(mcp): strip empty placeholder arguments before forwarding (CL-11344)
Convergence: swarm → defect / quality / solve convergence → defect lens converged request-changes (must-fix).
Blocker — must fix (confirmed)
Optional string arguments that are empty / whitespace-only are stripped as placeholders without consulting property-schema constraints (e.g. minLength). Legitimate optional empty strings that the schema permits are dropped before forwarding.
- Confirmed at PR head via temporary test: an optional string with
minLength: 0was still stripped.
Follow-up — should fix (confirmed)
stripPlaceholderArguments throws on null / undefined arguments; surfaced via handler catch.
Required change to merge
Consult property schema constraints (minLength / pattern / enum / const) before treating an empty string as a placeholder.
Why it matters
Post-fix, schema-permitted values are dropped — the fix over-applies.
Verification status
- Unit + hermetic e2e strip proofs green; live model E2E outstanding.
c4b9f64 to
d10a8fd
Compare
|
Consult the property schema before treating an empty value as a placeholder (fixed).
|
|
Resolved findings at
|
TheGreatAxios
left a comment
There was a problem hiding this comment.
Re-reviewed at d10a8fd. Empty strings are stripped only when the schema rejects them, and null or undefined arguments no longer throw. Approving.
|
Triage: Pass No changes needed from you. A maintainer will review this pull request. |
Summary
""(minLengthof 1 or more, anenumorconstwithout"", apatternthat""does not match, or a non-stringtype); an empty array underminItemsof 1 or more or a non-arraytype; andnullwhere the schema does not allow it. ForanyOfandoneOf, a value is dropped only when every branch rejects it. Some models fill every optional field with placeholders, and a server rejects the ones its schema forbids (for example Linear'slist_issueswithcustomView: " "failsminLength: 1).0,false, andnullon a property that allows it. A missing or non-object arguments value is passed through without throwing. The cleanup runs for every provider; it changes nothing for a model that omits optional fields.Verification
bun run checkpasses (lint, typecheck, dead exports, build, 9465 tests)minLength: 0, whitespace againstminLength: 1,enum,const,pattern(including one that does not compile),minItems, nullable and non-nullablenull, composite schemas, and null or undefined argumentsmcp__linear__list_issuescall recorded from gpt-5.6-terra and asserts the fake Linear client receives every recorded argument exceptcustomViewPart of CL-11344