Commit e0f61c4
fix: add missing
The MCP specification defines an optional `size?: number` field on the
Resource interface (added in spec revision 2025-06-18), but the Zod
schema was missing it. This adds the field so servers can declare
resource sizes and hosts can display file sizes / estimate context
window usage.
Fixes modelcontextprotocol#1573
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>size field to ResourceSchema1 parent c4ee360 commit e0f61c4
2 files changed
Lines changed: 12 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
915 | 915 | | |
916 | 916 | | |
917 | 917 | | |
| 918 | + | |
| 919 | + | |
| 920 | + | |
| 921 | + | |
| 922 | + | |
| 923 | + | |
| 924 | + | |
918 | 925 | | |
919 | 926 | | |
920 | 927 | | |
| |||
0 commit comments