Skip to content

Commit 75e6c2b

Browse files
committed
Flatten ids again
1 parent 3f658d2 commit 75e6c2b

5 files changed

Lines changed: 282 additions & 233 deletions

File tree

docs/protocol/draft/schema.mdx

Lines changed: 53 additions & 66 deletions
Original file line numberDiff line numberDiff line change
@@ -1340,7 +1340,7 @@ A boolean value (`type: "boolean"`).
13401340
</Expandable>
13411341
</ResponseField>
13421342

1343-
<ResponseField name="Object" type="object">
1343+
<ResponseField name="value_id" type="object">
13441344
A `SessionConfigValueId` string value.
13451345

13461346
This is the default when `type` is absent on the wire. Unknown `type`
@@ -1554,8 +1554,7 @@ Request from the agent to elicit structured user input.
15541554

15551555
The agent sends this to the client to request information from the user,
15561556
either via a form or by directing them to a URL.
1557-
Elicitations may be tied to a session, request, or tool call,
1558-
or sent without a specific scope.
1557+
Elicitations are tied to a session (optionally a tool call) or a request.
15591558

15601559
**Type:** Union
15611560

@@ -1572,9 +1571,57 @@ See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/exte
15721571
<ResponseField name="message" type={"string"} required>
15731572
A human-readable message describing what input is needed.
15741573
</ResponseField>
1575-
<ResponseField name="scope" type={<><span><a href="#elicitationscope">ElicitationScope</a></span><span> | null</span></>} >
1576-
Optional scope for this elicitation.
1577-
When absent, the elicitation is standalone and not tied to any specific context.
1574+
1575+
**One of:**
1576+
1577+
<ResponseField name="Session" type="object">
1578+
Tied to a session, optionally to a specific tool call within that session.
1579+
1580+
When `tool_call_id` is set, the elicitation is tied to a specific tool call.
1581+
This is useful when an agent receives an elicitation from an MCP server
1582+
during a tool call and needs to redirect it to the user.
1583+
1584+
<Expandable title="Properties">
1585+
1586+
<ResponseField
1587+
name="sessionId"
1588+
type={<a href="#sessionid">SessionId</a>}
1589+
required
1590+
>
1591+
The session this elicitation is tied to.
1592+
</ResponseField>
1593+
<ResponseField
1594+
name="toolCallId"
1595+
type={
1596+
<>
1597+
<span>
1598+
<a href="#toolcallid">ToolCallId</a>
1599+
</span>
1600+
<span> | null</span>
1601+
</>
1602+
}
1603+
>
1604+
Optional tool call within the session.
1605+
</ResponseField>
1606+
1607+
</Expandable>
1608+
</ResponseField>
1609+
1610+
<ResponseField name="Request" type="object">
1611+
Tied to a specific JSON-RPC request outside of a session
1612+
(e.g., during auth/configuration phases before any session is started).
1613+
1614+
<Expandable title="Properties">
1615+
1616+
<ResponseField
1617+
name="requestId"
1618+
type={<a href="#requestid">RequestId</a>}
1619+
required
1620+
>
1621+
The request this elicitation is tied to.
1622+
</ResponseField>
1623+
1624+
</Expandable>
15781625
</ResponseField>
15791626

15801627
**Variants:**
@@ -3549,66 +3596,6 @@ Type discriminator for elicitation schemas.
35493596
Object schema type.
35503597
</ResponseField>
35513598

3552-
## <span class="font-mono">ElicitationScope</span>
3553-
3554-
**UNSTABLE**
3555-
3556-
This capability is not part of the spec yet, and may be removed or changed at any point.
3557-
3558-
The scope of an elicitation request, determining what context it's tied to.
3559-
3560-
**Type:** Union
3561-
3562-
<ResponseField name="Object" type="object">
3563-
Tied to a session, optionally to a specific tool call within that session.
3564-
3565-
When `tool_call_id` is set, the elicitation is tied to a specific tool call.
3566-
This is useful when an agent receives an elicitation from an MCP server
3567-
during a tool call and needs to redirect it to the user.
3568-
3569-
<Expandable title="Properties">
3570-
3571-
<ResponseField
3572-
name="sessionId"
3573-
type={<a href="#sessionid">SessionId</a>}
3574-
required
3575-
>
3576-
The session this elicitation is tied to.
3577-
</ResponseField>
3578-
<ResponseField
3579-
name="toolCallId"
3580-
type={
3581-
<>
3582-
<span>
3583-
<a href="#toolcallid">ToolCallId</a>
3584-
</span>
3585-
<span> | null</span>
3586-
</>
3587-
}
3588-
>
3589-
Optional tool call within the session.
3590-
</ResponseField>
3591-
3592-
</Expandable>
3593-
</ResponseField>
3594-
3595-
<ResponseField name="Object" type="object">
3596-
Tied to a specific JSON-RPC request outside of a session
3597-
(e.g., during auth/configuration phases before any session is started).
3598-
3599-
<Expandable title="Properties">
3600-
3601-
<ResponseField
3602-
name="requestId"
3603-
type={<a href="#requestid">RequestId</a>}
3604-
required
3605-
>
3606-
The request this elicitation is tied to.
3607-
</ResponseField>
3608-
3609-
</Expandable>
3610-
</ResponseField>
3611-
36123599
## <span class="font-mono">ElicitationStringType</span>
36133600

36143601
Items definition for untitled multi-select enum properties.

docs/rfds/elicitation.mdx

Lines changed: 7 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -357,10 +357,8 @@ The agent sends an `elicitation/create` request when it needs information from t
357357
"id": 43,
358358
"method": "elicitation/create",
359359
"params": {
360-
"scope": {
361-
"sessionId": "...",
362-
"toolCallId": "tc_123"
363-
},
360+
"sessionId": "...",
361+
"toolCallId": "tc_123",
364362
"mode": "form",
365363
"message": "How would you like me to approach this refactoring?",
366364
"requestedSchema": {
@@ -391,6 +389,7 @@ The agent sends an `elicitation/create` request when it needs information from t
391389
"id": 44,
392390
"method": "elicitation/create",
393391
"params": {
392+
"requestId": 12,
394393
"mode": "url",
395394
"elicitationId": "github-oauth-001",
396395
"url": "https://agent.example.com/connect?elicitationId=github-oauth-001",
@@ -399,12 +398,10 @@ The agent sends an `elicitation/create` request when it needs information from t
399398
}
400399
```
401400

402-
The optional `scope` field determines what context the elicitation is tied to. Elicitation supports two scoping variants:
403-
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).
401+
The scope fields are flattened at the top level of the request. Elicitation supports two scoping variants:
406402

407-
When `scope` is omitted entirely, the elicitation is standalone and not tied to any specific context.
403+
- **Session scope**: `sessionId` is set — tied to a specific session. Optionally includes `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).
404+
- **Request 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).
408405

409406
**Request-scoped example:**
410407

@@ -414,9 +411,7 @@ When `scope` is omitted entirely, the elicitation is standalone and not tied to
414411
"id": 45,
415412
"method": "elicitation/create",
416413
"params": {
417-
"scope": {
418-
"requestId": 12
419-
},
414+
"requestId": 12,
420415
"mode": "form",
421416
"message": "Please provide your workspace name to continue setup.",
422417
"requestedSchema": {

schema/schema.unstable.json

Lines changed: 46 additions & 60 deletions
Original file line numberDiff line numberDiff line change
@@ -1646,7 +1646,52 @@
16461646
"type": "object"
16471647
},
16481648
"CreateElicitationRequest": {
1649-
"description": "**UNSTABLE**\n\nThis capability is not part of the spec yet, and may be removed or changed at any point.\n\nRequest from the agent to elicit structured user input.\n\nThe agent sends this to the client to request information from the user,\neither via a form or by directing them to a URL.\nElicitations may be tied to a session, request, or tool call,\nor sent without a specific scope.",
1649+
"anyOf": [
1650+
{
1651+
"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.",
1652+
"properties": {
1653+
"sessionId": {
1654+
"allOf": [
1655+
{
1656+
"$ref": "#/$defs/SessionId"
1657+
}
1658+
],
1659+
"description": "The session this elicitation is tied to."
1660+
},
1661+
"toolCallId": {
1662+
"anyOf": [
1663+
{
1664+
"$ref": "#/$defs/ToolCallId"
1665+
},
1666+
{
1667+
"type": "null"
1668+
}
1669+
],
1670+
"description": "Optional tool call within the session."
1671+
}
1672+
},
1673+
"required": ["sessionId"],
1674+
"title": "Session",
1675+
"type": "object"
1676+
},
1677+
{
1678+
"description": "Tied to a specific JSON-RPC request outside of a session\n(e.g., during auth/configuration phases before any session is started).",
1679+
"properties": {
1680+
"requestId": {
1681+
"allOf": [
1682+
{
1683+
"$ref": "#/$defs/RequestId"
1684+
}
1685+
],
1686+
"description": "The request this elicitation is tied to."
1687+
}
1688+
},
1689+
"required": ["requestId"],
1690+
"title": "Request",
1691+
"type": "object"
1692+
}
1693+
],
1694+
"description": "**UNSTABLE**\n\nThis capability is not part of the spec yet, and may be removed or changed at any point.\n\nRequest from the agent to elicit structured user input.\n\nThe agent sends this to the client to request information from the user,\neither via a form or by directing them to a URL.\nElicitations are tied to a session (optionally a tool call) or a request.",
16501695
"discriminator": {
16511696
"propertyName": "mode"
16521697
},
@@ -1693,17 +1738,6 @@
16931738
"message": {
16941739
"description": "A human-readable message describing what input is needed.",
16951740
"type": "string"
1696-
},
1697-
"scope": {
1698-
"anyOf": [
1699-
{
1700-
"$ref": "#/$defs/ElicitationScope"
1701-
},
1702-
{
1703-
"type": "null"
1704-
}
1705-
],
1706-
"description": "Optional scope for this elicitation.\nWhen absent, the elicitation is standalone and not tied to any specific context."
17071741
}
17081742
},
17091743
"required": ["message"],
@@ -2285,54 +2319,6 @@
22852319
}
22862320
]
22872321
},
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-
},
23362322
"ElicitationStringType": {
23372323
"description": "Items definition for untitled multi-select enum properties.",
23382324
"oneOf": [

0 commit comments

Comments
 (0)