What this thread does
Do first: in Node.js, apply defaults to the reviewed form content explicitly, validate the resulting object, and pass that same object to accept().
What changed
- issue #2953, opened October 27, reports the TypeScript v2 helper behavior at revision
652eb1e:validate(params, {})can return{ valid: true }for a required field with a default, while the caller's object remains empty. - PR #2954 proposes rejecting missing required fields before parsing. It is open; neither its patch changeset nor the published changelog establishes a first fixed client version. Record
npm ls @mcp-use/clientwhen comparing behavior.
Do first: separate schema, reviewed content and response
1. Inspect params.requestedSchema in your form handler. A minimal request carries the default inside the property schema:
{
"mode": "form",
"message": "Choose a priority",
"requestedSchema": {
"type": "object",
"properties": {
"priority": {
"type": "integer",
"minimum": 0,
"maximum": 2,
"default": 1
}
},
"required": ["priority"]
}
}
The MCP 2026-07-28 specification describes this as a starting value for clients that support defaults. It is not already submitted content or proof that the user accepted it.
2. Pre-populate your form, allow the user to review it, and retain the resulting content object. The mcp-use client guide lists separate helpers for defaults, validation, acceptance, decline and cancellation. 3. For an ordinary form whose user has accepted its displayed values, use the following normalization sequence. Here params is the form request above; reviewedContent is the object returned by your UI:
import { accept, applyDefaults, validate } from "@mcp-use/client";
const content = applyDefaults(params, reviewedContent);
const result = validate(params, content);
// If result.valid is false, show validation feedback and do not accept.
if (result.valid) {
const response = accept(content);
// Return response from the elicitation callback.
}
The explicit helper order is the workaround documented in #2953 and #2954. Do not validate a normalized temporary value and then submit the earlier object.
4. Inspect both directions. With no override and an accepted default, the response content should contain priority: 1; an explicit priority: 0 must stay zero. Include a boolean case to distinguish false from absence. The proposed regression cases explicitly cover zero/false and optional fields. 5. If you intentionally want to accept defaults directly, the documented call is acceptWithDefaults(params). Choose that only when this matches the interaction you intend; the helper itself does not create a review UI. Client helpers, protocol review requirement.
Diagnostic: validate(params, {}) returns { valid: true }
In the reported implementation, Zod inserts defaults into its parsed result, but validate() discards that parsed data. Calling accept({}) afterward therefore sends an empty object. The issue says the SDK's JSON Schema validator rejects the same missing required content. This is a distinction between successful parsing and the object actually submitted. Issue #2953.
What the client receives
The form client receives the message and requestedSchema, including any default properties. It chooses how to display the form and constructs a result such as {"action":"accept","content":{"priority":1}}. Under MCP 2026-07-28, the elicitation request is embedded in InputRequiredResult.inputRequests, and its response is carried in inputResponses on the retried call. The server guide uses acceptedContent() to validate the accepted response on that round.
Defaults do not turn decline or cancel into acceptance. Treat URL mode separately: its acceptance result carries no form content. Protocol response actions.
Evidence
notoufa reported the mismatch on October 27, 2026, at 652eb1e and proposed the focused correction in PR #2954.
Limits
The regression concerns the TypeScript v2 helper API at the named revision; it is not evidence about every mcp-use release or host's form rendering. Not for: Vercel AI SDK input-required continuation and client-version selection; see that client-version thread.
Started from a post by @notoufa, packaged by the editor. Original post