create_checklist_item
Add a new item to a ClickUp checklist. Optionally assign a user or mark it as resolved.
Instructions
Create a new item in a ClickUp checklist. Supports optional assignee and resolved status.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| checklist_id | Yes | The ID of the checklist to create the item in | |
| name | Yes | The name of the checklist item | |
| assignee | No | The ID of the user to assign to the checklist item | |
| resolved | No | Whether the checklist item is resolved |
Implementation Reference
- src/tools/checklist-tools.ts:85-114 (handler)The MCP tool handler for 'create_checklist_item'. It defines the Zod schema (checklist_id, name, assignee, resolved), builds params, calls the client, and returns the result.
// Register create_checklist_item tool server.tool( 'create_checklist_item', 'Create a new item in a ClickUp checklist. Supports optional assignee and resolved status.', { checklist_id: z.string().describe('The ID of the checklist to create the item in'), name: z.string().describe('The name of the checklist item'), assignee: z.number().optional().describe('The ID of the user to assign to the checklist item'), resolved: z.boolean().optional().describe('Whether the checklist item is resolved') }, async ({ checklist_id, name, assignee, resolved }) => { try { const itemParams: CreateChecklistItemParams = { name }; if (assignee !== undefined) itemParams.assignee = assignee; if (resolved !== undefined) itemParams.resolved = resolved; const checklistItem = await checklistsClient.createChecklistItem(checklist_id, itemParams); return { content: [{ type: 'text', text: JSON.stringify(checklistItem, null, 2) }] }; } catch (error: any) { console.error('Error creating checklist item:', error); return { content: [{ type: 'text', text: `Error creating checklist item: ${error.message}` }], isError: true }; } } ); - TypeScript interface CreateChecklistItemParams defining the input schema for creating a checklist item (name required, assignee and resolved optional).
export interface CreateChecklistItemParams { name: string; assignee?: number; resolved?: boolean; } - TypeScript interface ChecklistItem defining the output/response shape for a checklist item.
export interface ChecklistItem { id: string; name: string; orderindex: number; resolved: boolean; assignee: { id: number; username: string; email: string; } | null; parent: string | null; } - src/tools/checklist-tools.ts:85-114 (registration)Registration of the 'create_checklist_item' tool via server.tool() with its schema and handler.
// Register create_checklist_item tool server.tool( 'create_checklist_item', 'Create a new item in a ClickUp checklist. Supports optional assignee and resolved status.', { checklist_id: z.string().describe('The ID of the checklist to create the item in'), name: z.string().describe('The name of the checklist item'), assignee: z.number().optional().describe('The ID of the user to assign to the checklist item'), resolved: z.boolean().optional().describe('Whether the checklist item is resolved') }, async ({ checklist_id, name, assignee, resolved }) => { try { const itemParams: CreateChecklistItemParams = { name }; if (assignee !== undefined) itemParams.assignee = assignee; if (resolved !== undefined) itemParams.resolved = resolved; const checklistItem = await checklistsClient.createChecklistItem(checklist_id, itemParams); return { content: [{ type: 'text', text: JSON.stringify(checklistItem, null, 2) }] }; } catch (error: any) { console.error('Error creating checklist item:', error); return { content: [{ type: 'text', text: `Error creating checklist item: ${error.message}` }], isError: true }; } } ); - The underlying client method createChecklistItem that sends a POST request to /checklist/{checklistId}/checklist_item with the params.
async createChecklistItem(checklistId: string, params: CreateChecklistItemParams): Promise<ChecklistItem> { return this.client.post(`/checklist/${checklistId}/checklist_item`, params); }