create_list_from_template_in_space
Create a new list in a ClickUp space by applying a template. Specify the space, template, and list name to quickly set up structured lists.
Instructions
Create a new list in a ClickUp space using an existing template.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| space_id | Yes | The ID of the space 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:491-513 (registration)Registration and handler of the 'create_list_from_template_in_space' MCP tool. Registers the tool with schema (space_id, template_id, name) and handles the request by calling the ClickUp API client.
server.tool( 'create_list_from_template_in_space', 'Create a new list in a ClickUp space using an existing template.', { space_id: z.string().describe('The ID of the space 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 ({ space_id, template_id, name }) => { try { const result = await listsClient.createListFromTemplateInSpace(space_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 space:', error); return { content: [{ type: 'text', text: `Error creating list from template in space: ${error.message}` }], isError: true }; } } ); - src/tools/task-tools.ts:494-498 (schema)Input schema for the tool using Zod validation: space_id, template_id, and name (all strings).
{ space_id: z.string().describe('The ID of the space 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/clickup-client/lists.ts:136-138 (handler)The actual API client method that sends a POST request to the ClickUp API endpoint /space/{spaceId}/list/template/{templateId} to create a list from a template in a space.
async createListFromTemplateInSpace(spaceId: string, templateId: string, params: CreateListParams): Promise<List> { return this.client.post(`/space/${spaceId}/list/template/${templateId}`, params); } - src/clickup-client/lists.ts:13-16 (helper)Type definition for CreateListParams used as the parameter type for the handler method.
export interface CreateListParams { name: string; // ...other parameters for creating a list... }