create_task
Create a new task in a ClickUp list by providing required fields like list ID and name, plus optional details such as description, assignees, status, dates, and priority.
Instructions
Create a new task in a ClickUp list with specified properties like name, description, assignees, status, and dates.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| list_id | Yes | The ID of the list to create the task in | |
| name | Yes | The name of the task | |
| description | No | The description of the task | |
| assignees | No | The IDs of the users to assign to the task | |
| tags | No | The tags to add to the task | |
| status | No | The status of the task | |
| priority | No | The priority of the task (1-4) | |
| due_date | No | The due date of the task (Unix timestamp) | |
| due_date_time | No | Whether the due date includes a time | |
| time_estimate | No | The time estimate for the task (in milliseconds) | |
| start_date | No | The start date of the task (Unix timestamp) | |
| start_date_time | No | Whether the start date includes a time | |
| notify_all | No | Whether to notify all assignees | |
| parent | No | The ID of the parent task |
Implementation Reference
- src/tools/task-tools.ts:109-141 (handler)The MCP tool handler for 'create_task'. Registers the tool with server.tool(), defines its Zod schema for inputs (list_id, name, description, assignees, tags, status, priority, due_date, due_date_time, time_estimate, start_date, start_date_time, notify_all, parent), and calls tasksClient.createTask().
server.tool( 'create_task', 'Create a new task in a ClickUp list with specified properties like name, description, assignees, status, and dates.', { list_id: z.string().describe('The ID of the list to create the task in'), name: z.string().describe('The name of the task'), description: z.string().optional().describe('The description of the task'), assignees: z.array(z.number()).optional().describe('The IDs of the users to assign to the task'), tags: z.array(z.string()).optional().describe('The tags to add to the task'), status: z.string().optional().describe('The status of the task'), priority: z.number().optional().describe('The priority of the task (1-4)'), due_date: z.number().optional().describe('The due date of the task (Unix timestamp)'), due_date_time: z.boolean().optional().describe('Whether the due date includes a time'), time_estimate: z.number().optional().describe('The time estimate for the task (in milliseconds)'), start_date: z.number().optional().describe('The start date of the task (Unix timestamp)'), start_date_time: z.boolean().optional().describe('Whether the start date includes a time'), notify_all: z.boolean().optional().describe('Whether to notify all assignees'), parent: z.string().optional().describe('The ID of the parent task') }, async ({ list_id, ...taskParams }) => { try { const result = await tasksClient.createTask(list_id, taskParams as CreateTaskParams); return { content: [{ type: 'text', text: JSON.stringify(result, null, 2) }] }; } catch (error: any) { console.error('Error creating task:', error); return { content: [{ type: 'text', text: `Error creating task: ${error.message}` }], isError: true }; } } - src/clickup-client/tasks.ts:52-72 (schema)The CreateTaskParams interface defining all input parameters for creating a task, including name (required), description, assignees, tags, status, priority, due_date, due_date_time, time_estimate, start_date, start_date_time, notify_all, parent, links_to, check_required_custom_fields, and custom_fields.
export interface CreateTaskParams { name: string; description?: string; assignees?: number[]; tags?: string[]; status?: string; priority?: number; due_date?: number; due_date_time?: boolean; time_estimate?: number; start_date?: number; start_date_time?: boolean; notify_all?: boolean; parent?: string; links_to?: string; check_required_custom_fields?: boolean; custom_fields?: Array<{ id: string; value: any; }>; } - src/index.ts:40-47 (registration)The 'create_task' tool is registered indirectly via setupTaskTools() which is called in the ClickUpServer.setupTools() method.
private setupTools() { // Set up all tools setupTaskTools(this.server); setupDocTools(this.server); setupSpaceTools(this.server); setupChecklistTools(this.server); setupCommentTools(this.server); } - src/clickup-client/tasks.ts:149-151 (helper)The createTask() method on TasksClient that performs the actual API call: this.client.post('/list/${listId}/task', params).
async createTask(listId: string, params: CreateTaskParams): Promise<Task> { return this.client.post(`/list/${listId}/task`, params); }