Skip to content

fix(core): canonical verb-first MCP tool vocabulary with legacy aliases (#590) - #633

Merged
jimhoyd merged 1 commit into
mainfrom
claude/mcp-tool-vocabulary-cleanup
Sep 24, 2026
Merged

jimhoyd merged 1 commit into
mainfrom
claude/mcp-tool-vocabulary-cleanup

Conversation

@jimhoyd

@jimhoyd jimhoyd commented Sep 24, 2026

Copy link
Copy Markdown
Collaborator

Summary

Implements the remainder of #590 (protocol negotiation already landed in #602 and is not touched here).

  • Verb-first names, old names kept as aliases for one release. capabilities→list_capabilities, import_preview→preview_import, export_preview→preview_export, recipes_list→list_recipes, recipes_show→get_recipe, review_project→review (matching the CLI's urlcode review). Every old name still appears in tools/list and still works — same schema, same handler — with its own "Deprecated alias for ..." description.
  • Fixed the target ambiguity. explain's target (a route path) is unrelated to the deployment-target sense used by inspect, capabilities, get_context, plan_feature and review. Those five tools now accept the canonical deployTarget (self-hosted/cloudflare/aws/vercel/static); their old target argument still works but is marked deprecated in its description.
  • get_context is first in tools/list, matching its documented role as the first call.
  • structuredContent now accompanies the existing text content on every successful tools/call reply whose result is a JSON object (per the MCP structuredContent shape — an object, not a bare array/scalar).
  • New read-only run_tests tool. Runs tests/requests.json fixtures the way urlcode test does, reusing runProjectTests against a disposable local server/data directory. It never writes a project file.
  • Canonical skill inventory. list_skills/get_skill now return all three shipped skills (skills/urlcode, .claude/skills/urlcode-authoring, .claude/skills/urlcode-operations), each with the real description: read live from its own SKILL.md frontmatter (previously list_skills returned only urlcode with a hand-written, drifted description). llms.txt's skill list now includes all three.
  • Reconciled llms-full.txt guidance. One consistent rule everywhere: get_context/capabilities/search_docs/search_recipes answer routine questions; llms-full.txt is a deliberate fallback, located by heading, never opened or grepped whole.
  • docs/TOOLING.md and docs/RECIPES.md updated to the canonical names, alias behavior, deployTarget, structuredContent and run_tests.

Design decisions

  • Naming scheme: verb-first (list_x, get_x, search_x, preview_x, run_x), matching the majority of the pre-existing surface (search_recipes, list_skills, get_example, …) rather than inventing a new convention.
  • Aliasing: alias resolution happens once, at the top of the tools/call dispatch (aliasOf[name] ?? name), so every handler is written only once against its canonical name. Alias tool listings are derived mechanically from the canonical definitions array (a legacy: field) rather than hand-duplicated, so the two can't drift apart.
  • deployTarget vs target: rather than a hard rename (which would break existing callers of inspect/capabilities/get_context/plan_feature/review_project since those tool names are otherwise unchanged), both argument names are accepted for one release; deployTarget wins if both are present.
  • run_tests is read-only in the sense the issue asked for: it never writes a project file. It does start a real disposable local server (like urlcode test), so a fixture with a granted proxy/signal binding can still perform a real outbound call — same as the CLI. No --policy support exists on the MCP server today, so bindings needing an operator grant simply fail closed, same as other MCP tools.

Check status

  • npm run typecheck — clean
  • npm run lint — clean
  • npm run check:code — clean
  • npm run check:docs (trust-model prose, version statements, local links, guidance-claims, agent-facts — the tool-count check specifically — YAML reference, llms-full.txt, cookbook index, Claude plugin generation) — clean
  • test/mcp.test.ts, test/mcp-authoring.test.ts — all pass, including new tests for: alias tool-name and alias-argument equivalence, get_context ordering, run_tests (read-only + correct fixture results), structuredContent presence, and the full three-skill inventory
  • npm run test:package — clean (packed tarball install + starter/cookbook smoke)
  • Full npm run test — ran under heavy sandbox load; the only failures were pre-existing, unrelated timing-sensitive tests (test/cli.test.ts's secret-argument spawn test, test/verify-deployment.test.ts's wall-clock deadline tests, a ReDoS-bound timing test) that reproduce on origin/main under the same load and pass in isolation — none touch MCP, agent-context or skills code

What's left

Nothing scoped out. Per the triage decision this PR covers everything except protocol negotiation (#602, already merged). structuredContent is added for every read tool whose result is already a JSON object, which is effectively all of them except the handful returning a bare array (list_recipes, list_skills, etc. — their text content is unchanged and still fully usable).

Closes #590

🤖 Generated with Claude Code

…es (#590)

Implements the remainder of #590 (protocol negotiation already landed in
#602): rename ambiguous/inconsistent MCP tool names to a verb-first
vocabulary (capabilities->list_capabilities, import_preview->preview_import,
export_preview->preview_export, recipes_list->list_recipes,
recipes_show->get_recipe, review_project->review, matching CLI `urlcode
review`), keeping every pre-#590 name working as a deprecated alias with its
own "Deprecated alias for ..." description in tools/list. Fix the `target`
ambiguity (a route path in `explain` vs. a deployment target elsewhere) by
introducing `deployTarget` as the canonical argument on inspect,
list_capabilities, get_context, plan_feature and review, with the old
`target` argument still accepted (deprecated) on those tools.

get_context is now first in tools/list, matching its documented role as the
first call. Every successful tools/call reply also carries structuredContent
mirroring the JSON already in its text content. Add a read-only run_tests
tool that runs tests/requests.json fixtures the way `urlcode test` does,
reusing runProjectTests against a disposable server/data directory; it never
writes a project file.

list_skills/get_skill now return the real canonical inventory of all three
shipped skills (skills/urlcode, .claude/skills/urlcode-authoring,
.claude/skills/urlcode-operations) with each skill's own SKILL.md frontmatter
description, read at call time so the inventory cannot drift from the skill
it describes. Align llms.txt's skill list and llms-full.txt guidance
(reconciled to: search_docs/get_context first, llms-full.txt only as a
by-heading fallback, never a whole-file read or grep) accordingly, and update
docs/TOOLING.md and docs/RECIPES.md to the canonical names and alias/
structuredContent/run_tests behavior.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@jimhoyd
jimhoyd merged commit 0665dcc into main Sep 24, 2026
21 checks passed
@jimhoyd
jimhoyd deleted the claude/mcp-tool-vocabulary-cleanup branch September 24, 2026 03:33
jimhoyd added a commit that referenced this pull request Sep 24, 2026
…agent-context.ts (#648)

skills.ts's listShippedSkills (added in #627 for #574) and agent-context.ts's
listSkills/getSkill (added in #633 for #590) each maintained their own copy
of the same {name, file} triples for the three shipped SKILL.md files. Move
that list into a new packages/core/src/shipped-skills.ts and have both
modules import it, so a renamed, moved, or added skill only needs to change
in one place. Neither module's public return shape or behavior changes.

Closes #639

Co-authored-by: Claude Sonnet 5 <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Request]: tidy the local MCP surface for agents

1 participant