Skip to content

feat(unstable-v2): make ResourceLink.size unsigned and define unknown tool kinds - #2521

Merged
benbrandt merged 1 commit into
mainfrom
feat/v2-toolkind-size
Oct 27, 2026
Merged

benbrandt merged 1 commit into
mainfrom
feat/v2-toolkind-size

Conversation

@benbrandt

Copy link
Copy Markdown
Member

Two small schema fixes from the v2 spec review:

  • ResourceLink.size was i64, so negative byte counts passed validation. It is now u64 (format: uint64, minimum: 0). MCP declares size?: number with no lower bound, but a byte count can't be negative, so every valid value still fits. The field uses DefaultOnError, so a negative value is treated as unknown rather than failing the message. The Rust type change is acceptable while v2 is unstable.
  • Unknown tool kinds: tool-calls.mdx (main and draft) and the ToolKind::Unknown doc now say Clients display a tool kind they don't recognize as other, making the existing "generic display" fallback concrete.

The fallback variant keeps its name Unknown, because other is already a known tool kind.

… tool kinds

ResourceLink.size is a byte count, so it is now u64 (minimum 0 in the
schema); a negative value is discarded as unknown via DefaultOnError.
Clients display an unrecognized tool kind as other.
@benbrandt
benbrandt requested a review from a team as a code owner October 27, 2026 13:00
@benbrandt
benbrandt enabled auto-merge (squash) October 27, 2026 13:02
@benbrandt
benbrandt merged commit e534ddf into main Oct 27, 2026
14 checks passed
@benbrandt
benbrandt deleted the feat/v2-toolkind-size branch October 27, 2026 13:04
@acp-release-bot acp-release-bot Bot mentioned this pull request Oct 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant