Skip to content

Fix MCP tool name parsing: use newline delimiter instead of colon#48636

Merged
rtfeldman merged 1 commit intomainfrom
pr/mcp-tool-name-delimiter
Feb 6, 2026
Merged

Fix MCP tool name parsing: use newline delimiter instead of colon#48636
rtfeldman merged 1 commit intomainfrom
pr/mcp-tool-name-delimiter

Conversation

@rtfeldman
Copy link
Contributor

@rtfeldman rtfeldman commented Feb 6, 2026

MCP tool names can contain colons (e.g. mcp:server:tool), which broke the splitn(3, ':') parsing of always-allow/always-deny pattern option IDs. This switches to newline (\n) as the delimiter between tool name and pattern, since newlines cannot appear in either component.

Changes

  • Option ID format: Changed from always_allow_pattern:{tool}:{pattern} to always_allow_pattern:{tool}\n{pattern}
  • Response parsing: Replaced splitn(3, ':') with strip_prefix + split_once('\n')
  • Error logging: Added log::error! when pattern parsing fails (previously silent)
  • Tests: Updated test assertions in agent and agent_ui crates

No release notes because granular tool permissions are still feature-flagged.

Release Notes:

  • N/A

MCP tool names can contain colons (e.g. mcp:server:tool), which
broke the splitn(3, ':') parsing of always_allow/always_deny pattern
option IDs. Switch to newline as the delimiter between tool name
and pattern, since newlines cannot appear in either.
@cla-bot cla-bot bot added the cla-signed The user has signed the Contributor License Agreement label Feb 6, 2026
@zed-community-bot zed-community-bot bot added the staff Pull requests authored by a current member of Zed staff label Feb 6, 2026
@rtfeldman rtfeldman marked this pull request as ready for review February 6, 2026 22:19
@rtfeldman rtfeldman merged commit cab418a into main Feb 6, 2026
36 checks passed
@rtfeldman rtfeldman deleted the pr/mcp-tool-name-delimiter branch February 6, 2026 22:31
naaiyy added a commit to Glass-HQ/Glass that referenced this pull request Feb 16, 2026
Key changes:
- LSP folding ranges support (zed-industries#48611) - textDocument/foldingRange with custom fold text
- LSP refactoring (zed-industries#48604) - extracted document_colors, code_lens, folding_ranges into modules
- Crate graph restructuring (zed-industries#48602) - terminal moved closer to editor
- Side-by-side diff searching (zed-industries#48539) and OpenExcerpts for LHS (zed-industries#48438)
- SplittableEditor: sync custom blocks between RHS/LHS (zed-industries#48575)
- Thinking effort for Zed/OpenAI providers (zed-industries#48545, zed-industries#48605)
- Agent default_model.enable_thinking setting (zed-industries#48536)
- Configurable LSP timeout setting (zed-industries#44745)
- PaneSearchBarCallbacks global (search bar setup extracted from vim)
- Settings migrations for nested platform/channel/profile keys (zed-industries#48550)
- Shell parser: I/O redirects, here-documents, compound commands (zed-industries#48635)
- Hardened tool authorization: sensitive settings, deferred ops (zed-industries#48641)
- rm security bypass fixes (zed-industries#48640, zed-industries#48647)
- MCP tool name parsing fix: newline delimiter (zed-industries#48636)
- Canonicalize --user-data-dir path (zed-industries#48470)
- Fix text_threads_dir XDG spec compliance (zed-industries#45771)
- Buffer font for folds (zed-industries#48652)
- Multibuffer toolbar layout shift fix (zed-industries#48472)
- Editor: tabs bitmask syncing (zed-industries#48366)

Conflict resolution:
- collab tests: deleted (collab removed)
- util/archive.rs, util/shell.rs: deleted (extracted to Obsydian)
- copilot_ui/sign_in.rs: kept native_button style
- editor_tests.rs: merged imports (kept MoveItemToPaneInDirection, added ViewId/FollowEvent)
- lsp_store.rs: took upstream refactored imports, added FoldingRangeData, removed collab imports
- main.rs: added PaneSearchBarCallbacks, removed vim::init

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cla-signed The user has signed the Contributor License Agreement staff Pull requests authored by a current member of Zed staff

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant