Skip to content

Commit de98257

Browse files
author
Abhimanyu Siwach
committed
make requestedSchema required
1 parent 68d32f2 commit de98257

File tree

3 files changed

+18
-9
lines changed

3 files changed

+18
-9
lines changed

docs/specification/draft/client/elicitation.mdx

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,15 @@ To request information from a user, servers send an `elicitation/create` request
6161
"id": 1,
6262
"method": "elicitation/create",
6363
"params": {
64-
"message": "Please provide your GitHub username"
64+
"message": "Please provide your GitHub username",
65+
"requestedSchema": {
66+
"type": "object",
67+
"properties": {
68+
"name": {
69+
"type": "string",
70+
},
71+
},
72+
}
6573
}
6674
}
6775
```
@@ -74,7 +82,7 @@ To request information from a user, servers send an `elicitation/create` request
7482
"id": 1,
7583
"result": {
7684
"content": {
77-
"username": "octocat"
85+
"name": "octocat"
7886
}
7987
}
8088
}
@@ -91,7 +99,7 @@ To request information from a user, servers send an `elicitation/create` request
9199
"method": "elicitation/create",
92100
"params": {
93101
"message": "Please provide your contact information",
94-
"requestSchema": {
102+
"requestedSchema": {
95103
"type": "object",
96104
"properties": {
97105
"name": {
@@ -154,10 +162,10 @@ sequenceDiagram
154162

155163
## Request Schema
156164

157-
The `requestSchema` field allows servers to define the structure of the expected response using JSON Schema. This follows the same pattern as the `inputSchema` field in the Tool interface:
165+
The `requestedSchema` field allows servers to define the structure of the expected response using JSON Schema. This follows the same pattern as the `inputSchema` field in the Tool interface:
158166

159167
```json
160-
"requestSchema": {
168+
"requestedSchema": {
161169
"type": "object",
162170
"properties": {
163171
"propertyName": {
@@ -238,6 +246,6 @@ Example when validation fails:
238246
1. Clients **SHOULD** implement user approval controls
239247
2. Both parties **SHOULD** validate elicitation content against the provided schema
240248
3. Clients **SHOULD** provide clear indication of which server is requesting information
241-
4. Clients **SHOULD** allow users to cancel elicitation requests at any time
249+
4. Clients **SHOULD** allow users to reject elicitation requests at any time
242250
5. Clients **SHOULD** implement rate limiting
243251
6. Both parties **MUST** handle sensitive data appropriately

schema/draft/schema.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -489,7 +489,7 @@
489489
"description": "The message to present to the user.",
490490
"type": "string"
491491
},
492-
"requestSchema": {
492+
"requestedSchema": {
493493
"description": "A JSON Schema object defining the expected structure of the response.\nThis follows the same pattern as the inputSchema in Tool interface.",
494494
"properties": {
495495
"properties": {
@@ -518,7 +518,8 @@
518518
}
519519
},
520520
"required": [
521-
"message"
521+
"message",
522+
"requestedSchema"
522523
],
523524
"type": "object"
524525
}

schema/draft/schema.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1227,7 +1227,7 @@ export interface ElicitRequest extends Request {
12271227
* A JSON Schema object defining the expected structure of the response.
12281228
* This follows the same pattern as the inputSchema in Tool interface.
12291229
*/
1230-
requestSchema?: {
1230+
requestedSchema: {
12311231
type: "object";
12321232
properties?: { [key: string]: object };
12331233
required?: string[];

0 commit comments

Comments
 (0)