Keep MCP tool callback updates inside host executors - #804
Merged
Conversation
|
I hit an error while handling your request (Model unavailable on AI Gateway free tier: Free tier users do not have access to this model. Upgrade to paid credits at https://vercel.com/d?to=%2F%5Bteam%5D%2F%7E%2Fai%3Fmodal%3Dtop-up for unrestricted…). Please try again, rephrase, or reach out if it keeps failing. Error id: 5fe01166-83a8-424e-8dc5-71eb7f2bf7f3 |
Aymericr
force-pushed
the
fix/mcp-tool-update-executor-20260909
branch
from
September 9, 2026 19:17
f05b546 to
c2597da
Compare
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.
Description
RegisteredTool.update({ callback })could replace a regular tool handler after registration and bypass the host executor. Returned registrations from bothregisterTool()and deprecatedtool()now re-wrap callback replacements.String renames fail closed while
executeToolis configured. The SDK updater closes over the original name, so repeated renames and laterremove()cannot be made reliable through its public registration API. Failed rename attempts leave the original registered tool wrapped and removable. Experimental task-based tool registration remains outside this hook and is not used bycreatePascalMcpServer.Validation
bun test packages/mcp/src— 361 tests, 1,375 assertions passed.bunx ultracite check packages/mcp/src/server.ts packages/mcp/src/server.test.tsgit diff --checkscene-query.tsimplicit-any diagnostics and has no changed-file diagnostics.