mcptuner

MCP server optimization v0.1.0

Tool descriptions are prompts. Test them like it.

An agent picks a tool by reading its name, description, and parameter schema — metadata that is easy to get wrong and almost never tested. MCP Tuner sits between any host and any MCP server and scores that metadata, logs the wire traffic, and A/B tests the wording.

mcptuner audit https://docs.mcp.cloudflare.com/mcp docs-ai-search 0.4.13
  Descriptions  [PASS] C tool-description-present       every tool has a description  [WARN] M tool-description-when-to-use   2 descriptions say what it is, not when to reach for it         subjects: search_cloudflare_documentation, migrate_pages_to_workers_guide  Input schema  [FAIL] H param-description-present      1 parameter undescribed         subjects: search_cloudflare_documentation.query         fix: describe each param — missing param descriptions degrade call correctness  Annotations  [PASS] H tool-annotations-present       tools declare annotations  [SKIP] H tool-destructive-hint          no tool is explicitly marked non-read-only  21 pass · 3 warn · 1 fail · 3 skip

Fleet scan · 2026-08-30

Five servers, scanned cold

Every number below came from running mcptuner audit against the live endpoint. No server was modified, and none was told it was being measured.

Server Tools Score C/H fails Warns Tool-list tokens
Microsoft Learnlearn.microsoft.com/api/mcp 3 97% 0 2 ~1215
icanhazdomainmcp.icanhazdomain.com 1 97% 0 2 ~962
Cloudflare docsdocs.mcp.cloudflare.com 2 93% 1 3 ~449
everything (reference)@modelcontextprotocol/server-everything 13 87% 2 3 ~1914
ipfactsmcp.ipfacts.com 0 69% 1 1 ~1
Score weights failures by severity (Critical 8 · High 4 · Medium 2 · Low 1), half-weight for warnings, skipped rules excluded. Token counts are chars/4 estimates, not a provider tokenizer.

What the scan found

Three findings worth the run

server-tools-nonempty FAIL · High mcp.ipfacts.com

The server declares the tools capability and then returns an empty list. Every host that connects shows a server with nothing in it. Either an auth gate is rejecting the listing silently or tool registration is broken — and no client-side error surfaces either way.

param-description-present FAIL · High docs.mcp.cloudflare.com

The query parameter of search_cloudflare_documentation has no description. The model is left inferring what to put in the one field that determines the result — the most common cause of a correct tool being called with the wrong argument.

tool-description-when-to-use WARN · Medium 4 of 5 servers

Descriptions state what a tool is without stating when to reach for it. The trigger clause is the part a model matches against when several tools could plausibly apply, and it is the single most common omission across the fleet.

Modes

Measure first, then experiment

Audit and observe need no API key and no model — they are deterministic and free to run in CI. Tune and compare need an agent driver, and are specified but not yet built.

auditshipped

Scores tool, prompt, and resource metadata against a 28-rule catalog over stdio or Streamable HTTP. Exits non-zero on Critical or High failures, so it gates a build.

observeshipped

A transparent proxy between host and server. Logs every JSON-RPC frame to JSONL, scrubs secrets on the way to disk, and forwards bytes untouched.

tunespecified

A/B tests one variable at a time — a name, a description, a schema — across repeated trials, and reports selection accuracy and token cost with a confidence interval.

comparepartial

Static scoreboard across servers works today. The live arena — two servers with overlapping tools, measuring which an agent actually prefers — waits on the harness.

The rubric

Rules, not opinions

Each rule has an id, a severity, a machine-checkable condition, and a fix. Status is four-valued — PASS, FAIL, WARN, SKIP — and a rule is never silently dropped: every non-pass carries a reason, enforced by a unit test. Heuristics report WARN rather than FAIL, because a heuristic must not be presented as certainty.

idsevcheck → passfix
tool-description-distinctH no two descriptions exceed 0.9 token-set similarity Differentiate — near-identical descriptions are the top cause of wrong-tool selection.
param-description-presentH every property has a non-empty description Describe each param; omissions measurably degrade call correctness.
tool-readonly-hintH annotations.readOnlyHint set explicitly An unmarked write is indistinguishable from a read on the wire.
tool-description-no-injectionH no imperatives aimed at the calling model Descriptions describe. They never instruct the caller.
schema-not-closedM additionalProperties is not false Prefer a corrective error message — it is the model's entire self-correction channel.
toollist-token-budgetM serialized tools/list under 10k tokens Fixed cost, paid on every single request. Trim or split.
6 of 28 rules. Severity: Critical · High · Medium · Low.

Invariants

What the tool refuses to do

Start

Point it at a server

# score a remote server — no key, no model
mcptuner audit https://mcp.example.com/mcp

# score a local stdio server, gate CI on Critical/High
mcptuner audit -- npx -y @modelcontextprotocol/server-everything

# log every frame between a host and a server
mcptuner log --out traffic.jsonl -- npx -y your-mcp-server