fix(mcp): stop the stdio proxy gating tools/call in defer mode#247
Merged
Conversation
Contributor
Author
How to reproduce
(The sleeps just keep stdin open long enough for the async responses to come back.)
Note it comes back instantly — the proxy synthesizes the error locally in |
Owner
|
Good catch @vitaliyslion! Merged. |
3 tasks
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.
Summary
The stdio proxy (gortex mcp --tools / GORTEX_TOOLS) hard-blocked tools/call to any tool outside the configured surface regardless of --tools-mode, contradicting the flag's own help text ("defer (keep reachable via tools_search)"). In defer mode a client that calls tools_search gets its matches promoted server-side, but the proxy then synthesized a -32601 for every call to them — promotion worked, calling the promoted tool didn't.
Reproduced live: with GORTEX_TOOLS=core GORTEX_TOOLS_MODE=defer on the proxy, tools_search query:"select:taint_paths" promote:true succeeded, but the follow-up tools/call taint_paths came back tool "taint_paths" is not available in this client's tool set (gortex mcp --tools).
The fix mirrors the server-side defer semantics on the proxy: defer trims tools/list but never gates calls; hide (the default) keeps blocking both, unchanged.
Changes
Testing
go test -race ./...)Checklist
Meta["methods"]for interfaces (if applicable)EdgeMemberOfedges to their containing type (if applicable)