Skip to content

Commit 6444eb3

Browse files
committed
Make task idempotency a MAY instead of a MUST
1 parent d52881b commit 6444eb3

File tree

1 file changed

+5
-5
lines changed
  • docs/specification/draft/basic/utilities

1 file changed

+5
-5
lines changed

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

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ title: Tasks
66

77
<Info>**Protocol Revision**: draft</Info>
88

9-
The Model Context Protcol (MCP) allows requestors (which can be either clients or servers, depending on the direction of communication) to augment their requests with **tasks**. Tasks are durable state machines that carry information about the underlying execution state of the request they wrap, and are intended for requestor polling and deferred result retrieval. Each task is uniquely identifiable by a requestor-generated, idempotent **task ID**.
9+
The Model Context Protcol (MCP) allows requestors (which can be either clients or servers, depending on the direction of communication) to augment their requests with **tasks**. Tasks are durable state machines that carry information about the underlying execution state of the request they wrap, and are intended for requestor polling and deferred result retrieval. Each task is uniquely identifiable by a requestor-generated **task ID**.
1010

1111
## User Interaction Model
1212

@@ -209,8 +209,8 @@ These requirements apply to all parties that support receiving task-augmented re
209209
### Task ID Requirements
210210

211211
1. Task IDs **MUST** be a string value.
212-
1. Task IDs **MUST** be unique across all tasks controlled by the receiver.
213-
1. The receiver of a request with a task ID in its `_meta` **MUST** validate that the provided task ID has not already been associated with a task controlled by that receiver.
212+
1. Task IDs **SHOULD** be unique across all tasks controlled by the receiver.
213+
1. The receiver of a request with a task ID in its `_meta` **MAY** validate that the provided task ID has not already been associated with a task controlled by that receiver.
214214

215215
### Task Status Lifecycle
216216

@@ -522,7 +522,7 @@ Receivers **MUST** return standard JSON-RPC errors for the following protocol er
522522

523523
- Invalid or nonexistent `taskId` in `tasks/get`, `tasks/list`, or `tasks/result`: `-32602` (Invalid params)
524524
- Invalid or nonexistent cursor in `tasks/list`: `-32602` (Invalid params)
525-
- Request with a `taskId` that was already used for a different task: `-32602` (Invalid params)
525+
- Request with a `taskId` that was already used for a different task (if the receiver validates task ID uniqueness): `-32602` (Invalid params)
526526
- Attempting to retrieve result when task is not in `completed` status: `-32602` (Invalid params)
527527
- Internal errors: `-32603` (Internal error)
528528

@@ -573,7 +573,7 @@ Receivers are not obligated to retain task metadata indefinitely. It is complian
573573
}
574574
```
575575

576-
**Example: Duplicate task ID**
576+
**Example: Duplicate task ID (if receiver validates uniqueness)**
577577

578578
```json
579579
{

0 commit comments

Comments
 (0)