Skip to content

docs: fix elicitation example to use requestedSchema - #2978

Merged
dsp-ant merged 1 commit into
modelcontextprotocol:mainfrom
FenjuFu:docs/fix-elicitation-requestedschema
Jun 25, 2026
Merged

dsp-ant merged 1 commit into
modelcontextprotocol:mainfrom
FenjuFu:docs/fix-elicitation-requestedschema

Conversation

@FenjuFu

@FenjuFu FenjuFu commented Jun 25, 2026

Copy link
Copy Markdown
Contributor

What

Fixes the elicitation request example in docs/docs/learn/client-concepts.mdx.
The example used a schema field:

{
  method: "elicitation/create",
  params: {
    message: "...",
    schema: { ... }   // ❌
  }
}

but the canonical field name is requestedSchema. This matches:

  • schema/draft/schema.ts / schema/2025-06-18/schema.ts (ElicitRequest.params.requestedSchema)
  • schema/draft/examples/ElicitRequest/elicitation-request.json
  • the specification page docs/specification/2025-06-18/client/elicitation.mdx

Why

A reader copying the learn-page example would send params.schema, which a
spec-compliant client ignores (it reads params.requestedSchema), so the
elicitation form would be empty. The fix aligns the learn doc with the spec.

Change

One-line field rename schema: → requestedSchema: in the elicitation
components example. No other content changed.

The learn/client-concepts elicitation/create example used 'schema', but the
specification and JSON schema define the field as 'requestedSchema'.

Signed-off-by: FenjuFu <[email protected]>
@FenjuFu
FenjuFu requested review from a team as code owners June 25, 2026 12:08
@github-actions github-actions Bot added the documentation Improvements or additions to documentation label Jun 25, 2026

@dsp-ant dsp-ant left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Good catch. Thank you

@dsp-ant
dsp-ant merged commit 2867f4c into modelcontextprotocol:main Jun 25, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants