MCP Shipyard
Docs menu
Docs

Selection gate

Fail a pull request when models stop picking your tools. How the shipyard selection command and the action's selection mode work, and how Grow tests descriptions and schemas.

A deploy can leave every test green and still make models stop calling your tools, because a description or schema changed. The selection gate measures that on each change.

A Claude Haiku-class model sees your tools, and optionally competitors' tools, as plain function tools. For each prompt it picks one tool or none. Each prompt runs --trials times (default 3), because models cannot be seeded. Share is the fraction of contested prompts (kinds owned and ambiguous) where your server was picked first, with a 95% Wilson interval. Tool order is a stable hash, so neither command-line order nor your edits move a tool's position.

Prompts file

[
  "who won the game last night",
  { "text": "NBA odds tonight", "kind": "competitor" },
  { "text": "write me a poem", "kind": "negative" }
]

Kinds: owned (your domain, you should win), ambiguous (the default for a plain string), negative (no tool should be called), competitor (a competitor's tool is the better answer). Negative and competitor prompts are not in the share. If your server takes one, it is counted as a false win.

CLI

# Write the baseline
shipyard selection https://mcp.example.com/mcp --prompts prompts.json \
  --competitor https://mcp.other.com/mcp --snapshot

# Check a preview against it
shipyard selection https://preview.example.com/mcp --prompts prompts.json \
  --competitor https://mcp.other.com/mcp \
  --baseline selection.json --min-share 0.8 --max-drop 0.05
FlagMeaning
--promptsPrompts file (required)
--competitorCompetitor MCP URL, repeatable
--trialsTrials per prompt, 1 to 20, default 3
--min-shareFail if share is below this (0 to 1)
--max-dropFail if share fell more than this against the baseline, absolute, default 0.05
--baselineBaseline file, default selection.json
--snapshotWrite the baseline instead of checking
--max-costSpend ceiling in USD, default 0.5
--modelOverride the default model
--json, --markdownMachine or pull-request output

Exit 1 when share is below --min-share, dropped more than --max-drop, or no trial succeeded. It needs ANTHROPIC_API_KEY. Keep the prompt set fixed between baseline and check, since the report flags a changed set. Set --max-drop above your run-to-run noise.

GitHub Action

- uses: mcpshipyard/check@v1
  with:
    mode: selection
    url: https://my-preview.vercel.app/mcp
    prompts: selection-prompts.json
    baseline: selection.json
    competitors: |
      https://mcp.other.com/mcp
    min-share: "0.8"
    max-drop: "0.05"
    anthropic-api-key: ${{ secrets.ANTHROPIC_API_KEY }}

Selection mode keeps its own pull request comment, separate from the scan comment. A missing baseline file is skipped with a note and the max-drop gate is off. See the GitHub Action.

How Grow tests changes

Grow uses the same trials. It proposes description rewrites and parameter-schema rewrites, measures each against the current best, and keeps a variant only if contested share rises by at least a minimum gain (one trial's worth by default). --significant tightens that to a variant whose uplift has a 95% interval that excludes zero. Schema changes stay backward compatible unless you pass --allow-breaking.

An honest note on what moves selection

The paper Which Metadata Matters for LLM Tool Selection in MCP? (arXiv 2610.14334) reports that parameter-schema changes shifted tool selection more than descriptions, with names weakest. In our own tests, tool descriptions moved selection more than schemas did. That is the opposite of the paper. Our tests are small and ran one model family on our own prompt sets, so we do not claim the paper is wrong. We do not know which result holds for your server, which is why Grow tests description, schema and combined variants and keeps whichever raises share.

Related: leaderboard, writing tool descriptions models pick.