create_list_from_template_in_folder
Create a new list in a folder using a saved template to automatically populate it with predefined tasks and structure.
Instructions
Create a new list in a ClickUp folder using an existing template.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| folder_id | Yes | The ID of the folder to create the list in | |
| template_id | Yes | The ID of the template to use | |
| name | Yes | The name of the list |
Implementation Reference
- src/tools/task-tools.ts:467-489 (handler)The tool handler function registered with the MCP server under the name 'create_list_from_template_in_folder'. It accepts folder_id, template_id, and name as string parameters, and calls listsClient.createListFromTemplateInFolder to execute the API call.
server.tool( 'create_list_from_template_in_folder', 'Create a new list in a ClickUp folder using an existing template.', { folder_id: z.string().describe('The ID of the folder to create the list in'), template_id: z.string().describe('The ID of the template to use'), name: z.string().describe('The name of the list') }, async ({ folder_id, template_id, name }) => { try { const result = await listsClient.createListFromTemplateInFolder(folder_id, template_id, { name }); return { content: [{ type: 'text', text: JSON.stringify(result, null, 2) }] }; } catch (error: any) { console.error('Error creating list from template in folder:', error); return { content: [{ type: 'text', text: `Error creating list from template in folder: ${error.message}` }], isError: true }; } } ); - src/clickup-client/lists.ts:125-127 (helper)The helper function in ListsClient that makes the actual HTTP POST request to the ClickUp API endpoint /folder/{folderId}/list/template/{templateId} with the params.
async createListFromTemplateInFolder(folderId: string, templateId: string, params: CreateListParams): Promise<List> { return this.client.post(`/folder/${folderId}/list/template/${templateId}`, params); } - src/tools/task-tools.ts:470-474 (schema)Zod schema defining the input parameters for the tool: folder_id (string), template_id (string), and name (string).
{ folder_id: z.string().describe('The ID of the folder to create the list in'), template_id: z.string().describe('The ID of the template to use'), name: z.string().describe('The name of the list') }, - src/index.ts:40-47 (registration)The tool is registered via setupTaskTools(this.server) in the ClickUpServer class constructor, which passes the MCP server instance to the setupTaskTools function.
private setupTools() { // Set up all tools setupTaskTools(this.server); setupDocTools(this.server); setupSpaceTools(this.server); setupChecklistTools(this.server); setupCommentTools(this.server); }