Skip to content

Commit 6e57f6b

Browse files
fix(SEP-2322): Break resultType extension requirement into two clauses
Co-authored-by: Caitie McCaffrey <caitiem20@github.com>
1 parent 1773aa5 commit 6e57f6b

2 files changed

Lines changed: 9 additions & 2 deletions

File tree

docs/specification/draft/basic/index.mdx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,8 @@ can use to determine how to parse and handle the `result` object.
7979

8080
- A `resultType` of `"complete"` indicates the request completed successfully and the result contains the final content.
8181
- A `resultType` of `"input_required"` indicates the request is incomplete and more information is needed to process the request. The result contains an `InputRequiredResult` object with additional information needed.
82-
- A `resultType` of any value unrecognized by the client **MUST** be considered invalid. This field is open to extension.
82+
- Extensions MAY add additional `ResultType` values. The set of supported `ResultTypes` MUST be created from the set defined in the core protocol and include any additional values of supported extensions that are advertised via capabilities.
83+
-A `resultType` of any value unrecognized by the client **MUST** be considered invalid.
8384
- For backward compatibility with servers implementing earlier protocol versions, which do not include `resultType`, clients **MUST** treat an absent `resultType` as `"complete"`.
8485

8586
#### Error Responses

seps/2322-MRTR.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -320,7 +320,13 @@ export interface InputResponseRequestParams extends RequestParams {
320320
}
321321
```
322322

323-
Since this change creates a polymorphic response for method calls like 'tools/call', we are introducing a new field to `Result` which indicate the `ResultType`. The client should parse this field to determine the type of the Result contained in the message, treating unrecognized values as invalid protocol responses. The `ResultType` is open for extensions to introduce additional values. If this field is not provided the Client should assume a `ResultType` of "complete" for backwards compatibility. The schema change will look like this:
323+
Since this change creates a polymorphic response for method calls like 'tools/call', we are introducing a new field to `Result` which indicate the `ResultType`. The client should parse this field to determine the type of the Result contained in the message. If this field is not provided the Client should assume a `ResultType` of "complete" for backwards compatibility. If this field is not provided the Client should assume a `ResultType` of "complete" for backwards compatibility.
324+
325+
Extensions MAY add additional `ResultType` values. The set of supported `ResultTypes` MUST be created from the set defined in the core protocol and include any additional values of supported extensions that are advertised via capabilities.
326+
327+
The Client SHOULD treat unrecognized values as invalid protocol responses.
328+
329+
The schema change will look like this:
324330

325331
```typescript
326332
/**

0 commit comments

Comments
 (0)