ext-tasks/schema/draft/schema.json
2026-05-11 16:04:32 -07:00

1134 lines
28 KiB
JSON

{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://modelcontextprotocol.io/ext-tasks/schema.json",
"title": "MCP Tasks Extension",
"description": "JSON Schema for MCP Tasks extension protocol messages. Extension Identifier: io.modelcontextprotocol/tasks",
"$defs": {
"CancelTaskRequest": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"jsonrpc": {
"type": "string",
"const": "2.0"
},
"id": {
"anyOf": [
{
"type": "string"
},
{
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
}
]
},
"method": {
"type": "string",
"const": "tasks/cancel"
},
"params": {
"type": "object",
"properties": {
"taskId": {
"type": "string"
}
},
"required": [
"taskId"
],
"additionalProperties": false
}
},
"required": [
"jsonrpc",
"id",
"method",
"params"
],
"additionalProperties": false
},
"CancelTaskResult": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"allOf": [
{
"type": "object",
"properties": {
"_meta": {
"type": "object",
"properties": {
"progressToken": {
"anyOf": [
{
"type": "string"
},
{
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
}
]
},
"io.modelcontextprotocol/related-task": {
"type": "object",
"properties": {
"taskId": {
"type": "string"
}
},
"required": [
"taskId"
],
"additionalProperties": false
}
},
"additionalProperties": {}
}
},
"additionalProperties": {}
},
{
"type": "object",
"properties": {
"taskId": {
"type": "string"
},
"status": {
"anyOf": [
{
"type": "string",
"const": "working"
},
{
"type": "string",
"const": "input_required"
},
{
"type": "string",
"const": "completed"
},
{
"type": "string",
"const": "failed"
},
{
"type": "string",
"const": "cancelled"
}
]
},
"statusMessage": {
"type": "string"
},
"createdAt": {
"type": "string"
},
"lastUpdatedAt": {
"type": "string"
},
"ttl": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"pollInterval": {
"type": "number"
}
},
"required": [
"taskId",
"status",
"createdAt",
"lastUpdatedAt",
"ttl"
],
"additionalProperties": false
}
]
},
"CreateTaskResult": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"_meta": {
"type": "object",
"properties": {
"progressToken": {
"anyOf": [
{
"type": "string"
},
{
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
}
]
},
"io.modelcontextprotocol/related-task": {
"type": "object",
"properties": {
"taskId": {
"type": "string"
}
},
"required": [
"taskId"
],
"additionalProperties": false
}
},
"additionalProperties": {}
},
"task": {
"type": "object",
"properties": {
"taskId": {
"type": "string"
},
"status": {
"anyOf": [
{
"type": "string",
"const": "working"
},
{
"type": "string",
"const": "input_required"
},
{
"type": "string",
"const": "completed"
},
{
"type": "string",
"const": "failed"
},
{
"type": "string",
"const": "cancelled"
}
]
},
"statusMessage": {
"type": "string"
},
"createdAt": {
"type": "string"
},
"lastUpdatedAt": {
"type": "string"
},
"ttl": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"pollInterval": {
"type": "number"
}
},
"required": [
"taskId",
"status",
"createdAt",
"lastUpdatedAt",
"ttl"
],
"additionalProperties": false
}
},
"required": [
"task"
],
"additionalProperties": {}
},
"GetTaskPayloadRequest": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"jsonrpc": {
"type": "string",
"const": "2.0"
},
"id": {
"anyOf": [
{
"type": "string"
},
{
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
}
]
},
"method": {
"type": "string",
"const": "tasks/result"
},
"params": {
"type": "object",
"properties": {
"taskId": {
"type": "string"
}
},
"required": [
"taskId"
],
"additionalProperties": false
}
},
"required": [
"jsonrpc",
"id",
"method",
"params"
],
"additionalProperties": false
},
"GetTaskPayloadResult": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"allOf": [
{
"type": "object",
"properties": {
"_meta": {
"type": "object",
"properties": {
"progressToken": {
"anyOf": [
{
"type": "string"
},
{
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
}
]
},
"io.modelcontextprotocol/related-task": {
"type": "object",
"properties": {
"taskId": {
"type": "string"
}
},
"required": [
"taskId"
],
"additionalProperties": false
}
},
"additionalProperties": {}
}
},
"additionalProperties": {}
},
{
"type": "object",
"propertyNames": {
"type": "string"
},
"additionalProperties": {}
}
]
},
"GetTaskRequest": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"jsonrpc": {
"type": "string",
"const": "2.0"
},
"id": {
"anyOf": [
{
"type": "string"
},
{
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
}
]
},
"method": {
"type": "string",
"const": "tasks/get"
},
"params": {
"type": "object",
"properties": {
"taskId": {
"type": "string"
}
},
"required": [
"taskId"
],
"additionalProperties": false
}
},
"required": [
"jsonrpc",
"id",
"method",
"params"
],
"additionalProperties": false
},
"GetTaskResult": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"allOf": [
{
"type": "object",
"properties": {
"_meta": {
"type": "object",
"properties": {
"progressToken": {
"anyOf": [
{
"type": "string"
},
{
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
}
]
},
"io.modelcontextprotocol/related-task": {
"type": "object",
"properties": {
"taskId": {
"type": "string"
}
},
"required": [
"taskId"
],
"additionalProperties": false
}
},
"additionalProperties": {}
}
},
"additionalProperties": {}
},
{
"type": "object",
"properties": {
"taskId": {
"type": "string"
},
"status": {
"anyOf": [
{
"type": "string",
"const": "working"
},
{
"type": "string",
"const": "input_required"
},
{
"type": "string",
"const": "completed"
},
{
"type": "string",
"const": "failed"
},
{
"type": "string",
"const": "cancelled"
}
]
},
"statusMessage": {
"type": "string"
},
"createdAt": {
"type": "string"
},
"lastUpdatedAt": {
"type": "string"
},
"ttl": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"pollInterval": {
"type": "number"
}
},
"required": [
"taskId",
"status",
"createdAt",
"lastUpdatedAt",
"ttl"
],
"additionalProperties": false
}
]
},
"ListTasksRequest": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"method": {
"type": "string",
"const": "tasks/list"
},
"params": {
"type": "object",
"properties": {
"_meta": {
"type": "object",
"properties": {
"progressToken": {
"anyOf": [
{
"type": "string"
},
{
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
}
]
},
"io.modelcontextprotocol/related-task": {
"type": "object",
"properties": {
"taskId": {
"type": "string"
}
},
"required": [
"taskId"
],
"additionalProperties": false
}
},
"additionalProperties": {}
},
"cursor": {
"type": "string"
}
},
"additionalProperties": false
}
},
"required": [
"method"
],
"additionalProperties": false
},
"ListTasksResult": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"_meta": {
"type": "object",
"properties": {
"progressToken": {
"anyOf": [
{
"type": "string"
},
{
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
}
]
},
"io.modelcontextprotocol/related-task": {
"type": "object",
"properties": {
"taskId": {
"type": "string"
}
},
"required": [
"taskId"
],
"additionalProperties": false
}
},
"additionalProperties": {}
},
"nextCursor": {
"type": "string"
},
"tasks": {
"type": "array",
"items": {
"type": "object",
"properties": {
"taskId": {
"type": "string"
},
"status": {
"anyOf": [
{
"type": "string",
"const": "working"
},
{
"type": "string",
"const": "input_required"
},
{
"type": "string",
"const": "completed"
},
{
"type": "string",
"const": "failed"
},
{
"type": "string",
"const": "cancelled"
}
]
},
"statusMessage": {
"type": "string"
},
"createdAt": {
"type": "string"
},
"lastUpdatedAt": {
"type": "string"
},
"ttl": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"pollInterval": {
"type": "number"
}
},
"required": [
"taskId",
"status",
"createdAt",
"lastUpdatedAt",
"ttl"
],
"additionalProperties": false
}
}
},
"required": [
"tasks"
],
"additionalProperties": {}
},
"RelatedTaskMetadata": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"taskId": {
"type": "string"
}
},
"required": [
"taskId"
],
"additionalProperties": false
},
"TaskAugmentedRequestParams": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"_meta": {
"type": "object",
"properties": {
"progressToken": {
"anyOf": [
{
"type": "string"
},
{
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
}
]
}
},
"additionalProperties": {}
},
"task": {
"type": "object",
"properties": {
"ttl": {
"type": "number"
}
},
"additionalProperties": false
}
},
"additionalProperties": {}
},
"TaskClientCapabilities": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"tasks": {
"type": "object",
"properties": {
"list": {
"type": "object",
"propertyNames": {
"type": "string"
},
"additionalProperties": {
"not": {}
}
},
"cancel": {
"type": "object",
"propertyNames": {
"type": "string"
},
"additionalProperties": {
"not": {}
}
},
"requests": {
"type": "object",
"properties": {
"sampling": {
"type": "object",
"properties": {
"createMessage": {
"type": "object",
"propertyNames": {
"type": "string"
},
"additionalProperties": {
"not": {}
}
}
},
"additionalProperties": false
},
"elicitation": {
"type": "object",
"properties": {
"create": {
"type": "object",
"propertyNames": {
"type": "string"
},
"additionalProperties": {
"not": {}
}
}
},
"additionalProperties": false
}
},
"additionalProperties": false
}
},
"additionalProperties": false
}
},
"additionalProperties": false
},
"TaskMetadata": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"ttl": {
"type": "number"
}
},
"additionalProperties": false
},
"Task": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"taskId": {
"type": "string"
},
"status": {
"anyOf": [
{
"type": "string",
"const": "working"
},
{
"type": "string",
"const": "input_required"
},
{
"type": "string",
"const": "completed"
},
{
"type": "string",
"const": "failed"
},
{
"type": "string",
"const": "cancelled"
}
]
},
"statusMessage": {
"type": "string"
},
"createdAt": {
"type": "string"
},
"lastUpdatedAt": {
"type": "string"
},
"ttl": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"pollInterval": {
"type": "number"
}
},
"required": [
"taskId",
"status",
"createdAt",
"lastUpdatedAt",
"ttl"
],
"additionalProperties": false
},
"TaskServerCapabilities": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"tasks": {
"type": "object",
"properties": {
"list": {
"type": "object",
"propertyNames": {
"type": "string"
},
"additionalProperties": {
"not": {}
}
},
"cancel": {
"type": "object",
"propertyNames": {
"type": "string"
},
"additionalProperties": {
"not": {}
}
},
"requests": {
"type": "object",
"properties": {
"tools": {
"type": "object",
"properties": {
"call": {
"type": "object",
"propertyNames": {
"type": "string"
},
"additionalProperties": {
"not": {}
}
}
},
"additionalProperties": false
}
},
"additionalProperties": false
}
},
"additionalProperties": false
}
},
"additionalProperties": false
},
"TaskStatusNotificationParams": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"allOf": [
{
"type": "object",
"properties": {
"_meta": {
"type": "object",
"propertyNames": {
"type": "string"
},
"additionalProperties": {}
}
},
"additionalProperties": {}
},
{
"type": "object",
"properties": {
"taskId": {
"type": "string"
},
"status": {
"anyOf": [
{
"type": "string",
"const": "working"
},
{
"type": "string",
"const": "input_required"
},
{
"type": "string",
"const": "completed"
},
{
"type": "string",
"const": "failed"
},
{
"type": "string",
"const": "cancelled"
}
]
},
"statusMessage": {
"type": "string"
},
"createdAt": {
"type": "string"
},
"lastUpdatedAt": {
"type": "string"
},
"ttl": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"pollInterval": {
"type": "number"
}
},
"required": [
"taskId",
"status",
"createdAt",
"lastUpdatedAt",
"ttl"
],
"additionalProperties": false
},
{
"type": "object",
"propertyNames": {
"type": "string"
},
"additionalProperties": {}
}
]
},
"TaskStatusNotification": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"jsonrpc": {
"type": "string",
"const": "2.0"
},
"method": {
"type": "string",
"const": "notifications/tasks/status"
},
"params": {
"allOf": [
{
"type": "object",
"properties": {
"_meta": {
"type": "object",
"propertyNames": {
"type": "string"
},
"additionalProperties": {}
}
},
"additionalProperties": {}
},
{
"type": "object",
"properties": {
"taskId": {
"type": "string"
},
"status": {
"anyOf": [
{
"type": "string",
"const": "working"
},
{
"type": "string",
"const": "input_required"
},
{
"type": "string",
"const": "completed"
},
{
"type": "string",
"const": "failed"
},
{
"type": "string",
"const": "cancelled"
}
]
},
"statusMessage": {
"type": "string"
},
"createdAt": {
"type": "string"
},
"lastUpdatedAt": {
"type": "string"
},
"ttl": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"pollInterval": {
"type": "number"
}
},
"required": [
"taskId",
"status",
"createdAt",
"lastUpdatedAt",
"ttl"
],
"additionalProperties": false
},
{
"type": "object",
"propertyNames": {
"type": "string"
},
"additionalProperties": {}
}
]
}
},
"required": [
"jsonrpc",
"method",
"params"
],
"additionalProperties": false
},
"TaskStatus": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"anyOf": [
{
"type": "string",
"const": "working"
},
{
"type": "string",
"const": "input_required"
},
{
"type": "string",
"const": "completed"
},
{
"type": "string",
"const": "failed"
},
{
"type": "string",
"const": "cancelled"
}
]
},
"ToolTaskSupport": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"anyOf": [
{
"type": "string",
"const": "forbidden"
},
{
"type": "string",
"const": "optional"
},
{
"type": "string",
"const": "required"
}
]
}
}
}