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
To begin listening for task status notifications, clients send a `subscriptions/listen` request to the server including a list of task IDs the client is interested in (see [SEP-2575](https://github.com/modelcontextprotocol/modelcontextprotocol/pull/2575)):
* Subscribe to notifications/tasks/status for specific task IDs.
534
+
*/
535
+
tasksStatus?:string[];
536
+
// Other existing fields...
537
+
};
538
+
};
539
+
}
540
+
```
541
+
542
+
If a client requests task status notifications but does not declare the `io.modelcontextprotocol/tasks` extension capability, the server **MUST** return a JSON-RPC error specifying the missing capabilities:
543
+
544
+
```jsonl
545
+
{
546
+
"jsonrpc": "2.0",
547
+
"id": 12,
548
+
"error": {
549
+
// MISSING_REQUIRED_CLIENT_CAPABILITY
550
+
"code": -32003,
551
+
// Message provided for example purposes only. The content of this example message is non-normative.
552
+
"message": "Missing required client capability",
553
+
"data": {
554
+
"requiredCapabilities": {
555
+
"extensions": {
556
+
"io.modelcontextprotocol/tasks": {}
557
+
}
558
+
}
559
+
}
560
+
}
561
+
}
562
+
```
563
+
510
564
Each notification carries a complete `DetailedTask` for the current status, identical to what `tasks/get` would have returned at that moment.
511
565
512
566
**Notification:**
@@ -539,8 +593,6 @@ The notification includes the full task object, allowing clients to access the c
539
593
540
594
Clients **MUST NOT** rely on receiving this notification, and **SHOULD** continue to poll via `tasks/get` to ensure they receive status updates.
541
595
542
-
In the Streamable HTTP transport, if a server sends this notification, it **MUST** send it on an SSE stream associated with a `tasks/get` request.
543
-
544
596
### Streamable HTTP: Routing Headers
545
597
546
598
When `tasks/get`, `tasks/update`, or `tasks/cancel` is sent over the Streamable HTTP transport, the client **MUST** set the `Mcp-Name` header (defined by [SEP-2243](./2243-http-standardization.md)) to the value of `params.taskId`. This allows transport intermediaries and load balancers to route subsequent requests for the same task to the server instance holding its state, which is typically required for correctness. The `Mcp-Method` header is set to the JSON-RPC method name per [SEP-2243](./2243-http-standardization.md).
0 commit comments