Skip to content

Commit 66b9872

Browse files
committed
Switch to reverse-DNS metadata prefixes
1 parent 7da2b7f commit 66b9872

File tree

4 files changed

+23
-23
lines changed

4 files changed

+23
-23
lines changed

docs/specification/draft/basic/utilities/tasks.mdx

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ Task-augmented requests follow a two-phase response pattern that differs from no
9797
- **Normal requests**: The server processes the request and returns the actual operation result directly.
9898
- **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.
9999

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.
101101

102102
**Request:**
103103

@@ -112,7 +112,7 @@ To create a task, requestors send a request with the `modelcontextprotocol.io/ta
112112
"city": "New York"
113113
},
114114
"_meta": {
115-
"modelcontextprotocol.io/task": {
115+
"io.modelcontextprotocol/task": {
116116
"ttl": 60000
117117
}
118118
}
@@ -134,7 +134,7 @@ To create a task, requestors send a request with the `modelcontextprotocol.io/ta
134134
"ttl": 60000,
135135
"pollInterval": 5000,
136136
"_meta": {
137-
"modelcontextprotocol.io/related-task": {
137+
"io.modelcontextprotocol/related-task": {
138138
"taskId": "786512e2-9e0d-44bd-8f29-789f320fe840"
139139
}
140140
}
@@ -148,7 +148,7 @@ When a receiver accepts a task-augmented request, it returns a `CreateTaskResult
148148

149149
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.
150150

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.
152152

153153
This is a provisional field intended to account for this use case, which may be formalized as part of `CreateTaskResult` in future protocol versions.
154154

@@ -185,7 +185,7 @@ To retrieve the state of a task, requestors send a `tasks/get` request:
185185
"ttl": 30000,
186186
"pollInterval": 5000,
187187
"_meta": {
188-
"modelcontextprotocol.io/related-task": {
188+
"io.modelcontextprotocol/related-task": {
189189
"taskId": "786512e2-9e0d-44bd-8f29-789f320fe840"
190190
}
191191
}
@@ -227,7 +227,7 @@ To retrieve the result of a completed task, requestors send a `tasks/result` req
227227
],
228228
"isError": false,
229229
"_meta": {
230-
"modelcontextprotocol.io/related-task": {
230+
"io.modelcontextprotocol/related-task": {
231231
"taskId": "786512e2-9e0d-44bd-8f29-789f320fe840"
232232
}
233233
}
@@ -253,7 +253,7 @@ When a receiver creates a task, it **MAY** send a `notifications/tasks/created`
253253
"ttl": 60000,
254254
"pollInterval": 5000,
255255
"_meta": {
256-
"modelcontextprotocol.io/related-task": {
256+
"io.modelcontextprotocol/related-task": {
257257
"taskId": "786512e2-9e0d-44bd-8f29-789f320fe840"
258258
}
259259
}
@@ -282,7 +282,7 @@ When a task's status changes, receivers **MAY** send a `notifications/tasks/stat
282282
"ttl": 60000,
283283
"pollInterval": 5000,
284284
"_meta": {
285-
"modelcontextprotocol.io/related-task": {
285+
"io.modelcontextprotocol/related-task": {
286286
"taskId": "786512e2-9e0d-44bd-8f29-789f320fe840"
287287
}
288288
}
@@ -369,7 +369,7 @@ To explicitly cancel a task, requestors send a `tasks/cancel` request.
369369
"ttl": 30000,
370370
"pollInterval": 5000,
371371
"_meta": {
372-
"modelcontextprotocol.io/related-task": {
372+
"io.modelcontextprotocol/related-task": {
373373
"taskId": "786512e2-9e0d-44bd-8f29-789f320fe840"
374374
}
375375
}
@@ -436,7 +436,7 @@ While this note is not prescriptive regarding the specific usage of SSE streams,
436436
</Note>
437437

438438
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.
440440
1. When the requestor encounters the `input_required` status, it **SHOULD** call `tasks/result` prematurely.
441441
1. When the receiver receives all required input, the task **SHOULD** transition out of `input_required` status (typically back to `working`).
442442

@@ -457,16 +457,16 @@ While this note is not prescriptive regarding the specific usage of SSE streams,
457457

458458
### Associating Task-Related Messages
459459

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.
461461
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.
463463

464464
### Task Notifications
465465

466466
1. Receivers **MAY** send a `notifications/tasks/created` notification after creating a task to inform the requestor that the task is ready for polling.
467467
1. Receivers **MAY** send `notifications/tasks/status` notifications when a task's status changes.
468468
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".
470470

471471
### Task Progress Notifications
472472

@@ -674,11 +674,11 @@ Tasks can be in one of the following states:
674674

675675
### Task Metadata
676676

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`:
678678

679679
```json
680680
{
681-
"modelcontextprotocol.io/task": {
681+
"io.modelcontextprotocol/task": {
682682
"ttl": 60000
683683
}
684684
}
@@ -690,11 +690,11 @@ Fields:
690690

691691
### Related Task Metadata
692692

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`:
694694

695695
```json
696696
{
697-
"modelcontextprotocol.io/related-task": {
697+
"io.modelcontextprotocol/related-task": {
698698
"taskId": "786512e2-9e0d-44bd-8f29-789f320fe840"
699699
}
700700
}

docs/specification/draft/schema.mdx

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

schema/draft/schema.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

schema/draft/schema.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1177,7 +1177,7 @@ export type TaskStatus =
11771177

11781178
/**
11791179
* Metadata for augmenting a request with task execution.
1180-
* Include this in the `_meta` field of a request under the key `modelcontextprotocol.io/task`.
1180+
* Include this in the `_meta` field of a request under the key `io.modelcontextprotocol/task`.
11811181
*
11821182
* @category tasks
11831183
*/
@@ -1190,7 +1190,7 @@ export interface TaskMetadata {
11901190

11911191
/**
11921192
* Metadata for associating messages with a task.
1193-
* Include this in the `_meta` field under the key `modelcontextprotocol.io/related-task`.
1193+
* Include this in the `_meta` field under the key `io.modelcontextprotocol/related-task`.
11941194
*
11951195
* @category tasks
11961196
*/

0 commit comments

Comments
 (0)