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
+17-9Lines changed: 17 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -20,53 +20,61 @@ Servers and clients that support task-augmented requests **MUST** declare a `tas
20
20
21
21
### Server Capabilities
22
22
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:
24
24
25
25
```json
26
26
{
27
27
"capabilities": {
28
28
"tasks": {
29
+
"list": {},
30
+
"delete": {},
29
31
"requests": {
30
32
"tools": {
31
-
"call": true
33
+
"call": {}
32
34
}
33
35
}
34
36
}
35
37
}
36
38
}
37
39
```
38
40
39
-
This set of capabilities is exhaustive. If a request type is not present, it does not support task-augmentation.
40
-
41
41
### Client Capabilities
42
42
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:
44
44
45
45
```json
46
46
{
47
47
"capabilities": {
48
48
"tasks": {
49
+
"list": {},
50
+
"delete": {},
49
51
"requests": {
50
52
"sampling": {
51
-
"createMessage": true
53
+
"createMessage": {}
52
54
},
53
55
"elicitation": {
54
-
"create": true
56
+
"create": {}
55
57
}
56
58
}
57
59
}
58
60
}
59
61
}
60
62
```
61
63
62
-
This set of capabilities is exhaustive. If a request type is not present, it does not support task-augmentation.
63
-
64
64
### Capability Negotiation
65
65
66
66
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.
67
67
68
68
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.
69
69
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
+
70
78
### Tool-Level Negotiation
71
79
72
80
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