fix: add missing size field to ResourceSchema (#1574)
Co-authored-by: Ola Hungerford <olaservo@users.noreply.github.com>
This commit is contained in:
parent
40174d2dff
commit
379392d044
2 changed files with 12 additions and 0 deletions
5
.changeset/add-resource-size-field.md
Normal file
5
.changeset/add-resource-size-field.md
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
---
|
||||
'@modelcontextprotocol/core': patch
|
||||
---
|
||||
|
||||
Add missing `size` field to `ResourceSchema` to match the MCP specification
|
||||
|
|
@ -832,6 +832,13 @@ export const ResourceSchema = z.object({
|
|||
*/
|
||||
mimeType: z.optional(z.string()),
|
||||
|
||||
/**
|
||||
* The size of the raw resource content, in bytes (i.e., before base64 encoding or any tokenization), if known.
|
||||
*
|
||||
* This can be used by Hosts to display file sizes and estimate context window usage.
|
||||
*/
|
||||
size: z.optional(z.number()),
|
||||
|
||||
/**
|
||||
* Optional annotations for the client.
|
||||
*/
|
||||
|
|
|
|||
Loading…
Reference in a new issue