Skip to content

Commit e5d3133

Browse files
committed
fix: include previously-resolved variables in completions request
1 parent 1e17e0a commit e5d3133

File tree

2 files changed

+17
-5
lines changed

2 files changed

+17
-5
lines changed

schema/draft/schema.json

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -342,6 +342,13 @@
342342
"$ref": "#/definitions/ResourceReference"
343343
}
344344
]
345+
},
346+
"resolved": {
347+
"additionalProperties": {
348+
"type": "string"
349+
},
350+
"description": "Previously-resolved variables in a URI template. The keys of the object\nare be the template's variable expressions including surrounding braces.",
351+
"type": "object"
345352
}
346353
},
347354
"required": [
@@ -2279,7 +2286,7 @@
22792286
"type": "string"
22802287
},
22812288
"outputSchema": {
2282-
"description": "An optional JSON Schema object defining the structure of the tool's output returned in \nthe structuredContent field of a CallToolResult.",
2289+
"description": "An optional JSON Schema object defining the structure of the tool's output returned in\nthe structuredContent field of a CallToolResult.",
22832290
"properties": {
22842291
"properties": {
22852292
"additionalProperties": {

schema/draft/schema.ts

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -705,7 +705,7 @@ export interface CallToolResult extends Result {
705705
* Whether the tool call ended in an error.
706706
*
707707
* If not set, this is assumed to be false (the call was successful).
708-
*
708+
*
709709
* Any errors that originate from the tool SHOULD be reported inside the result
710710
* object, with `isError` set to true, _not_ as an MCP protocol-level error
711711
* response. Otherwise, the LLM would not be able to see that an error occurred
@@ -816,7 +816,7 @@ export interface Tool {
816816
};
817817

818818
/**
819-
* An optional JSON Schema object defining the structure of the tool's output returned in
819+
* An optional JSON Schema object defining the structure of the tool's output returned in
820820
* the structuredContent field of a CallToolResult.
821821
*/
822822
outputSchema?: {
@@ -1131,6 +1131,11 @@ export interface CompleteRequest extends Request {
11311131
*/
11321132
value: string;
11331133
};
1134+
1135+
/**
1136+
* Previously-resolved variables in a URI template.
1137+
*/
1138+
resolved?: { [key: string]: string };
11341139
};
11351140
}
11361141

@@ -1258,7 +1263,7 @@ export interface ElicitRequest extends Request {
12581263
* Restricted schema definitions that only allow primitive types
12591264
* without nested objects or arrays.
12601265
*/
1261-
export type PrimitiveSchemaDefinition =
1266+
export type PrimitiveSchemaDefinition =
12621267
| StringSchema
12631268
| NumberSchema
12641269
| BooleanSchema
@@ -1307,7 +1312,7 @@ export interface ElicitResult extends Result {
13071312
* - "cancel": User dismissed without making an explicit choice
13081313
*/
13091314
action: "accept" | "decline" | "cancel";
1310-
1315+
13111316
/**
13121317
* The submitted form data, only present when action is "accept".
13131318
* Contains values matching the requested schema.

0 commit comments

Comments
 (0)