npm run sync:checkExit code 0 = in sync (pass). Exit code 1 = new issues found (fail).
Known exceptions are declared in scripts/diff-endpoints.ts and don't cause failures.
Three scripts, no LLM needed. The source of truth is the OpenAPI spec.
npm run sync:fetchDownloads the spec, extracts every endpoint into scripts/openapi-endpoints.json with method, path, path/query params, and body fields.
npm run sync:extractImports TOOL_DEFINITIONS from src/types.ts, converts Zod schemas to JSON Schema, writes scripts/mcp-tools.json. The tool-to-endpoint mapping is in scripts/extract-mcp-tools.ts (TOOL_TO_ENDPOINT).
npm run sync:diffStructurally compares the two JSON files:
| Category | Meaning |
|---|---|
| MISSING IN MCP | OpenAPI has an endpoint we don't cover |
| EXTRA IN MCP | We have a tool not in the OpenAPI spec |
| MISSING FIELD | OpenAPI has a field our schema is missing |
| EXTRA FIELD | Our schema has a field not in OpenAPI |
| TYPE MISMATCH | Same field, different type |
| REQUIRED MISMATCH | Same field, different required/optional |
Some issues are expected and won't cause the script to fail. They're declared in the KNOWN_EXCEPTIONS array in scripts/diff-endpoints.ts with inline comments explaining each one.
There are currently 31 known exceptions. Most exist because the OpenAPI spec lags behind the actual backend — we add fields the backend accepts even if they aren't in the spec yet. Each exception has an inline comment in scripts/diff-endpoints.ts explaining why.
When adding a new exception: add the exact issue string to KNOWN_EXCEPTIONS in scripts/diff-endpoints.ts with a comment explaining why. Also add a // NOTE: comment on the affected code in src/types.ts.
npm run sync:check-- see what's missing- Add Zod schema + tool definition in
src/types.ts - Add client method in
src/client.ts - Register the tool in
src/handlers.ts - Add mapping in
scripts/extract-mcp-tools.ts(TOOL_TO_ENDPOINT) npm run sync:check-- verify it passes
The OpenAPI spec can lag behind the actual backend. For a deeper field-by-field audit against the backend source, see BACKEND_VERIFICATION.md (gitignored, available internally).
| File | Purpose |
|---|---|
scripts/fetch-openapi-endpoints.ts |
Downloads + extracts OpenAPI endpoints |
scripts/extract-mcp-tools.ts |
Extracts MCP tool schemas, contains TOOL_TO_ENDPOINT mapping |
scripts/diff-endpoints.ts |
Structural diff, contains KNOWN_EXCEPTIONS |
scripts/openapi-endpoints.json |
Generated (gitignored) |
scripts/mcp-tools.json |
Generated (gitignored) |