You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/specification/draft/basic/utilities/tasks.mdx
+70-1Lines changed: 70 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -16,7 +16,76 @@ Implementations are free to expose tasks through any interface pattern that suit
16
16
17
17
## Capabilities
18
18
19
-
Unlike other protocol features, tasks _do not_ require capabilities to be declared.
19
+
Servers and clients that support task-augmented requests **MUST** declare a `tasks` capability during initialization. The `tasks` capability is structured by request category, with boolean properties indicating which specific request types support task augmentation.
20
+
21
+
### Server Capabilities
22
+
23
+
Servers declare which server-side requests can be augmented with tasks:
24
+
25
+
```json
26
+
{
27
+
"capabilities": {
28
+
"tasks": {
29
+
"tools": {
30
+
"call": true,
31
+
"list": true
32
+
},
33
+
"resources": {
34
+
"read": true,
35
+
"list": true
36
+
},
37
+
"prompts": {
38
+
"get": true,
39
+
"list": true
40
+
},
41
+
"tasks": {
42
+
"get": true,
43
+
"list": true,
44
+
"result": true
45
+
}
46
+
}
47
+
}
48
+
}
49
+
```
50
+
51
+
Servers **MAY** support tasks for any subset of their available request types. If a request type is not listed in the `tasks` capability or is set to `false`, requestors **SHOULD NOT** augment those requests with task metadata.
52
+
53
+
The `tasks.tasks` nested capability indicates whether the task management operations themselves (`tasks/get`, `tasks/list`, `tasks/result`) can be augmented with tasks, enabling recursive task tracking for task queries.
54
+
55
+
### Client Capabilities
56
+
57
+
Clients declare which client-side requests can be augmented with tasks:
58
+
59
+
```json
60
+
{
61
+
"capabilities": {
62
+
"tasks": {
63
+
"sampling": {
64
+
"createMessage": true
65
+
},
66
+
"elicitation": {
67
+
"create": true
68
+
},
69
+
"roots": {
70
+
"list": true
71
+
},
72
+
"tasks": {
73
+
"get": true,
74
+
"list": true,
75
+
"result": true
76
+
}
77
+
}
78
+
}
79
+
}
80
+
```
81
+
82
+
The `tasks.tasks` capability applies when the client is acting as a receiver of task-augmented requests from the server (for example, when a server sends a task-augmented `sampling/createMessage` request to the client).
83
+
84
+
### Capability Negotiation
85
+
86
+
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.
87
+
88
+
For example, if a server's capabilities include `tasks.tools.call: true`, then clients may augment `tools/call` requests with task metadata. However, if the server does not declare `tasks.resources.read`, clients should not send task-augmented `resources/read` requests.
0 commit comments