update_folder
Update the name of any ClickUp folder by providing its ID and new name.
Instructions
Update an existing ClickUp folder's name.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| folder_id | Yes | The ID of the folder to update | |
| name | Yes | The new name of the folder |
Implementation Reference
- src/tools/task-tools.ts:232-253 (handler)MCP tool handler for 'update_folder'. Registers the tool with Zod schema for folder_id and name, calls foldersClient.updateFolder(), and returns the result as JSON text or an error.
server.tool( 'update_folder', 'Update an existing ClickUp folder\'s name.', { folder_id: z.string().describe('The ID of the folder to update'), name: z.string().describe('The new name of the folder') }, async ({ folder_id, name }) => { try { const result = await foldersClient.updateFolder(folder_id, { name }); return { content: [{ type: 'text', text: JSON.stringify(result, null, 2) }] }; } catch (error: any) { console.error('Error updating folder:', error); return { content: [{ type: 'text', text: `Error updating folder: ${error.message}` }], isError: true }; } } ); - src/tools/task-tools.ts:236-238 (schema)Zod schema for update_folder tool: requires folder_id (string) and name (string) as input parameters.
folder_id: z.string().describe('The ID of the folder to update'), name: z.string().describe('The new name of the folder') }, - src/tools/task-tools.ts:232-253 (registration)Registers the 'update_folder' tool on the MCP server via server.tool() in the setupTaskTools function.
server.tool( 'update_folder', 'Update an existing ClickUp folder\'s name.', { folder_id: z.string().describe('The ID of the folder to update'), name: z.string().describe('The new name of the folder') }, async ({ folder_id, name }) => { try { const result = await foldersClient.updateFolder(folder_id, { name }); return { content: [{ type: 'text', text: JSON.stringify(result, null, 2) }] }; } catch (error: any) { console.error('Error updating folder:', error); return { content: [{ type: 'text', text: `Error updating folder: ${error.message}` }], isError: true }; } } ); - src/clickup-client/folders.ts:66-68 (helper)FoldersClient.updateFolder() helper method. Sends a PUT request to /folder/{folderId} with the name parameter to update a ClickUp folder.
async updateFolder(folderId: string, params: { name: string }): Promise<Folder> { return this.client.put(`/folder/${folderId}`, params); }