Skip to content

fix(atp): use the toolkit API version - #575

Closed
budziam wants to merge 1 commit into
masterfrom
feature/api-builder/13487218901-atp-api-version
Closed

budziam wants to merge 1 commit into
masterfrom
feature/api-builder/13487218901-atp-api-version

Conversation

@budziam

@budziam budziam commented Nov 26, 2026

Copy link
Copy Markdown
Collaborator

Part of https://monday.monday.com/boards/18424395879/pulses/13487218901

Why

monday.com is making the API-Version HTTP header required on every GraphQL API call. Calls without it will be rejected in the future; the date will be announced. The ATP domain already sends the header, but it was pinned to 2025-10, an older version than the rest of the MCP, which uses the agent-toolkit's API_VERSION (2027-01). This change makes ATP use the same version as the toolkit.

Summary

  • packages/monday-api-mcp/src/domains/atp/atp.consts.ts: DEFAULT_API_VERSION is now 2027-01. The toolkit doesn't export API_VERSION from any of its package entries (/mcp, /core, /openai), so the value stays a literal. A comment and a test keep it equal to packages/agent-toolkit/src/utils/version.utils.ts.
  • packages/monday-api-mcp/src/domains/atp/atp.service.ts: loadMondaySchema is now exported so the test can check the schema URL and the API-Version header. Its behavior is unchanged.
  • packages/monday-api-mcp/tests/atp.test.ts (new): checks that the default version equals the toolkit's API_VERSION, that getMondaySchemaUrl() uses it, and that the ATP request sends it in the API-Version header. A caller-provided version still overrides it in both places.
  • packages/monday-api-mcp/jest.config.js: adds a moduleNameMapper that maps the .js relative imports (Node16 ESM style) back to their .ts sources, so Jest can load atp.service.ts.
  • packages/monday-api-mcp/package.json: version 3.3.1 -> 3.3.2.

No ATP tests were pinned to 2025-10 before this change; the package only had a placeholder test.

Tests and build

  • yarn test in packages/monday-api-mcp: 2 suites, 6 tests, all passed.
  • yarn build at the repo root (turbo; agent-toolkit, then monday-api-mcp): 2 of 2 tasks succeeded.
  • ESLint on the changed files: clean. Prettier: the changed files are clean. src/lib.ts already fails Prettier on master, and this PR doesn't touch it.
  • ATP loads the GraphQL schema at runtime from get_schema?version=..., so there is no generated ATP surface in the repo to regenerate.

The ATP domain pinned DEFAULT_API_VERSION to 2025-10 while the rest of the MCP uses the agent-toolkit API_VERSION (2027-01). Set it to the toolkit version; a test asserts they stay equal and that the schema URL and API-Version header use it. Part of making the API-Version header required.
@budziam budziam closed this Nov 27, 2026
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.

1 participant