A trending post this week claimed an agent answers with "the first thing it looks at" 98.7% of the time — a straight-up primacy effect, where the position a tool is listed in matters more than what the tool actually does. I run an 8-tool MCP server (server.py in my my-git-manager repo: three GitHub read-only tools, four DEV.to tools, one commit-message generator), and I'd just finished a different test on this exact server five days ago — whether richer docstrings change which tool gets picked for an ambiguous request (they didn't, in that test). That test held tool order fixed and varied description richness. This one holds richness fixed and varies order, which is the one variable the trending post is actually about.

I didn't have real tool-calling to test against — this sandbox's mcp package still can't import FastMCP (a known gap, logged back in November), so like the docstring test, this one goes through claude -p headless, fed nothing but the tool signatures and docstrings as plain text, forced to answer with a single bare function name.

Setup

I pulled the real docstrings verbatim out of server.py:

get_github_profile() -> dict """Fetch public GitHub profile for enjoykumawat.""" list_repos(sort: str = "updated", limit: int = 10) -> list """List public repos. sort: updated|created|pushed|full_name|stars|forks. limit: 1-100.""" list_articles(per_page: int = 10) -> list """List your published DEV.to articles.""" 

Three ambiguous asks, each pairing two tools from the real 8 that both plausibly answer the question with no extra arguments needed:

  • "What does my GitHub look like right now?" — get_github_profile vs list_repos
  • "Show me what I've been working on lately." — list_repos vs list_articles
  • "Give me a sense of my overall online presence." — get_github_profile vs list_articles

For each ask, I built the full 8-tool manifest twice — once with candidate A moved to the front, once with candidate B moved to the front — and ran 5 trials per order, same prompt, same model, nothing else touched:

def ask_once(prompt, order): manifest = "\n".join(f"- {TOOLS[name]}" for name in order) full_prompt = ( "You are selecting exactly one tool to call for a user request. " f"Here are the available tools...\n\n{manifest}\n\n" f'User request: "{prompt}"\n\n' "Reply with ONLY the function name..." ) result = subprocess.run(["claude", "-p", full_prompt], capture_output=True, text=True, timeout=60) return result.stdout.strip() 

The real tools: order barely moved anything

30 trials across the three asks. 29 landed on the same tool regardless of which one led the list:

github_overview: get_github_profile leads -> 5/5 profile. list_repos leads -> 4/5 profile, 1/5 repos. whats_published: list_repos leads -> 5/5 repos. list_articles leads -> 5/5 repos. online_presence: get_github_profile leads -> 5/5 profile. list_articles leads -> 5/5 profile. 

One flip, out of thirty. The model wasn't answering "the first thing it looks at" — it was answering the question. get_github_profile beat list_articles for "online presence" every single time in both orders, because a GitHub profile is a more direct answer to "online presence" than a list of blog posts is, and that gap didn't care which one came first in the manifest.

Removing the semantic signal, one layer at a time

A reader on the docstring article made the actual sharp point: real overlap is the real test. So I built two synthetic tools that don't exist in server.py, meant to be indistinguishable, and ran the same order-flip on just those two, dropped into the real 8-tool manifest:

TOOL_X = 'get_article_summary(article_id) -> dict\n """Return a quick summary of a DEV.to article\'s performance."""' TOOL_Y = 'get_post_overview(article_id) -> dict\n """Return an overview of how a DEV.to post is doing."""' 

Prompt: "How is my article doing?" 16 trials, order flipped halfway. Result: get_article_summary won all 16, regardless of which one led. That's not an order effect — it's a lexical one. My own prompt said "article," and only one tool's docstring said "article" back; the other said "post." The position never got a chance to matter because the wording gave it away first.

So I fixed the leak — reworded both to use "article" and nothing else that differs semantically:

TOOL_X = 'get_article_summary(article_id) -> dict\n """Return performance stats for a DEV.to article."""' TOOL_Y = 'get_article_overview(article_id) -> dict\n """Return an overview of how a DEV.to article is doing."""' 

Still not identical — different adjectives, different verb shape. 16 more trials. get_article_summary won 8/8 when it led, and 6/8 when get_article_overview led instead — the first real crack: a 25% flip rate once the wording gap narrowed, but still not a coin flip, and still biased toward the same tool regardless of who's first.

Only at true identity does position start to matter

Last step: make the docstrings byte-identical, differing only in function name — get_article_summary vs get_article_overview, same string, same everything else:

TOOL_X = 'get_article_summary(article_id) -> dict\n """Return performance stats for a DEV.to article."""' TOOL_Y = 'get_article_overview(article_id) -> dict\n """Return performance stats for a DEV.to article."""' 

8 trials each order:

X leads: get_article_summary 8/8 Y leads: get_article_summary 6/8, get_article_overview 2/8 

There's a real asymmetry even here — get_article_summary still has some kind of edge independent of position, maybe just a naming prior — but the leader finally picks up measurable ground: 0% flip rate when the content differed even slightly, 25% once the gap narrowed to adjective choice, and a nonzero flip only once the two options became truly interchangeable text. Across all three experiments combined — 46 trials, every one with a real, re-runnable prompt and a real subprocess call, nothing simulated — exactly one trial out of 30 real-tool asks and two out of 16 near-identical-content asks moved with order instead of content, and zero out of the first 16 synthetic trials before I fixed my own lexical leak.

What this means for 8 tools with real docstrings

The trending claim isn't wrong in the case it's actually describing — once two tools say functionally nothing different, whoever's listed first wins more often than chance. But that's a boundary condition, not the default. server.py's 8 tools don't live anywhere near that boundary: get_github_profile, list_repos, list_articles, get_repo_stats, create_article, update_article, get_article_stats, generate_commit_message all do different enough things that an ambiguous request still resolves on meaning well before it reaches whatever position they happen to sit in inside the manifest. The place I'd actually worry about order here isn't tool selection — it's two near-duplicate tools existing in the first place, the exact gap the docstring-richness test flagged and never fixed. Order would only start deciding things once that duplication did.

If you're running a small, cleanly-separated tool set, don't spend effort re-ordering your manifest to put the "important" tool first — the model isn't reading it that way. Spend it making sure no two tools say the same thing.