create_task
Use this tool to add a new task in TickTick by specifying details like title, content, project ID, due date, priority, and tags for efficient task management.
Instructions
Create a new task in TickTick
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| content | No | Task description/content | |
| dueDate | No | Due date in ISO format | |
| priority | No | Task priority (0=None, 1=Low, 3=Medium, 5=High) | |
| projectId | No | Project ID where the task should be created | |
| tags | No | Task tags | |
| title | Yes | Task title (required) |
Implementation Reference
- src/ticktick-client.ts:299-308 (handler)Core implementation of the create_task tool: authenticates and POSTs task data to TickTick API /task endpoint.async createTask(task: Partial<TickTickTask>): Promise<TickTickTask> { await this.ensureAuthenticated(); try { const response = await this.client.post('/task', task); return response.data; } catch (error) { throw new Error(`Failed to create task: ${error instanceof Error ? error.message : 'Unknown error'}`); } }
- src/index.ts:270-282 (handler)MCP CallToolRequest handler case for create_task: validates title and calls TickTickClient.createTask, returns success message.case 'create_task': if (!args?.title) { throw new McpError(ErrorCode.InvalidParams, 'Title is required'); } const newTask = await this.ticktickClient!.createTask(args); return { content: [ { type: 'text', text: `Task created successfully: ${JSON.stringify(newTask, null, 2)}`, }, ], };
- src/index.ts:90-124 (schema)Tool schema definition including input schema, properties, and required fields for create_task registration in ListTools response.{ name: 'create_task', description: 'Create a new task in TickTick', inputSchema: { type: 'object', properties: { title: { type: 'string', description: 'Task title (required)', }, content: { type: 'string', description: 'Task description/content', }, projectId: { type: 'string', description: 'Project ID where the task should be created', }, dueDate: { type: 'string', description: 'Due date in ISO format', }, priority: { type: 'number', description: 'Task priority (0=None, 1=Low, 3=Medium, 5=High)', }, tags: { type: 'array', items: { type: 'string' }, description: 'Task tags', }, }, required: ['title'], }, },