chore: port ResultType fix (#4)

https://github.com/modelcontextprotocol/modelcontextprotocol/pull/2773
This commit is contained in:
Luca Chang 2026-05-28 13:02:59 -07:00 • committed by GitHub
commit 104a270d5f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 2 additions and 2 deletions

View file

@ -98,7 +98,7 @@ A request that is eligible for task-augmentation may return one of two distinct
```typescript
// "task" is introduced by this extension.
type ResultType = "complete" | "input_required" | "task";
type ResultType = "complete" | "input_required" | "task" | string;
```
Servers **MUST** set `resultType` to `"task"` when returning a `CreateTaskResult` so that clients can distinguish it from a standard result. Servers **MUST NOT** set `resultType` to `"task"` on result types other than `CreateTaskResult`.

View file

@ -122,7 +122,7 @@ A request that is eligible for task-augmentation may return one of two distinct
```typescript
// "task" is introduced by this extension.
type ResultType = "complete" | "input_required" | "task";
type ResultType = "complete" | "input_required" | "task" | string;
```
Servers **MUST** set `resultType` to `"task"` when returning a `CreateTaskResult` so that clients can distinguish it from a standard result. Servers **MUST NOT** set `resultType` to `"task"` on result types other than `CreateTaskResult`.