Skip to content

Commit 0394a5d

Browse files
committed
Restrict tasks to tools/call, elicitation/create, and sampling/createMessage
1 parent 96b8d49 commit 0394a5d

File tree

4 files changed

+12
-199
lines changed

4 files changed

+12
-199
lines changed

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

Lines changed: 10 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -28,32 +28,15 @@ Servers declare which server-side requests can be augmented with tasks:
2828
"tasks": {
2929
"requests": {
3030
"tools": {
31-
"call": true,
32-
"list": true
33-
},
34-
"resources": {
35-
"read": true,
36-
"list": true
37-
},
38-
"prompts": {
39-
"get": true,
40-
"list": true
41-
},
42-
"tasks": {
43-
"get": true,
44-
"list": true,
45-
"result": true,
46-
"delete": true
31+
"call": true
4732
}
4833
}
4934
}
5035
}
5136
}
5237
```
5338

54-
Servers **MAY** support tasks for any subset of their available request types. If a request type is not listed in the `tasks.requests` capability or is set to `false`, requestors **SHOULD NOT** augment those requests with task metadata.
55-
56-
The `tasks.requests.tasks` nested capability indicates whether the task management operations themselves (`tasks/get`, `tasks/list`, `tasks/result`, `tasks/delete`) can be augmented with tasks, enabling recursive task tracking for task queries.
39+
This set of capabilities is exhaustive. If a request type is not present, it does not support task-augmentation.
5740

5841
### Client Capabilities
5942

@@ -69,29 +52,26 @@ Clients declare which client-side requests can be augmented with tasks:
6952
},
7053
"elicitation": {
7154
"create": true
72-
},
73-
"roots": {
74-
"list": true
75-
},
76-
"tasks": {
77-
"get": true,
78-
"list": true,
79-
"result": true,
80-
"delete": true
8155
}
8256
}
8357
}
8458
}
8559
}
8660
```
8761

88-
The `tasks.requests.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).
62+
This set of capabilities is exhaustive. If a request type is not present, it does not support task-augmentation.
8963

9064
### Capability Negotiation
9165

9266
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.
9367

94-
For example, if a server's capabilities include `tasks.requests.tools.call: true`, then clients may augment `tools/call` requests with task metadata. However, if the server does not declare `tasks.requests.resources.read`, clients should not send task-augmented `resources/read` requests.
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+
70+
### Tool-Level Negotiation
71+
72+
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`.
73+
74+
This is to be interpreted as a fine-grained layer in addition to capabilities. If a server's capabilities include `tasks.requests.tools.call: false`, then clients **MUST NOT** attempt to use task augmentation on that server's tools, even if they declare tool-level support via `annotations.taskHint`.
9575

9676
## Protocol Messages
9777

0 commit comments

Comments
 (0)