Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions schema/draft/schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,9 @@
"description": "A list of content objects that represent the unstructured result of the tool call.",
"items": {
"anyOf": [
{
"$ref": "#/definitions/Resource"
},
{
"$ref": "#/definitions/TextContent"
},
Expand Down Expand Up @@ -1566,6 +1569,10 @@
"description": "The size of the raw resource content, in bytes (i.e., before base64 encoding or any tokenization), if known.\n\nThis can be used by Hosts to display file sizes and estimate context window usage.",
"type": "integer"
},
"status": {
"$ref": "#/definitions/ResourceStatus",
"description": "The status of this resource.\n\nThis can be used by clients to determine whether the resource is available for use."
},
"uri": {
"description": "The URI of this resource.",
"format": "uri",
Expand Down Expand Up @@ -1639,6 +1646,16 @@
],
"type": "object"
},
"ResourceStatus": {
"description": "The status of this resource.\n\nThis can be used by clients to determine whether the resource is available for use.",
"enum": [
"available",
"deleted",
"error",
"pending"
],
"type": "string"
},
"ResourceTemplate": {
"description": "A template description for resources available on the server.",
"properties": {
Expand Down
20 changes: 19 additions & 1 deletion schema/draft/schema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -439,6 +439,17 @@ export interface ResourceUpdatedNotification extends Notification {
};
}

/**
* The status of this resource.
*
* This can be used by clients to determine whether the resource is available for use.
*/
export type ResourceStatus =
| "pending"
| "available"
| "error"
| "deleted"

/**
* A known resource that the server is capable of reading.
*/
Expand All @@ -464,6 +475,13 @@ export interface Resource {
*/
description?: string;

/**
* The status of this resource.
*
* This can be used by clients to determine whether the resource is available for use.
*/
status?: ResourceStatus;

/**
* The MIME type of this resource, if known.
*/
Expand Down Expand Up @@ -690,7 +708,7 @@ export interface CallToolResult extends Result {
/**
* A list of content objects that represent the unstructured result of the tool call.
*/
content: (TextContent | ImageContent | AudioContent | EmbeddedResource)[];
content: (TextContent | ImageContent | AudioContent | EmbeddedResource | Resource)[];

/**
* An optional JSON object that represents the structured result of the tool call.
Expand Down