Skip to content

Space / folder / custom field / template management#7

Open
Esteban-Rod wants to merge 4 commits into
nsxdavid:mainfrom
Esteban-Rod:feat/space-folder-template
Open

Space / folder / custom field / template management#7
Esteban-Rod wants to merge 4 commits into
nsxdavid:mainfrom
Esteban-Rod:feat/space-folder-template

Conversation

@Esteban-Rod

Copy link
Copy Markdown

Summary

This PR adds the missing CRUD around spaces, folders, custom fields and templates so callers no longer need to drop down to raw REST.

  1. update_space — toggle ClickApps (priorities, milestones, time_tracking, time_estimates, tags, checklists, custom_fields, remap_dependencies, dependency_warning, portfolios, sprints, points), plus multiple_assignees and private.
    • Gotcha documented in the tool description: ClickUp's PUT /space/{id} NULLifies missing fields, so the tool requires name and the handler always re-emits it to avoid wiping the space name when toggling features.
  2. create_space / delete_space — same field surface as update_space for creation. delete_space is destructive and irreversible — flagged accordingly in the description.
  3. Custom fields CRUD: get_custom_fields, create_custom_field, set_custom_field_value, remove_custom_field_value. Recommended workflow documented in set_custom_field_value's description (cache field UUIDs once via get_custom_fields, then set per task). The known API asymmetry (UUIDs in, orderindex out) is documented inline.
  4. move_task_to_list — uses ClickUp's v3 endpoint PUT /api/v3/workspaces/{ws}/tasks/{task_id}/home_list/{list_id} (the v2 endpoint isn't available). Implemented via direct axios because the existing client is pinned to v2 baseURL. Limitation: only root tasks can be moved (sub-tasks must be promoted first); documented in the tool description.
  5. get_list_templates — lists workspace list templates so callers can discover a template_id before calling create_list_from_template_in_*.
  6. get_folders — lists folders in a space. The FoldersClient.getFoldersFromSpace method already existed but wasn't wrapped as a tool, so listing folders required REST fallback.

Test plan

  • npm run build clean
  • update_space toggle each ClickApp + verify via get_space
  • create_space followed by delete_space (sandbox)
  • get_custom_fields returns list of fields with options
  • create_custom_field (drop_down with options) + set_custom_field_value (UUID) + read back via get_task_details
  • remove_custom_field_value clears the field
  • move_task_to_list between lists, verify new home list
  • get_list_templates returns workspace templates
  • get_folders returns folders for a space

Notes

Adds the update_space tool that wraps PUT /space/{id} with named flags
for the most common ClickApps (priorities, milestones, time_tracking,
tags, checklists, custom_fields, sprints, points, etc.) plus 'private'
and 'multiple_assignees'.

GOTCHA documented in tool description: ClickUp's PUT /space/{id}
NULLifies fields that are absent from the body, including 'name'.
The 'name' parameter is therefore REQUIRED — pass the current name even
when only toggling features. The wrapper tool surfaces this in its
schema description so callers don't get bitten.
Adds two new tools to complete space-level CRUD coverage in the fork:

- create_space: POST /team/{id}/space with optional ClickApps toggles
  (priorities, milestones, time_tracking, tags, etc.) and
  multiple_assignees flag at creation time
- delete_space: DELETE /space/{id} (irreversible — caller must confirm
  before invoking, the destructive nature is documented in the tool
  description)

CreateSpaceParams reuses UpdateSpaceParams['features'] shape so any
ClickApp toggle available on update is also available on create.
Five additional tools to close the remaining MCP coverage gaps versus
the REST API:

- get_custom_fields: list-level field definitions (UUIDs, type_config
  with drop_down option UUIDs). Cache once per session before assigning
  values to tasks.
- create_custom_field: create a new field on a list. Supports the most
  common types (drop_down, labels, text, number, date, currency, etc.).
  Note: ClickUp returns {"id": null} on success — refetch via
  get_custom_fields to retrieve the actual UUID.
- set_custom_field_value: assign a value to a field on a task.
  Documents the input/output asymmetry (UUID in, orderindex out) for
  drop_down fields. Pass value=null to clear.
- remove_custom_field_value: explicit DELETE alternative to value=null.
- move_task_to_list: v3 endpoint (PUT /api/v3/workspaces/{ws}/tasks/
  {id}/home_list/{list_id}). Uses the underlying axios instance to
  call the v3 host directly (the client baseURL is v2). Only root
  tasks can be moved — sub-tasks must be promoted first.
- get_list_templates: discover template_id values for the existing
  create_list_from_template_in_folder/space tools.

These complete the planned coverage in
extensions/it/workstreams/clickup-mcp-fork-patches.md.
The client already exposed FoldersClient.getFoldersFromSpace but it
wasn't surfaced as a tool. Without it, listing folders required a REST
fallback (curl + Bitwarden token), which forced the clickup-audit skill
to step out of MCP-only execution. Maps to GET /space/{id}/folder.
@coderabbitai

coderabbitai Bot commented Apr 29, 2026

Copy link
Copy Markdown

Warning

Rate limit exceeded

@Esteban-Rod has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 55 minutes and 45 seconds before requesting another review.

To keep reviews running without waiting, you can enable usage-based add-on for your organization. This allows additional reviews beyond the hourly cap. Account admins can enable it under billing.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: f45f9a3a-d281-4a25-83aa-7f159d0e15b2

📥 Commits

Reviewing files that changed from the base of the PR and between cebf20d and c48ca65.

📒 Files selected for processing (5)
  • src/clickup-client/lists.ts
  • src/clickup-client/spaces.ts
  • src/clickup-client/tasks.ts
  • src/tools/space-tools.ts
  • src/tools/task-tools.ts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share
Review rate limit: 0/1 reviews remaining, refill in 55 minutes and 45 seconds.

Comment @coderabbitai help to get the list of available commands and usage tips.

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