Overhaul all API routes and tools against the current ClickUp API (v6.0.0)
Description
Full audit and overhaul of the core server's HTTP layer, MCP tool schemas, and zod schemas against the current ClickUp REST API (v2 + v3). Every area was audited against the current OpenAPI specs (api-evangelist mirror, May 2026) plus current SDK/docs research, every finding was adversarially verified by an independent second pass, and only confirmed findings were applied (186 confirmed / 6 refuted out of ~192 reported).
Critical fixes
- Task descriptions were silently lost: create/update sent
markdown_content, but the API field ismarkdown_description(single + bulk paths). - Chat module rewritten for API v3 — previous v2-style paths (
/team/{id}/chat/...) never existed; now/api/v3/workspaces/{workspace_id}/chat/...with correct bodies ({type, content}),{data, next_cursor}envelopes, and cursor pagination. - List-from-template paths fixed (
/list/template/→/list_template/, both variants always 404'd). - Goals key results: correct endpoints (
POST /goal/{id}/key_result,PUT/DELETE /key_result/{id}), fields (steps_start/steps_end/steps_current/task_ids,note),{key_result}envelope, real type enum (percentage/automatic). - Webhooks: real 27-event enum +
*, location scoping, full-body updates, real delivery payload schema ({webhook_id, event, history_items}), raw-body HMAC verification; removed fabricated get-by-id/events/ping/stats/retry endpoints. - Views: real filter grammar (
{field, op, values}withEQ/ANY/ALL…), full-object PUT semantics, real settings/divide/columns fields, 0-indexed requiredpage, Everything-level (team) views. - Attachments rebuilt around the two real endpoints: multipart
POST /task/{id}/attachment(was sending JSON with base64) and v3 parent-entity listing; removed 13 tools calling invented endpoints. - Custom fields: removed field-definition create/update/delete tools (no such API exists), real type vocabulary,
value_options(date time flag), workspace-level field listing. - Dependencies: correct
depends_onvsdependency_ofsemantics (direction was inverted), query-param delete, reads via the task'sdependencies/linked_tasksarrays; removed 11 fabricated endpoints. - Docs v3: create-doc body (
parent{id,type},visibility,create_page),next_cursorpagination (was silently restarting at page 1), realcontent_formatvalues,content_edit_modeappend/prepend,pageListing; removed unsupported update/delete/sharing/template tools. - Time tracking: single-object running-timer response (validation crashed before),
endfield on update,tag_action, requiredduration, start-timer body params. - Client/auth: OAuth
Bearervs rawpk_token handling,Retry-Afterhonored as a minimum wait,ECODEin errors, 429 retry. - Systemic:
custom_task_ids/team_idsupport across task-scoped endpoints; several pagination fixes.
New tools (documented endpoints previously missing): workspace-wide task search, native task merge, task tag add/remove, task-from-template, get folder, folder-from-template, list members, space create/update/delete + space tag CRUD, team views, workspace custom fields, single time entry + time-entry tags, doc pageListing, whoami, user groups, workspace plan, custom roles.
~40 tools that could never succeed (fabricated endpoints) were removed rather than left to 404. The server now registers 157 tools, all backed by documented ClickUp endpoints. Versions bumped to 5.1.0; release notes and README counts updated.
Type of change
- Bug fix (non-breaking change which fixes an issue)
- New feature (non-breaking change which adds functionality)
- Breaking change (fix or feature that would cause existing functionality to not work as expected) — tools backed by nonexistent endpoints were removed, and several tool input shapes changed to match the real API
How Has This Been Tested?
npx jestinpackages/core: 150/150 tests pass (10 suites, including updated assignee/merge/markdown/time tests)- Strict
tsc --noEmitoversrc/clickup-client,src/schemas,src/utils: clean - Syntax parse of all 77 core source files: clean
- Live MCP smoke test: server boots via stdio, completes
initialize, andtools/listreturns all 157 registered tools - Note: a full-project
tscincluding the tool files hits a pre-existing TypeScript type-instantiation blowup in the MCP SDK + zod generics (present onmain; the intelligence package fails to build onmainfor the same reason) — unchanged by this PR
Checklist:
- My code follows the style guidelines of this project
- I have performed a self-review of my own code
- I have made corresponding changes to the documentation
- My changes generate no new warnings
- I have updated the RELEASE_NOTES.md file with details of changes
- New and existing unit tests pass locally with my changes
🤖 Generated with Claude Code
https://claude.ai/code/session_01M18XtDQugWqcmBQLjhyjRo
Generated by Claude Code
Summary by cubic
Overhauled all API routes, tools, and schemas to match the current ClickUp REST API (v2/v3) in @chykalophia/clickup-mcp-server 6.0.0. Removed ~40 nonexistent endpoints, added missing features, fixed critical mismatches, standardized auth/pagination, and now register 157 tools; all 178 tests pass and team_id is enforced when custom_task_ids is used.
-
New Features
- Chat v3: workspace-scoped routes, messages/replies/reactions, cursor pagination; channel listing supports description_format.
- Tasks: native merge, tag add/remove, task-from-template, workspace task search.
- Spaces: create/update/delete + space tag CRUD; lists/folders-from-template (with
options.return_immediately), list members; team-level views. - Docs v3: parent{id,type} create, pageListing, content_format/content_edit_mode, cursor pagination.
- Time tracking: running timer, single time entry CRUD, time-entry tags (updates accept start+duration and derive end).
-
Migration
- Use task
markdown_description;markdown_contentis accepted (including empty strings to clear descriptions). - Chat: require
post_data.subtypewhen sending posts (schema-enforced). - Webhooks: documented events/scoping; raw-body HMAC verification; fail-closed when
validate_signatureis true or signature/secret are missing; status filter uses health states. - Attachments: multipart task upload + v3 listing only; exactly one upload source; base64 size pre-check; URL downloads stream with a byte limit;
file_pathlimited to canonicalCLICKUP_UPLOAD_DIR; SSRF guard onfile_url. custom_task_ids: always provideteam_idon task-scoped tools; bulk dependency ops accept per-itemcustom_task_ids/team_id(max 100).- Time tracking:
tag_actionis replace; create requires exactly one of end/duration; updates may send start+duration (end is derived); stop > start enforced. - Comments: create requires content (
comment_textor structured blocks); blocks take precedence and empty arrays are rejected; updates allow resolve-only or assign-only and must include at least one update field. - Views: real filter grammar and full-object PUT semantics; duplicate-view guard for types the API cannot create.
- Dependencies: direction semantics fixed; delete via query params; reads via
dependencies/linked_tasks. - Dependencies:
packages/intelligencepeer range widened to^5.0.0 || ^6.0.0.
- Use task