Skip to content

Commit cbf3dca

Browse files
committed
Relax task augmentation with capabilities to "SHOULD", fix "task metadata" language
1 parent ba39ed7 commit cbf3dca

File tree

1 file changed

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

1 file changed

+11
-11
lines changed

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

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -94,11 +94,11 @@ Clients declare if they support tasks, and if so, which client-side requests can
9494

9595
### Capability Negotiation
9696

97-
During the initialization phase, both parties exchange their `tasks` capabilities to establish which operations support task-based execution. Requestors **MUST** only augment requests with task metadata if the corresponding capability has been declared by the receiver.
97+
During the initialization phase, both parties exchange their `tasks` capabilities to establish which operations support task-based execution. Requestors **SHOULD** only augment requests with a task if the corresponding capability has been declared by the receiver.
9898

99-
For example, if a server's capabilities include `tasks.requests.tools.call: {}`, then clients may augment `tools/call` requests with task metadata. If a client's capabilities include `tasks.requests.sampling.createMessage: {}`, then servers may augment `sampling/createMessage` requests with task metadata.
99+
For example, if a server's capabilities include `tasks.requests.tools.call: {}`, then clients may augment `tools/call` requests with a task. If a client's capabilities include `tasks.requests.sampling.createMessage: {}`, then servers may augment `sampling/createMessage` requests with a task.
100100

101-
If `capabilities.tasks` is not defined, the peer **MUST NOT** attempt to create tasks during requests.
101+
If `capabilities.tasks` is not defined, the peer **SHOULD NOT** attempt to create tasks during requests.
102102

103103
The set of capabilities in `capabilities.tasks.requests` is exhaustive. If a request type is not present, it does not support task-augmentation.
104104

@@ -125,7 +125,7 @@ This is to be interpreted as a fine-grained layer in addition to capabilities, f
125125
Task-augmented requests follow a two-phase response pattern that differs from normal requests:
126126

127127
- **Normal requests**: The server processes the request and returns the actual operation result directly.
128-
- **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.
128+
- **Task-augmented requests**: The server accepts the request and immediately returns a `CreateTaskResult` containing task data. The actual operation result becomes available later through `tasks/result` after the task completes.
129129

130130
To create a task, requestors send a request with the `task` field included in the request params. Requestors **MAY** include a `ttl` value indicating the desired task lifetime duration (in milliseconds) since its creation.
131131

@@ -167,7 +167,7 @@ To create a task, requestors send a request with the `task` field included in th
167167
}
168168
```
169169

170-
When a receiver accepts a task-augmented request, it returns a [`CreateTaskResult`](/specification/draft/schema#createtaskresult) containing task metadata. The response does not include the actual operation result. The actual result (e.g., tool result for `tools/call`) becomes available only through `tasks/result` after the task completes.
170+
When a receiver accepts a task-augmented request, it returns a [`CreateTaskResult`](/specification/draft/schema#createtaskresult) containing task data. The response does not include the actual operation result. The actual result (e.g., tool result for `tools/call`) becomes available only through `tasks/result` after the task completes.
171171

172172
<Note>
173173

@@ -219,7 +219,7 @@ Requestors **SHOULD** continue polling until the task reaches a terminal status
219219

220220
### Retrieving Task Results
221221

222-
After a task completes the operation result is retrieved via [`tasks/result`](/specification/draft/schema#tasks%2Fresult). This is distinct from the initial `CreateTaskResult` response, which contains only task metadata. The result structure matches the original request type (e.g., `CallToolResult` for `tools/call`).
222+
After a task completes the operation result is retrieved via [`tasks/result`](/specification/draft/schema#tasks%2Fresult). This is distinct from the initial `CreateTaskResult` response, which contains only task data. The result structure matches the original request type (e.g., `CallToolResult` for `tools/call`).
223223

224224
To retrieve the result of a completed task, requestors can send a `tasks/result` request:
225225

@@ -279,7 +279,7 @@ When a task status changes, receivers **MAY** send a [`notifications/tasks/statu
279279
}
280280
```
281281

282-
The notification includes the full [`Task`](/specification/draft/schema#task) object with all task metadata fields, including the updated `status` and `statusMessage` (if present). This allows requestors to access the complete task state without making an additional `tasks/get` request.
282+
The notification includes the full [`Task`](/specification/draft/schema#task) object, including the updated `status` and `statusMessage` (if present). This allows requestors to access the complete task state without making an additional `tasks/get` request.
283283

284284
Requestors **MUST NOT** rely on receiving this notifications, as it is optional. Receivers are not required to send status notifications and may choose to only send them for certain status transitions. Requestors **SHOULD** continue to poll via `tasks/get` to ensure they receive status updates.
285285

@@ -481,7 +481,7 @@ sequenceDiagram
481481
participant C as Client (Requestor)
482482
participant S as Server (Receiver)
483483
Note over C,S: 1. Task Creation
484-
C->>S: Request with task metadata (ttl)
484+
C->>S: Request with task field (ttl)
485485
S->>C: CreateTaskResult (taskId, status: working, ttl, pollInterval)
486486
Note over C,S: 2. Task Polling
487487
C->>S: tasks/get (taskId)
@@ -511,7 +511,7 @@ sequenceDiagram
511511
Note over LLM,C: LLM initiates request
512512
LLM->>C: Request operation
513513
514-
Note over C,S: Client augments with task metadata
514+
Note over C,S: Client augments with task
515515
C->>S: tools/call (ttl: 3600000)
516516
S->>C: CreateTaskResult (task-123, status: working)
517517
@@ -635,7 +635,7 @@ sequenceDiagram
635635

636636
### Task
637637

638-
A task represents the execution state of a request. The task metadata includes:
638+
A task represents the execution state of a request. The task state includes:
639639

640640
- `taskId`: Unique identifier for the task
641641
- `status`: Current state of the task execution
@@ -750,7 +750,7 @@ Receivers **SHOULD** provide informative error messages to describe the cause of
750750

751751
<Note>
752752

753-
Receivers are not required to retain task metadata indefinitely. It is compliant behavior for a receiver to return an error stating the task cannot be found if it has purged an expired task.
753+
Receivers are not required to retain tasks indefinitely. It is compliant behavior for a receiver to return an error stating the task cannot be found if it has purged an expired task.
754754

755755
</Note>
756756

0 commit comments

Comments
 (0)