Skip to content

Commit 970851e

Browse files
pcarletonclaude
andauthored
Make mode in elicitation backwards compatible (modelcontextprotocol#1863)
* Make mode in elicitation backwards compatible * Make mode optional in ElicitRequestFormParams for backwards compatibility For backwards compatibility with servers that don't include the mode field in form-based elicitation requests, mode is now optional and defaults to 'form'. This aligns with the spec language stating that an empty elicitation capability object is equivalent to declaring support for form mode only. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]> * Update elicitation docs to reflect optional mode field Clarify that servers MAY omit the mode field for form mode elicitation requests, and clients MUST treat such requests as form mode. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]> --------- Co-authored-by: Claude <[email protected]>
1 parent f874264 commit 970851e

File tree

4 files changed

+9
-8
lines changed

4 files changed

+9
-8
lines changed

docs/specification/draft/client/elicitation.mdx

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -79,21 +79,23 @@ To request information from a user, servers send an `elicitation/create` request
7979

8080
All elicitation requests **MUST** include the following parameters:
8181

82-
| Name | Type | Options | Description |
83-
| --------- | ------ | ------------- | ------------------------------------------------------------------ |
84-
| `mode` | string | `form`, `url` | The mode of the elicitation. |
85-
| `message` | string | | A human-readable message explaining why the interaction is needed. |
82+
| Name | Type | Options | Description |
83+
| --------- | ------ | ------------- | -------------------------------------------------------------------------------------- |
84+
| `mode` | string | `form`, `url` | The mode of the elicitation. Optional for form mode (defaults to `"form"` if omitted). |
85+
| `message` | string | | A human-readable message explaining why the interaction is needed. |
8686

8787
The `mode` parameter specifies the type of elicitation:
8888

8989
- `"form"`: In-band structured data collection with optional schema validation. Data is exposed to the client.
9090
- `"url"`: Out-of-band interaction via URL navigation. Data (other than the URL itself) is **not** exposed to the client.
9191

92+
For backwards compatibility, servers **MAY** omit the `mode` field for form mode elicitation requests. Clients **MUST** treat requests without a `mode` field as form mode.
93+
9294
### Form Mode Elicitation Requests
9395

9496
Form mode elicitation allows servers to collect structured data directly through the MCP client.
9597

96-
Form mode elicitation requests **MUST** specify `mode: "form"` and include these additional parameters:
98+
Form mode elicitation requests **MUST** either specify `mode: "form"` or omit the `mode` field, and include these additional parameters:
9799

98100
| Name | Type | Description |
99101
| ----------------- | ------ | -------------------------------------------------------------- |

0 commit comments

Comments
 (0)