You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/rfds/elicitation.mdx
+11-8Lines changed: 11 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -357,8 +357,10 @@ The agent sends an `elicitation/create` request when it needs information from t
357
357
"id": 43,
358
358
"method": "elicitation/create",
359
359
"params": {
360
-
"sessionId": "...",
361
-
"toolCallId": "tc_123",
360
+
"scope": {
361
+
"sessionId": "...",
362
+
"toolCallId": "tc_123"
363
+
},
362
364
"mode": "form",
363
365
"message": "How would you like me to approach this refactoring?",
364
366
"requestedSchema": {
@@ -397,13 +399,12 @@ The agent sends an `elicitation/create` request when it needs information from t
397
399
}
398
400
```
399
401
400
-
`sessionId`, `requestId`, and `toolCallId` are all optional. Elicitation supports three scoping variants:
402
+
The optional `scope` field determines what context the elicitation is tied to. Elicitation supports two scoping variants:
401
403
402
-
-**Session elicitation**: `sessionId` is set — tied to a specific session.
403
-
-**Tool call elicitation**: `sessionId` and `toolCallId` are both set — tied to a specific tool call within a session. This is useful when an agent receives an elicitation request from an MCP server during a tool call and needs to redirect it to the user.
404
-
-**Request elicitation**: `requestId` is set — tied to a specific JSON-RPC request outside of a session (e.g., auth/configuration phases before any session is started).
404
+
-**Session scope**: `scope.sessionId` is set — tied to a specific session. Optionally includes `scope.toolCallId` when tied to a specific tool call within that session (e.g., when an agent receives an elicitation from an MCP server during a tool call and needs to redirect it to the user).
405
+
-**Request scope**: `scope.requestId` is set — tied to a specific JSON-RPC request outside of a session (e.g., auth/configuration phases before any session is started).
405
406
406
-
An elicitation may also be sent without any of these fields, in which case it is standalone and not tied to any specific scope.
407
+
When `scope` is omitted entirely, the elicitation is standalone and not tied to any specific context.
407
408
408
409
**Request-scoped example:**
409
410
@@ -413,7 +414,9 @@ An elicitation may also be sent without any of these fields, in which case it is
413
414
"id": 45,
414
415
"method": "elicitation/create",
415
416
"params": {
416
-
"requestId": 12,
417
+
"scope": {
418
+
"requestId": 12
419
+
},
417
420
"mode": "form",
418
421
"message": "Please provide your workspace name to continue setup.",
Copy file name to clipboardExpand all lines: schema/schema.unstable.json
+51-25Lines changed: 51 additions & 25 deletions
Original file line number
Diff line number
Diff line change
@@ -1694,38 +1694,16 @@
1694
1694
"description": "A human-readable message describing what input is needed.",
1695
1695
"type": "string"
1696
1696
},
1697
-
"requestId": {
1698
-
"anyOf": [
1699
-
{
1700
-
"$ref": "#/$defs/RequestId"
1701
-
},
1702
-
{
1703
-
"type": "null"
1704
-
}
1705
-
],
1706
-
"description": "Optional request ID if this elicitation is tied to a specific request."
1707
-
},
1708
-
"sessionId": {
1709
-
"anyOf": [
1710
-
{
1711
-
"$ref": "#/$defs/SessionId"
1712
-
},
1713
-
{
1714
-
"type": "null"
1715
-
}
1716
-
],
1717
-
"description": "Optional session ID if this elicitation is tied to a specific session."
1718
-
},
1719
-
"toolCallId": {
1697
+
"scope": {
1720
1698
"anyOf": [
1721
1699
{
1722
-
"$ref": "#/$defs/ToolCallId"
1700
+
"$ref": "#/$defs/ElicitationScope"
1723
1701
},
1724
1702
{
1725
1703
"type": "null"
1726
1704
}
1727
1705
],
1728
-
"description": "Optional tool call ID if this elicitation is tied to a specific tool call.\nWhen present, `sessionId` should also be set."
1706
+
"description": "Optional scope for this elicitation.\nWhen absent, the elicitation is standalone and not tied to any specific context."
1729
1707
}
1730
1708
},
1731
1709
"required": ["message"],
@@ -2307,6 +2285,54 @@
2307
2285
}
2308
2286
]
2309
2287
},
2288
+
"ElicitationScope": {
2289
+
"anyOf": [
2290
+
{
2291
+
"description": "Tied to a session, optionally to a specific tool call within that session.\n\nWhen `tool_call_id` is set, the elicitation is tied to a specific tool call.\nThis is useful when an agent receives an elicitation from an MCP server\nduring a tool call and needs to redirect it to the user.",
2292
+
"properties": {
2293
+
"sessionId": {
2294
+
"allOf": [
2295
+
{
2296
+
"$ref": "#/$defs/SessionId"
2297
+
}
2298
+
],
2299
+
"description": "The session this elicitation is tied to."
2300
+
},
2301
+
"toolCallId": {
2302
+
"anyOf": [
2303
+
{
2304
+
"$ref": "#/$defs/ToolCallId"
2305
+
},
2306
+
{
2307
+
"type": "null"
2308
+
}
2309
+
],
2310
+
"description": "Optional tool call within the session."
2311
+
}
2312
+
},
2313
+
"required": ["sessionId"],
2314
+
"title": "Session",
2315
+
"type": "object"
2316
+
},
2317
+
{
2318
+
"description": "Tied to a specific JSON-RPC request outside of a session\n(e.g., during auth/configuration phases before any session is started).",
2319
+
"properties": {
2320
+
"requestId": {
2321
+
"allOf": [
2322
+
{
2323
+
"$ref": "#/$defs/RequestId"
2324
+
}
2325
+
],
2326
+
"description": "The request this elicitation is tied to."
2327
+
}
2328
+
},
2329
+
"required": ["requestId"],
2330
+
"title": "Request",
2331
+
"type": "object"
2332
+
}
2333
+
],
2334
+
"description": "**UNSTABLE**\n\nThis capability is not part of the spec yet, and may be removed or changed at any point.\n\nThe scope of an elicitation request, determining what context it's tied to."
2335
+
},
2310
2336
"ElicitationStringType": {
2311
2337
"description": "Items definition for untitled multi-select enum properties.",
0 commit comments