Skip to content

Commit 360c536

Browse files
committed
chore: rename task to taskSupport
Signed-off-by: He-Pin <[email protected]>
1 parent 7195cc3 commit 360c536

File tree

1 file changed

+10
-12
lines changed

1 file changed

+10
-12
lines changed

mcp-core/src/main/java/io/modelcontextprotocol/spec/McpSchema.java

Lines changed: 10 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1442,29 +1442,27 @@ public record JsonSchema( // @formatter:off
14421442
*/
14431443
@JsonInclude(JsonInclude.Include.NON_ABSENT)
14441444
@JsonIgnoreProperties(ignoreUnknown = true)
1445-
public record ToolExecution(TaskSupport task) {
1445+
public record ToolExecution(TaskSupport taskSupport) {
14461446
}
14471447

14481448
/**
1449-
* The task augmented support mode for a tool.
1449+
* Indicates whether this tool supports task-augmented execution. This allows clients
1450+
* to handle long-running operations through polling the task system.
14501451
* <p>
1451-
* If mode is {@code always}, clients SHOULD invoke the tool as a task. Servers MAY
1452-
* return a -32601 (Method not found) error if a client does not attempt to do so.
1452+
* - "forbidden": Tool does not support task-augmented execution (default when absent)
14531453
* <p>
1454-
* If mode is {@code optional}, clients MAY invoke the tool as a task or as a normal
1455-
* request.
1454+
* - "optional": Tool may support task-augmented execution
14561455
* <p>
1457-
* If mode is not present or {@code never}, clients MUST NOT attempt to invoke the
1458-
* tool as a task. Servers SHOULD return a -32601 (Method not found) error if a client
1459-
* attempts to do so. This is the default behavior.
1460-
*
1456+
* - "required": Tool requires task-augmented execution
1457+
* <p>
1458+
* Default: "forbidden"
14611459
*/
14621460
public enum TaskSupport {
14631461

14641462
// @formatter:off
1465-
@JsonProperty("always") ALWAYS("always"),
1463+
@JsonProperty("forbidden") FORBIDDEN("forbidden"),
14661464
@JsonProperty("optional") OPTIONAL("optional"),
1467-
@JsonProperty("never") NEVER("never");
1465+
@JsonProperty("required") REQUIRED("required");
14681466
// @formatter:on
14691467

14701468
private final String value;

0 commit comments

Comments
 (0)