◉ANTIGRAVITY LABJP
Articles/Integrations
⬡ Integrations/2026-07-28Advanced

Three Tools Named read_file: Catching MCP Name Collisions Before Startup

Bundle enough MCP servers and tool names collide quietly. Here is what a real 5-server, 21-tool setup measured at 43% collision, plus a Python preflight that catches them before startup and assigns deterministic aliases.

MCP29Antigravity399Agent Operations8DesignCLI7

✦ Premium Article

I asked the agent to read an attached spec and summarize the diff.

What came back was the contents of a completely different file — a JSON sitting in my local working directory that happened to have a vaguely similar name.

The agent did not think it had made a mistake. The log showed a call to read_file, a successful response, and a summary built from that response. Nothing had failed.

It took counting my own config to understand why. There were three tools named read_file in my setup, on three different servers.

The initialization stopped failing, and that made the failure quiet

Antigravity 2.0 (the app) version 2.4.3, released July 28, 2026, fixed a bug where duplicate tool names in customizations (such as MCP servers) caused the agent to fail to initialize. The details are in the Antigravity changelog.

As a fix, that is the right direction. A single typo in a config file taking down startup is a poor fit for unattended operation.

For me, though, the outcome ran opposite to what I expected.

Before the fix, a collision announced itself loudly at startup. Something was obviously wrong. After the fix, startup succeeds, the tool list assembles, the agent runs — and one tool quietly shadows the other.

The failure mode shifted from "stops" to "returns the wrong answer." Operationally, the second one is far worse. You notice the thing that stops. You can go days without noticing the thing that returns something plausible.

Since then, I run a collision check every time I add an MCP server.

Collisions come in three layers

Once I started counting, "names that clash" turned out to cover several genuinely different situations. Without separating them, there is no clean line between what a machine can fix and what a person has to decide.

Exact matches

read_file versus read_file — identical as strings. A machine can detect these with certainty and rename them without breaking any meaning. This is the automation target.

Semantic proximity

read_file versus get_file_contents — different names, nearly identical roles. From the agent's point of view, either choice works, which is exactly the problem.

These cannot be renamed automatically. The question shifts to design: do you actually need both? Detecting them and putting them in front of a human is where the machine's job ends.

Overlapping descriptions

Different names, different roles, but description fields that open the same way. Agents use descriptions for tool selection too, so similarity here makes selection wobble.

The third layer is not fully reachable by static inspection. The preflight below automates layer one, warns on layer two, and leaves layer three alone.

✦

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
✦A real 5-server, 21-tool setup where 43% of tool names collided across servers
✦A Python preflight that fails before startup — 28 ms across 305 tools, byte-identical output regardless of key order
✦Prefixing every tool inflates total name length by 76%; prefixing only collisions holds it to 35%
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

Antigravity 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

⬡ Integrations2026-09-18
When a session starts with MCP tools missing, where do you stop?
When MCP initialization fails at startup, the agent quietly falls back to other means and keeps going. Here is a small script that asks your servers directly which tools they expose, plus the three branches I decided on in advance for when something is missing.
⬡ Integrations2026-08-03
I Measured Before Writing a Number: MCP Connect and Tool Calls Differed by 486x
Antigravity 2.4.3 lets you set a timeout per MCP server. To find a defensible number I built a stdio server, measured each boundary separately, and found why a single value cannot cover both.
⬡ Integrations2026-10-22
The Project-Local mcp_config.json Is Read, but No MCP Server Starts — Checking With a One-File Probe
Antigravity CLI logs that it is using a project-local config, yet the MCP servers in it never start. Based on reports in the official repository, here is what that log line may and may not promise, plus a tiny probe server you can use to check your own setup.