create_projects
Create new projects in Todoist to organize tasks with customizable names, colors, favorites, and view styles.
Instructions
Create new projects in Todoist
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| items | Yes |
Implementation Reference
- src/utils/handlers.ts:311-332 (handler)Core execution logic for batch 'create' mode used by create_projects: performs HTTP POST to the specified path (/projects) with item parameters via Todoist API.// Create mode else { finalPath = options.path || options.basePath || ''; let result; switch (options.method) { case 'GET': result = await todoistApi.get(finalPath, apiParams); break; case 'POST': result = await todoistApi.post(finalPath, apiParams); break; case 'DELETE': result = await todoistApi.delete(finalPath); break; } return { success: true, created_item: result, }; }
- src/tools/projects.ts:19-25 (schema)Zod input schema for create_projects items: requires 'name', optional 'parent_id', 'color', 'is_favorite', 'view_style'.itemSchema: { name: z.string(), parent_id: z.string().optional(), color: z.string().optional(), is_favorite: z.boolean().optional(), view_style: z.enum(['list', 'board']).optional(), },
- src/tools/projects.ts:16-29 (registration)Registration of the 'create_projects' tool via createBatchApiHandler factory, specifying name, description, schema, POST to /projects, and 'create' mode.createBatchApiHandler({ name: 'create_projects', description: 'Create new projects in Todoist', itemSchema: { name: z.string(), parent_id: z.string().optional(), color: z.string().optional(), is_favorite: z.boolean().optional(), view_style: z.enum(['list', 'board']).optional(), }, method: 'POST', path: '/projects', mode: 'create', });