◉CLAUDE LABJP
●CC 2.1.332 — No new Claude Code release over the weekend. 2.1.332 (11/25) is still current●ANALYTICS — A fix to search counts in the Enterprise Analytics API may raise numbers from 11/17 onward●SONNET 4.5 — Today, 11/30, is Sonnet 4.5's last day on the Claude API. Move to claude-sonnet-5-5●USAGE — Some users report weekly usage jumping right after upgrading to a higher plan●NEW — New: Does what a Project remembers carry over into your everyday chats?●BILLING — More readers are looking for what to check when a payment won't go through●CC 2.1.332 — No new Claude Code release over the weekend. 2.1.332 (11/25) is still current●ANALYTICS — A fix to search counts in the Enterprise Analytics API may raise numbers from 11/17 onward●SONNET 4.5 — Today, 11/30, is Sonnet 4.5's last day on the Claude API. Move to claude-sonnet-5-5●USAGE — Some users report weekly usage jumping right after upgrading to a higher plan●NEW — New: Does what a Project remembers carry over into your everyday chats?●BILLING — More readers are looking for what to check when a payment won't go through
Articles/API & SDK
⬡ API & SDK/2026-05-20Advanced

Resolving Tool Name Collisions When You Bundle MCP Servers for the Claude API — and When the Agent SDK Already Does It for You

When the GitHub MCP and Linear MCP both expose create_issue, the model cannot tell them apart. This covers when the Agent SDK's automatic mcp__ prefix is enough and when your own bundling layer needs a reconciler, a TypeScript implementation with a runnable test, and a measured correction: the schemaHash I originally published missed all five schema drifts I tested it against.

Claude Agent SDK13MCP63TypeScript24Production23Namespacing

✦ Premium Article

The day I plugged the GitHub MCP and the Linear MCP into an agent where my own MCP client gathered the tools and handed them straight to the Messages API, Sonnet 4.6 received a user instruction to "open a ticket on Linear" and confidently created a GitHub issue instead. Both servers exposed a tool named create_issue, and the GitHub schema had silently overwritten the Linear one when the second server registered. I only found the cause after dumping the exact tools array my bundling layer was about to send.

Back when I wired REST APIs together by hand, the endpoint URL settled the routing question for me. MCP removes that handle. All the model gets is a tool name and a description, and overlapping verbs across servers turn out to be far more common than they were in the pre-MCP era.

What follows is the namespace design and the TypeScript reconciler I now use. It also corrects something: the schemaHash I originally published here was broken, and I only noticed months later. The correction comes with measurements.

First, a correction: the Agent SDK already namespaces MCP tools

Rereading the official docs for this revision, I owe you a correction up front. When you register servers through the Claude Agent SDK's mcpServers option, MCP tools reach the model as mcp__<server-name>__<tool-name> (checked against the Agent SDK page "Connect to external tools with MCP", November 2026). A list_issues tool on a server registered as github becomes mcp__github__list_issues, and dots or spaces in the server name are replaced with _. If the SDK owns the server connections, cross-server name collisions mostly can't happen.

My incident happened somewhere else: in a bundling layer where I ran my own MCP client and pushed the list_tools results directly into the tools array of the Messages API via @anthropic-ai/sdk. The original title said "Agent SDK", but that second setup is where a reconciler actually earns its place. I'm sorry for blurring the two.

SetupName the model seesCross-server collisionsReconciler in this article
Servers registered in the Agent SDK's mcpServersmcp__github__create_issue (added by the SDK)UnlikelyNot needed. Use the full names in allowedTools
Your own MCP client + Messages API toolsWhatever the MCP server returnedYesNeeded
Your own bundle mixing MCP tools with tools you defineYour names and MCP names in one arrayYes, including with your own toolsNeeded

The deciding question is simple: does your code assemble the tools array right before it goes to the API? If it does, naming is your job. If the SDK does it, your attention is better spent writing the full mcp__ names correctly in allowedTools and permission rules.

Everything below assumes the do-it-yourself setup.

How tool name collisions actually happen

In a do-it-yourself bundle, everything up to the tools array of the Messages API is your responsibility. Each tools[].name must match ^[a-zA-Z0-9_-]{1,128}$ (official "Define tools" page, checked November 2026), so only letters, digits, underscores, and hyphens are allowed. What the API does if you send the same name twice is not documented, and I haven't verified it. In my layer, the step that folded per-server lists into a Map kept the last entry, so the earlier server's tool vanished silently.

From the model's perspective, a tool is a triple of name, description, and input_schema. If two tools with the same name get collapsed before the request leaves your process, the model never sees the duplicate. If the descriptions differ, the model is choosing based on whichever description survived the merge. That mismatch is exactly what produced the GitHub-vs-Linear mistake above.

The official "Troubleshooting tool use" page lists tool name collisions and overly generic schemas as the first suspects when Claude never calls your tool. Counting duplicates in your list looks like a detour, and it is usually the shortest path.

Typical collision-prone verbs include:

VerbLikely MCP servers
create_issueGitHub MCP / Linear MCP / Jira MCP
searchNotion MCP / Slack MCP / Web Search MCP
uploadS3 MCP / Cloudflare R2 MCP / Stripe Files MCP
send_messageSlack MCP / Discord MCP / SendGrid MCP

In my own setup, having three or more of these servers alive in a single agent session is the default rather than the exception. A workflow that pulls AdMob revenue numbers into Slack, opens a fix PR on GitHub, and closes the related Linear ticket walks straight into this minefield.

✦

Thank you for reading this far.

Continue Reading

What follows includes implementation code, benchmarks, and practical content we hope you'll find useful. This site runs without ads — server and development costs are supported entirely by members like you. If it's been helpful, we'd be truly grateful for your support.

WHAT YOU'LL LEARN
✦The Agent SDK's mcpServers names tools mcp__<server>__<tool> for you, while dotted names that the MCP spec allows still fail the Messages API — a table for deciding which setup actually needs a reconciler
✦Observed misfire patterns when GitHub MCP and Linear MCP both ship create_issue, and whether the model relies more on name or description
✦A TypeScript Reconciler that prefixes only colliding tool names with double underscores and returns a bidirectional alias map
✦A measured correction: the schemaHash originally published here misused the JSON.stringify replacer and reported all five tested schema drifts as identical, plus a recursive canonicalization that fixes it
Secure payment via Stripe · Cancel anytime
✦

Unlock This Article

Get full access to the rest of this article. Buy once, read anytime. This site is ad-free — your support goes directly toward keeping it running.

or
Unlock all articles with Membership →
Share

Thank You for Reading

Claude Lab is ad-free, supported entirely by members like you. We publish practical guides daily with implementation code, benchmarks, and production-ready patterns. If you've found it useful, we'd love to have you on board.

  • ✦Copy-paste ready implementation code
  • ✦New advanced guides published daily
  • ✦$5/mo or $10 for lifetime access
View Membership →

Related Articles

⬡ API & SDK2026-05-04
Claude API on Bun in Production: Migration Decisions and Implementation Patterns That Actually Survive Real Traffic
A practical guide to running Claude API services on Bun in production. Covers migration triggers from Node.js, built-in SQLite/WebSocket usage, streaming optimization, and the pitfalls that only surface after deployment — with working code and measured numbers.
⬡ API & SDK2026-04-25
Claude API × Convex: Reactive AI Apps — Data Flow, Streaming, and Agent Patterns
How to combine Convex's reactive database with the Claude API to build chat and agent applications that hold up in production. Covers schema design, the Action/Mutation/Query boundary, streaming, tool-call state, and the cold-start pitfalls nobody warns you about.
⬡ API & SDK2026-04-22
Building Fault-Tolerant Long-Running AI Workflows with Claude Agent SDK × Temporal.io — A Production Design Guide to Durable Execution and Saga Patterns
A complete production guide to combining Claude Agent SDK with Temporal.io to build AI workflows that survive crashes, restarts, and multi-day human approval gates. Durable Execution, retry policies, saga compensation, and signal integration patterns.