Skip to content

Generate mcp-tools.json from the server and fail CI on drift (it is already out of sync) #36

Closed

Description

@TMHSDigital

Why it matters

mcp-tools.json is the public listing of the tool surface (and will feed the planned per-tool docs and registry submissions), but it's maintained by hand and has already drifted from the registered tools. CLAUDE.md, AGENTS.md, and .cursorrules all say to "keep it in sync", and nothing checks that.

Evidence

  • ping_all description: mcp-tools.json says "bounded to 5, one ping each with timeout…". The registered description in src/tools/ping.ts:50-53 differs and adds "Defaults to online peers only."
  • generate_ssh_config, share_port, stop_share, and tailnet_status descriptions are all shortened versions of what the server actually advertises.
  • Constraints the server enforces (port 1-65535 int, count 1-10, timeoutMs 100-60000) are missing from the JSON schemas in mcp-tools.json.

Suggested approach

Generate it instead of hand-editing. Add scripts/gen-tools.ts, which starts the server in-memory (like src/__tests__/support.ts), calls listTools, and writes mcp-tools.json. Then either:

  • add a vitest test that fails when the committed file differs from listTools() output, or
  • run the generator in CI with git diff --exit-code.

Once annotations exist (#39), they flow through automatically.

Done when

mcp-tools.json matches listTools() byte for byte, and CI fails when someone changes a tool without regenerating it.

Activity

  1. added
    bug
    ci
    priority: P2
    on Oct 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugcipriority: P2

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions