You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/specification/draft/basic/utilities/tasks.mdx
+6-12Lines changed: 6 additions & 12 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -184,12 +184,7 @@ To retrieve the state of a task, requestors send a `tasks/get` request:
184
184
"statusMessage": "The operation is now in progress.",
185
185
"createdAt": "2025-11-25T10:30:00Z",
186
186
"ttl": 30000,
187
-
"pollInterval": 5000,
188
-
"_meta": {
189
-
"io.modelcontextprotocol/related-task": {
190
-
"taskId": "786512e2-9e0d-44bd-8f29-789f320fe840"
191
-
}
192
-
}
187
+
"pollInterval": 5000
193
188
}
194
189
}
195
190
```
@@ -368,12 +363,7 @@ To explicitly cancel a task, requestors send a `tasks/cancel` request.
368
363
"statusMessage": "The task was cancelled by request.",
369
364
"createdAt": "2025-11-25T10:30:00Z",
370
365
"ttl": 30000,
371
-
"pollInterval": 5000,
372
-
"_meta": {
373
-
"io.modelcontextprotocol/related-task": {
374
-
"taskId": "786512e2-9e0d-44bd-8f29-789f320fe840"
375
-
}
376
-
}
366
+
"pollInterval": 5000
377
367
}
378
368
}
379
369
```
@@ -461,6 +451,7 @@ While this note is not prescriptive regarding the specific usage of SSE streams,
461
451
1. All requests, notifications, and responses related to a task **MUST** include the `io.modelcontextprotocol/related-task` key in their `_meta`, with the value set to an object with a `taskId` matching the associated task ID.
462
452
1. For example, an elicitation that a task-augmented tool call depends on **MUST** share the same related task ID with that tool call's task.
463
453
1. For the `tasks/get`, `tasks/list`, `tasks/result`, and `tasks/cancel` operations, the `taskId` parameter in the request **MUST** be used as the source of truth for identifying the target task. Requestors **SHOULD NOT** include `io.modelcontextprotocol/related-task` metadata in these requests, and receivers **MUST** ignore such metadata if present in favor of the RPC method parameter.
454
+
Similarly, for the `tasks/get`, `tasks/list`, and `tasks/cancel` operations, receivers **SHOULD NOT** include `io.modelcontextprotocol/related-task` metadata in the result messages, as the `taskId` is already present in the response structure.
464
455
465
456
### Task Notifications
466
457
@@ -705,6 +696,9 @@ All requests, responses, and notifications associated with a task **MUST** inclu
705
696
706
697
This associates messages with their originating task across the entire request lifecycle.
707
698
699
+
However, for the `tasks/get`, `tasks/list`, and `tasks/cancel` operations, requestors and receivers **SHOULD NOT** include this metadata in their messages, as the `taskId` is already present in the message structure.
700
+
The `tasks/result` operation **MUST** include this metadata in its response, as the result structure itself does not contain the task ID.
0 commit comments