Skip to content

Commit 00566e2

Browse files
committed
Change taskHint to enum
1 parent b94efec commit 00566e2

File tree

4 files changed

+21
-11
lines changed

4 files changed

+21
-11
lines changed

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

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -108,10 +108,11 @@ Tool calls are given special consideration for the purpose of task augmentation.
108108

109109
This is to be interpreted as a fine-grained layer in addition to capabilities, following these rules:
110110

111-
1. 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`.
111+
1. 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, regardless of the `taskHint` value.
112112
1. If a server's capabilities include `tasks.requests.tools.call: true`, then clients consider the value of `taskHint`, and handle it accordingly:
113-
1. If `taskHint` is not present or `false`, clients **MUST NOT** attempt to invoke the tool as a task. Servers **SHOULD** return a `-32601` (Method not found) error if a client attempts to do so.
114-
1. If `taskHint` is `true`, clients **SHOULD** attempt to invoke the tool as a task. Servers **MAY** return a `-32601` (Method not found) error if a client does not attempt to do so.
113+
1. If `taskHint` is not present or `"never"`, clients **MUST NOT** attempt to invoke the tool as a task. Servers **SHOULD** return a `-32601` (Method not found) error if a client attempts to do so. This is the default behavior.
114+
1. If `taskHint` is `"optional"`, clients **MAY** invoke the tool as a task or as a normal request.
115+
1. If `taskHint` is `"always"`, clients **SHOULD** invoke the tool as a task. Servers **MAY** return a `-32601` (Method not found) error if a client does not attempt to do so.
115116

116117
## Protocol Messages
117118

docs/specification/draft/schema.mdx

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

schema/draft/schema.json

Lines changed: 7 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

schema/draft/schema.ts

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1205,13 +1205,17 @@ export interface ToolAnnotations {
12051205
openWorldHint?: boolean;
12061206

12071207
/**
1208-
* If true, this tool is expected to support task-augmented execution.
1208+
* Indicates whether this tool supports task-augmented execution.
12091209
* This allows clients to handle long-running operations through polling
12101210
* the task system.
12111211
*
1212-
* Default: false
1212+
* - "never": Tool does not support task-augmented execution (default when absent)
1213+
* - "optional": Tool may support task-augmented execution
1214+
* - "always": Tool requires task-augmented execution
1215+
*
1216+
* Default: "never"
12131217
*/
1214-
taskHint?: boolean;
1218+
taskHint?: "never" | "optional" | "always";
12151219
}
12161220

12171221
/**

0 commit comments

Comments
 (0)