How good a tools.json is before any agent uses it. It has two halves: numbers computed by code, and a pass/fail review by a person. The week 3 tool-use eval measures whether a design actually helps an agent. This one says what a design costs and whether it is fit to approve.
The rules were approved on 2026-11-24, before any design prompt was written (#29).
docs2mcp measure tools.json --spec spec.json --out <file> computes them. The rules are in src/docs2mcp/evals/design.py.
| Metric | Meaning |
|---|---|
valid |
validate_toolset finds no problems (ADR 0011). The problems are listed. |
covered / excluded / endpoints |
Spec endpoints reached by a route, excluded with a reason, and in the spec. A valid design always has covered + excluded = endpoints. |
tools, routes, max_routes_per_tool |
What the design contains. |
parameters_exposed / parameters_total, unexposed |
Every parameter of every routed endpoint, counted once per route, and how many a route fills from an argument or a constant. unexposed lists the rest as endpoint.parameter: the agent cannot use them. Added on 2026-11-24, after live runs showed designs dropping optional parameters that validation does not require. |
tool_list_tokens |
Estimated tokens an agent loads before its first call: every tool's name, description and argument schema, as JSON in the shape of an MCP tools/list reply. |
description_tokens |
The prose part of that: tool and argument descriptions. |
per_tool |
Routes, arguments and estimated tokens for each tool, to find the heavy ones. |
Token counts use the same four-characters-per-token estimate as chunking. They are good for comparing designs, not exact for any one model.
Fewer tools and fewer tokens are not a goal on their own. A design that merges unrelated endpoints to cut the count fails the review below, however good its numbers look.
A person reviews every task-shaped design with checklist.md and saves the answers as reviews/<id>.md. Claude may draft the answers, and the owner confirms or changes each one; a review counts only once it is confirmed. Each question is pass or fail, with the tool names that fail it. A design is fit to approve only when every question passes.
Open Library is held out: the design prompt is never changed because of an Open Library result. Its numbers and review are reported on their own line, so an improvement seen only on the tuned APIs shows up as overfitting.
Designs are measured on frozen specs, so only the design step differs between runs:
| API | Spec |
|---|---|
| PokéAPI, Frankfurter, Postcodes.io | tests/fixtures/specs/<id>.json (committed; the replay of evals/extraction/replay/<id>/) |
| Open-Meteo forecast, Open-Meteo geocoding, Open Library | specs/<id>/cache/run1/spec.json on the owner's machine: the run recorded in evals/extraction/results/<id>.json. Not committed, because these docs are AGPL. |
results/<id>/direct.json is the baseline: the one-tool-per-endpoint design, made by code with no model. Each file has a run block naming its input. tests/unit/test_evals_design.py recomputes the three committed baselines and fails if they drift.
| API | Endpoints | Tools | Routes | Parameters exposed | Tool list (est. tokens) | Descriptions (est. tokens) |
|---|---|---|---|---|---|---|
| PokéAPI | 103 | 103 | 103 | 154 / 154 | 9,601 | 4,986 |
| Postcodes.io | 14 | 14 | 14 | 34 / 34 | 1,753 | 944 |
| Frankfurter | 9 | 9 | 9 | 27 / 27 | 968 | 425 |
| Open-Meteo forecast | 1 | 1 | 1 | 26 / 26 | 890 | 444 |
| Open-Meteo geocoding | 2 | 2 | 2 | 7 / 7 | 328 | 179 |
| Tuned total | 129 | 129 | 129 | 248 / 248 | 13,540 | 6,978 |
| Open Library (held out) | 11 | 11 | 11 | 22 / 22 | 1,094 | 536 |
Every baseline design is valid, covers every endpoint, excludes none and exposes every parameter.
On 2026-11-24 the #36 extraction fixes changed three input specs: Postcodes.io's merged operations, Open-Meteo's latitude type and Open Library's jscmd values. Those three baselines were recomputed. Before that, the tuned total was 13,481 tokens and Open Library's was 1,091. Results recorded earlier, and the history below, were measured against the old specs.
results/<id>/task.json is run 1 of docs2mcp design with claude-sonnet-5-5 (ADR 0012), with its run details. Its repeats block holds all three Sonnet runs and three Haiku runs on the same inputs. The reviews in reviews/<id>.md judge these Sonnet designs. The CI replay folders held them until the no-extra-claims change below, which replaced them with Haiku recordings.
| API | Tools | Routes | Parameters exposed | Excluded | Tool list (est. tokens) | Sonnet runs 1 / 2 / 3 | Haiku runs 1 / 2 / 3 | Review |
|---|---|---|---|---|---|---|---|---|
| PokéAPI | 52 | 103 | 154 / 154 | 0 | 6,023 | 6,023 / 6,539 / 7,288 | 8,128 / 6,975 / 8,102 | not yet: 3 extra claims |
| Postcodes.io | 11 | 14 | 32 / 34 | 0 | 1,488 | 1,488 / 1,486 / 1,502 | 1,585 / 1,583 / 1,671 | not yet: spec bug in bulk |
| Frankfurter | 4 | 8 | 27 / 27 | 1 | 890 | 890 / 758 / 723 | 908 / 977 / 1,027 | fit to approve |
| Open-Meteo forecast | 1 | 1 | 25 / 26 | 0 | 948 | 948 / 900 / 961 | 996 / 1,009 / 1,004 | fit to approve |
| Open-Meteo geocoding | 1 | 2 | 7 / 7 | 0 | 358 | 358 / 360 / 368 | 304 / 332 / 309 | not yet: 1 extra claim |
| Tuned total | 69 | 128 | 245 / 248 | 1 | 9,707 | 9,707 / 10,043 / 10,842 | 11,921 / 10,876 / 12,113 | |
| Open Library (held out) | 10 | 11 | 22 / 22 | 0 | 1,143 | 1,143 / 1,117 / 1,170 | 1,251 / 1,399 / 1,192 | not yet: an enum hint, extra claims |
Every Sonnet design is valid and needed no repair. Two of 18 Sonnet designs needed a retry, both on held-out Open Library. On the tuned APIs, Sonnet exposed 245 or 246 of 248 parameters, against 240 to 244 for Haiku. Haiku's runs predate the constant type check, which rejects its run 3 Postcodes.io design.
The reviews failed PokéAPI, Open-Meteo geocoding and Open Library on question 7: descriptions added true but unsupported details such as "(TM/HM)". The design prompt now says descriptions only restate and combine the spec's text. To save credits, it was measured on claude-haiku-5-5 only: three runs before and three after, on the same specs. results/<id>/task_haiku.json holds both sets.
"Unsupported claims" counts tools whose description states something the spec does not. A word screen against the spec text found the candidates, and each candidate was judged by hand against question 7.
| API | Tools with unsupported claims, before → after | Tool list (est. tokens), before → after | Parameters exposed, after |
|---|---|---|---|
| PokéAPI | 1 / 1 / 8 → 0 / 0 / 0 | 8,128 / 6,975 / 8,102 → 7,282 / 6,649 / 6,946 | 154 / 154 every run |
| Open-Meteo geocoding | 1 / 0 / 0 → 0 / 0 / 0 | 304 / 332 / 309 → 281 / 311 / 350 | 5, 7, 7 of 7 |
| Postcodes.io, Frankfurter, Open-Meteo forecast | none found in spot checks after | tuned total below | unchanged range |
| Tuned total | 11,921 / 10,876 / 12,113 → 11,044 / 10,521 / 10,881 | 240 / 244 / 241 → 240 / 244 / 242 of 248 | |
| Open Library (held out) | 5 / 7 / 4 → 1 / 1 / 2 | 1,251 / 1,399 / 1,192 → 1,156 / 1,259 / 1,141 | 21 or 22 of 22 |
All 18 designs after the change are valid and needed no repair. Two of them needed one retry. Before the change, 1 of 18 was invalid under the constant type check.
The CI replay designs in replay/<id>/ are now Haiku run 1 after the change, because the old Sonnet recordings no longer match the prompt. The rule has not been run on Sonnet, which is still the default, so the Sonnet results above describe the earlier prompt.
| Date | Change | Design | Tuned: tools / parameters / tokens | Open Library: tools / parameters / tokens | Review |
|---|---|---|---|---|---|
| 2026-11-24 | Baseline (#29) | direct, no model | 129 / 248 of 248 / 13,481 | 11 / 22 of 22 / 1,091 | not reviewed (no grouping to judge) |
| 2026-11-24 | First task-shaped design (#29), before the parameter rule | Haiku, run 1 | 70 / 228 of 248 / 11,188 | 9 / 22 of 22 / 1,259 | not reviewed: optional parameters dropped (Open-Meteo forecast 14 of 26) |
| 2026-11-24 | Every parameter passed or omitted (ADR 0012) | Sonnet, run 1 of 3 | 69 / 245 of 248 / 9,707 | 10 / 22 of 22 / 1,143 | confirmed: 2 of 5 tuned fit to approve (Frankfurter, Open-Meteo forecast); held out not yet |
| 2026-11-24 | No extra claims in descriptions (#39) | Haiku, run 1 of 3 (before: 11,921) | 69 / 240 of 248 / 11,044 | 9 / 22 of 22 / 1,156 | not re-reviewed; unsupported claims on PokéAPI and geocoding 0 in all runs |
| 2026-11-24 | Spec contradictions fixed in extraction (#36) | Haiku, 1 run on Postcodes.io, Open-Meteo forecast and Open Library | specs changed, so not comparable | 10 / 21 of 22 / 1,273 | re-reviews confirmed: Postcodes.io and Open Library fail only minor question 7 claims |
uv run docs2mcp design specs/frankfurter/spec.json --out tools/frankfurter/tools.json uv run docs2mcp measure tools/frankfurter/tools.json \ --spec specs/frankfurter/spec.json --out tools/frankfurter/metrics.json