Repository navigation
Decode McpServer tool parameters with their JSON codec - #10332
Merged
Merged
Conversation
🦋 Changeset detectedLatest commit: 5d25056 The changes in this PR will be included in the next version bump. This PR includes changesets to release 33 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
Contributor
Bundle Size AnalysisGenerated from PR build output; treat the content below as untrusted.
|
effect-bot
force-pushed
the
tool-params-json
branch
from
November 3, 2026 19:31
f966a96 to
71fc648
Compare
tim-smart
force-pushed
the
v4/next-minor
branch
from
November 3, 2026 20:54
2e13c53 to
5f5a4b3
Compare
Move the Schema.Date regression from McpServer to Toolkit.handle and add an Anthropic case for provider-normalized params. The Anthropic case fails until providers re-encode params with the JSON codec.
…l and providers Providers re-encode normalized params with the JSON codec, approval checks decode it, and the encoded parameter mode exposes it for non-provider-defined tools. Provider-executed calls keep the raw schema because their params are the provider payload.
…coder reuse and encoded types The LanguageModel runtime cases and the type test fail until encoded-mode validation uses the JSON codec for locally handled provider-defined tools, the decoder cache keys on that choice, and encoded params are typed as JSON.
Only provider-executed tools keep the raw parameter schema in encoded mode, the response decoder cache keys on that choice, and encoded tool call params are typed as their JSON encoding.
Fails until encoded tool call params of locally handled tools use the JSON codec's encoded type instead of inferring an unchanged encoding from the raw type.
Encoded tool call params of locally handled tools are typed as Schema.Json, the JSON codec's encoded type. Fails until Response types them that way.
The JSON codec can change a JSON-compatible raw encoding (Schema.Number encodes non-finite values as strings), so locally handled tool calls use the codec's declared encoded type. Provider-executed tools keep the raw encoded type.
Encoded tool call params of locally handled tools are typed as Schema.Json.
…dler flag Fails until a provider-defined tool whose requiresHandler is typed as boolean keeps its raw encoded parameters in the encoded tool call type, alongside Schema.Json.
…l handler flag A provider-defined tool whose requiresHandler is typed as boolean may be provider-executed at runtime, so its encoded tool call params are typed as the raw encoded parameters or Schema.Json. Literal false and true keep their precise types.
effect-bot
force-pushed
the
tool-params-json
branch
from
November 3, 2026 21:10
ef97c07 to
ab62eab
Compare
1 of 5 tasks
This branch is waiting to be deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Type
Description
Use the JSON codec to decode tool parameters, e.g. Schema.Date would accept ISO strings.
Related
McpServertool parameters should be decoded with their JSON codec #10331