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
+17-17Lines changed: 17 additions & 17 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -97,7 +97,7 @@ Task-augmented requests follow a two-phase response pattern that differs from no
97
97
-**Normal requests**: The server processes the request and returns the actual operation result directly.
98
98
-**Task-augmented requests**: The server accepts the request and immediately returns a `CreateTaskResult` containing task metadata. The actual operation result becomes available later through `tasks/result` after the task completes.
99
99
100
-
To create a task, requestors send a request with the `modelcontextprotocol.io/task` key included in `_meta`. Requestors **MAY** include a `ttl` value representing how long from task creation the requestor would like the task to be retained for.
100
+
To create a task, requestors send a request with the `io.modelcontextprotocol/task` key included in `_meta`. Requestors **MAY** include a `ttl` value representing how long from task creation the requestor would like the task to be retained for.
101
101
102
102
**Request:**
103
103
@@ -112,7 +112,7 @@ To create a task, requestors send a request with the `modelcontextprotocol.io/ta
112
112
"city": "New York"
113
113
},
114
114
"_meta": {
115
-
"modelcontextprotocol.io/task": {
115
+
"io.modelcontextprotocol/task": {
116
116
"ttl": 60000
117
117
}
118
118
}
@@ -134,7 +134,7 @@ To create a task, requestors send a request with the `modelcontextprotocol.io/ta
134
134
"ttl": 60000,
135
135
"pollInterval": 5000,
136
136
"_meta": {
137
-
"modelcontextprotocol.io/related-task": {
137
+
"io.modelcontextprotocol/related-task": {
138
138
"taskId": "786512e2-9e0d-44bd-8f29-789f320fe840"
139
139
}
140
140
}
@@ -148,7 +148,7 @@ When a receiver accepts a task-augmented request, it returns a `CreateTaskResult
148
148
149
149
When a task is created in response to a `tools/call` request, host applications may wish to return control to the model while the task is executing. This allows the model to continue processing other requests or perform additional work while waiting for the task to complete.
150
150
151
-
To support this pattern, receivers can provide an optional `modelcontextprotocol.io/model-immediate-response` key in the `_meta` field of the `CreateTaskResult`. The value of this key should be a string intended to be passed as an immediate tool result to the model.
151
+
To support this pattern, receivers can provide an optional `io.modelcontextprotocol/model-immediate-response` key in the `_meta` field of the `CreateTaskResult`. The value of this key should be a string intended to be passed as an immediate tool result to the model.
152
152
153
153
This is a provisional field intended to account for this use case, which may be formalized as part of `CreateTaskResult` in future protocol versions.
154
154
@@ -185,7 +185,7 @@ To retrieve the state of a task, requestors send a `tasks/get` request:
185
185
"ttl": 30000,
186
186
"pollInterval": 5000,
187
187
"_meta": {
188
-
"modelcontextprotocol.io/related-task": {
188
+
"io.modelcontextprotocol/related-task": {
189
189
"taskId": "786512e2-9e0d-44bd-8f29-789f320fe840"
190
190
}
191
191
}
@@ -227,7 +227,7 @@ To retrieve the result of a completed task, requestors send a `tasks/result` req
227
227
],
228
228
"isError": false,
229
229
"_meta": {
230
-
"modelcontextprotocol.io/related-task": {
230
+
"io.modelcontextprotocol/related-task": {
231
231
"taskId": "786512e2-9e0d-44bd-8f29-789f320fe840"
232
232
}
233
233
}
@@ -253,7 +253,7 @@ When a receiver creates a task, it **MAY** send a `notifications/tasks/created`
253
253
"ttl": 60000,
254
254
"pollInterval": 5000,
255
255
"_meta": {
256
-
"modelcontextprotocol.io/related-task": {
256
+
"io.modelcontextprotocol/related-task": {
257
257
"taskId": "786512e2-9e0d-44bd-8f29-789f320fe840"
258
258
}
259
259
}
@@ -282,7 +282,7 @@ When a task's status changes, receivers **MAY** send a `notifications/tasks/stat
282
282
"ttl": 60000,
283
283
"pollInterval": 5000,
284
284
"_meta": {
285
-
"modelcontextprotocol.io/related-task": {
285
+
"io.modelcontextprotocol/related-task": {
286
286
"taskId": "786512e2-9e0d-44bd-8f29-789f320fe840"
287
287
}
288
288
}
@@ -369,7 +369,7 @@ To explicitly cancel a task, requestors send a `tasks/cancel` request.
369
369
"ttl": 30000,
370
370
"pollInterval": 5000,
371
371
"_meta": {
372
-
"modelcontextprotocol.io/related-task": {
372
+
"io.modelcontextprotocol/related-task": {
373
373
"taskId": "786512e2-9e0d-44bd-8f29-789f320fe840"
374
374
}
375
375
}
@@ -436,7 +436,7 @@ While this note is not prescriptive regarding the specific usage of SSE streams,
436
436
</Note>
437
437
438
438
1. When the task receiver has messages for the requestor that are necessary to complete the task, the receiver **SHOULD** move the task to the `input_required` status.
439
-
1. The receiver **MUST** include the `modelcontextprotocol.io/related-task` metadata in the request to associate it with the task.
439
+
1. The receiver **MUST** include the `io.modelcontextprotocol/related-task` metadata in the request to associate it with the task.
440
440
1. When the requestor encounters the `input_required` status, it **SHOULD** call `tasks/result` prematurely.
441
441
1. When the receiver receives all required input, the task **SHOULD** transition out of `input_required` status (typically back to `working`).
442
442
@@ -457,16 +457,16 @@ While this note is not prescriptive regarding the specific usage of SSE streams,
457
457
458
458
### Associating Task-Related Messages
459
459
460
-
1. All requests, notifications, and responses related to a task **MUST** include the `modelcontextprotocol.io/related-task` key in their `_meta`, with the value set to an object with a `taskId` matching the associated task ID.
460
+
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.
461
461
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.
462
-
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 `modelcontextprotocol.io/related-task` metadata in these requests, and receivers **MUST** ignore such metadata if present in favor of the RPC method parameter.
462
+
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.
463
463
464
464
### Task Notifications
465
465
466
466
1. Receivers **MAY** send a `notifications/tasks/created` notification after creating a task to inform the requestor that the task is ready for polling.
467
467
1. Receivers **MAY** send `notifications/tasks/status` notifications when a task's status changes.
468
468
1. Requestors **MUST NOT** rely on receiving either notification type, as they are both optional.
469
-
1. When sent, these notifications **MUST** include the `modelcontextprotocol.io/related-task` metadata as described in "Associating Task-Related Messages".
469
+
1. When sent, these notifications **MUST** include the `io.modelcontextprotocol/related-task` metadata as described in "Associating Task-Related Messages".
470
470
471
471
### Task Progress Notifications
472
472
@@ -674,11 +674,11 @@ Tasks can be in one of the following states:
674
674
675
675
### Task Metadata
676
676
677
-
When augmenting a request with task execution, the `modelcontextprotocol.io/task` key is included in `_meta`:
677
+
When augmenting a request with task execution, the `io.modelcontextprotocol/task` key is included in `_meta`:
678
678
679
679
```json
680
680
{
681
-
"modelcontextprotocol.io/task": {
681
+
"io.modelcontextprotocol/task": {
682
682
"ttl": 60000
683
683
}
684
684
}
@@ -690,11 +690,11 @@ Fields:
690
690
691
691
### Related Task Metadata
692
692
693
-
All requests, responses, and notifications associated with a task **MUST** include the `modelcontextprotocol.io/related-task` key in `_meta`:
693
+
All requests, responses, and notifications associated with a task **MUST** include the `io.modelcontextprotocol/related-task` key in `_meta`:
0 commit comments