Skip to content

Commit f7229a5

Browse files
committed
Add capabilities for tasks/list and tasks/delete
1 parent 0394a5d commit f7229a5

File tree

4 files changed

+71
-17
lines changed

4 files changed

+71
-17
lines changed

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

Lines changed: 17 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -20,53 +20,61 @@ Servers and clients that support task-augmented requests **MUST** declare a `tas
2020

2121
### Server Capabilities
2222

23-
Servers declare which server-side requests can be augmented with tasks:
23+
Servers declare if they support tasks, and if so, which server-side requests can be augmented with tasks:
2424

2525
```json
2626
{
2727
"capabilities": {
2828
"tasks": {
29+
"list": {},
30+
"delete": {},
2931
"requests": {
3032
"tools": {
31-
"call": true
33+
"call": {}
3234
}
3335
}
3436
}
3537
}
3638
}
3739
```
3840

39-
This set of capabilities is exhaustive. If a request type is not present, it does not support task-augmentation.
40-
4141
### Client Capabilities
4242

43-
Clients declare which client-side requests can be augmented with tasks:
43+
Clients declare if they support tasks, and if so, which client-side requests can be augmented with tasks:
4444

4545
```json
4646
{
4747
"capabilities": {
4848
"tasks": {
49+
"list": {},
50+
"delete": {},
4951
"requests": {
5052
"sampling": {
51-
"createMessage": true
53+
"createMessage": {}
5254
},
5355
"elicitation": {
54-
"create": true
56+
"create": {}
5557
}
5658
}
5759
}
5860
}
5961
}
6062
```
6163

62-
This set of capabilities is exhaustive. If a request type is not present, it does not support task-augmentation.
63-
6464
### Capability Negotiation
6565

6666
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.
6767

6868
For example, if a server's capabilities include `tasks.requests.tools.call: true`, then clients may augment `tools/call` requests with task metadata. If a client's capabilities include `tasks.requests.sampling.createMessage: true`, then servers may augment `sampling/createMessage` requests with task metadata.
6969

70+
If `capabilities.tasks` is not defined, the peer **MUST NOT** attempt to create tasks during requests.
71+
72+
The set of capabilities in `capabilities.tasks.requests` is exhaustive. If a request type is not present, it does not support task-augmentation.
73+
74+
`capabilities.tasks.list` controls if the `tasks/list` operation is supported by the party.
75+
76+
`capabilities.tasks.delete` controls if the `tasks/delete` operation is supported by the party.
77+
7078
### Tool-Level Negotiation
7179

7280
Tool calls are given special consideration for the purpose of task augmentation. In the result of `tools/list`, tools declare support for tasks via `annotations.taskHint`.

0 commit comments

Comments
 (0)