Skip to content

Commit 544c376

Browse files
committed
Remove related-task from responses that include the task ID already
1 parent 68c0d63 commit 544c376

File tree

1 file changed

+6
-12
lines changed
  • docs/specification/draft/basic/utilities

1 file changed

+6
-12
lines changed

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

Lines changed: 6 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -184,12 +184,7 @@ To retrieve the state of a task, requestors send a `tasks/get` request:
184184
"statusMessage": "The operation is now in progress.",
185185
"createdAt": "2025-11-25T10:30:00Z",
186186
"ttl": 30000,
187-
"pollInterval": 5000,
188-
"_meta": {
189-
"io.modelcontextprotocol/related-task": {
190-
"taskId": "786512e2-9e0d-44bd-8f29-789f320fe840"
191-
}
192-
}
187+
"pollInterval": 5000
193188
}
194189
}
195190
```
@@ -368,12 +363,7 @@ To explicitly cancel a task, requestors send a `tasks/cancel` request.
368363
"statusMessage": "The task was cancelled by request.",
369364
"createdAt": "2025-11-25T10:30:00Z",
370365
"ttl": 30000,
371-
"pollInterval": 5000,
372-
"_meta": {
373-
"io.modelcontextprotocol/related-task": {
374-
"taskId": "786512e2-9e0d-44bd-8f29-789f320fe840"
375-
}
376-
}
366+
"pollInterval": 5000
377367
}
378368
}
379369
```
@@ -461,6 +451,7 @@ While this note is not prescriptive regarding the specific usage of SSE streams,
461451
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.
462452
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.
463453
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.
464455

465456
### Task Notifications
466457

@@ -705,6 +696,9 @@ All requests, responses, and notifications associated with a task **MUST** inclu
705696

706697
This associates messages with their originating task across the entire request lifecycle.
707698

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.
701+
708702
## Error Handling
709703

710704
Tasks use two error reporting mechanisms:

0 commit comments

Comments
 (0)