Skip to content

Commit cbf19ca

Browse files
committed
Reintroduction of "size" field for Resource
1 parent 9236eb1 commit cbf19ca

File tree

2 files changed

+11
-0
lines changed

2 files changed

+11
-0
lines changed

schema/2025-03-26/schema.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1553,6 +1553,10 @@
15531553
"description": "A human-readable name for this resource.\n\nThis can be used by clients to populate UI elements.",
15541554
"type": "string"
15551555
},
1556+
"size": {
1557+
"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.",
1558+
"type": "integer"
1559+
},
15561560
"uri": {
15571561
"description": "The URI of this resource.",
15581562
"format": "uri",

schema/2025-03-26/schema.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -473,6 +473,13 @@ export interface Resource {
473473
* Optional annotations for the client.
474474
*/
475475
annotations?: Annotations;
476+
477+
/**
478+
* The size of the raw resource content, in bytes (i.e., before base64 encoding or any tokenization), if known.
479+
*
480+
* This can be used by Hosts to display file sizes and estimate context window usage.
481+
*/
482+
size?: number;
476483
}
477484

478485
/**

0 commit comments

Comments
 (0)