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
+4-44Lines changed: 4 additions & 44 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -231,36 +231,6 @@ To retrieve the result of a completed task, requestors send a `tasks/result` req
231
231
}
232
232
```
233
233
234
-
### Task Creation Notification
235
-
236
-
When a receiver creates a task, it **MAY** send a `notifications/tasks/created` notification to inform the requestor that the task has been created and polling can begin. This notification includes the full task state.
237
-
238
-
**Notification:**
239
-
240
-
```json
241
-
{
242
-
"jsonrpc": "2.0",
243
-
"method": "notifications/tasks/created",
244
-
"params": {
245
-
"taskId": "786512e2-9e0d-44bd-8f29-789f320fe840",
246
-
"status": "working",
247
-
"statusMessage": "The operation is now in progress.",
248
-
"createdAt": "2025-11-25T10:30:00Z",
249
-
"ttl": 60000,
250
-
"pollInterval": 5000,
251
-
"_meta": {
252
-
"io.modelcontextprotocol/related-task": {
253
-
"taskId": "786512e2-9e0d-44bd-8f29-789f320fe840"
254
-
}
255
-
}
256
-
}
257
-
}
258
-
```
259
-
260
-
The notification includes the full `Task` object with all task metadata fields, allowing requestors to immediately access the task state without making an additional `tasks/get` request.
261
-
262
-
Requestors **MUST NOT** rely on receiving this notification. Requestors **SHOULD** be prepared to begin polling via `tasks/get` immediately after receiving the `CreateTaskResult` response, regardless of whether this notification is received.
263
-
264
234
### Task Status Notification
265
235
266
236
When a task's status changes, receivers **MAY** send a `notifications/tasks/status` notification to inform the requestor of the change. This notification includes the full task state.
@@ -276,19 +246,14 @@ When a task's status changes, receivers **MAY** send a `notifications/tasks/stat
276
246
"status": "completed",
277
247
"createdAt": "2025-11-25T10:30:00Z",
278
248
"ttl": 60000,
279
-
"pollInterval": 5000,
280
-
"_meta": {
281
-
"io.modelcontextprotocol/related-task": {
282
-
"taskId": "786512e2-9e0d-44bd-8f29-789f320fe840"
283
-
}
284
-
}
249
+
"pollInterval": 5000
285
250
}
286
251
}
287
252
```
288
253
289
254
The notification includes the full `Task` object with all task metadata fields, including the updated `status`, `statusMessage` (if present), and `error` (if the status is `failed`). This allows requestors to access the complete task state without making an additional `tasks/get` request.
290
255
291
-
Requestors **MUST NOT** rely on receiving these notifications, as they are optional. Receivers are not required to send status notifications and may choose to only send them for certain status transitions. Requestors **SHOULD** continue to poll via `tasks/get` to ensure they receive status updates.
256
+
Requestors **MUST NOT** rely on receiving this notifications, as it is optional. Receivers are not required to send status notifications and may choose to only send them for certain status transitions. Requestors **SHOULD** continue to poll via `tasks/get` to ensure they receive status updates.
292
257
293
258
### Listing Tasks
294
259
@@ -455,10 +420,9 @@ While this note is not prescriptive regarding the specific usage of SSE streams,
455
420
456
421
### Task Notifications
457
422
458
-
1. Receivers **MAY** send a `notifications/tasks/created` notification after creating a task to inform the requestor that the task is ready for polling.
459
423
1. Receivers **MAY** send `notifications/tasks/status` notifications when a task's status changes.
460
-
1. Requestors **MUST NOT** rely on receiving either notification type, as they are both optional.
461
-
1. When sent, these notifications**MUST** include the `io.modelcontextprotocol/related-task` metadata as described in "Associating Task-Related Messages".
424
+
1. Requestors **MUST NOT** rely on receiving the `notifications/tasks/status` notification, as it is optional.
425
+
1. When sent, the `notifications/tasks/status` notification **SHOULD NOT** include the `io.modelcontextprotocol/related-task` metadata, as the task ID is already present in the notification parameters.
0 commit comments