v1.14.1 — per-tool MCP forward-arg allowlist (all built-ins)#19
Merged
Conversation
Extends the v1.14.0 forward-arg stripping from filesystem-only to EVERY built-in
tool, and corrects an over-strip:
- ForwardArgAllowlist maps each built-in tool to its full legitimate arg surface:
send_email {to,subject,body}, run_command {cmd}, read_calendar {range}, plus the
full @modelcontextprotocol/server-filesystem tool set (read_file {path,head,tail},
edit_file {path,edits,dryRun}, search_files {path,pattern,excludePatterns}, etc.).
Any arg outside a tool's surface is stripped before forwarding.
- Fixes the v1.14.0 blanket fs key-set (path/source/destination/paths/content) which
would have dropped legitimate args of richer fs tools (edits, pattern, head/tail,
sortBy, excludePatterns) — strictness no longer breaks function.
- Custom-mapper tools not in the allowlist are forwarded unchanged (mapper owns the surface).
- NormalizeForForward restructured: fs path-canonicalization (under a root) then the
per-tool allowlist for any built-in.
Tests: non-fs strip (read_calendar), full-surface preservation (search_files keeps
pattern, strips unknown). 251 passing + 3 env-gated skipped.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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.
Extends the strict forward-arg allowlist to every built-in MCP tool (not just filesystem), and fixes a v1.14.0 over-strip. 251 passing + 3 env-gated skipped.
What
ForwardArgAllowlistlists each built-in tool's full legitimate arg surface —send_email{to,subject,body},run_command{cmd},read_calendar{range}, and the full@modelcontextprotocol/server-filesystemset. Args outside a tool's surface are stripped before forwarding, so an unrecognized/unchecked key can't be honored.path/source/destination/paths/content) would have dropped legitimate args ofedit_file(edits),search_files(pattern),directory_tree(excludePatterns),read_text_file(head/tail),list_directory_with_sizes(sortBy). Each tool now lists its real surface — strict and functional.Tests
Non_filesystem_forward_strips_unknown_args(read_calendar),Forward_allowlist_keeps_a_tools_full_arg_surface(search_files keepspattern, stripsevil). The live FS-E2E continues to exercise read/write.🤖 Generated with Claude Code