update_task
Modify an existing TickTick task by updating its title, description, due date, priority, or tags using the task ID.
Instructions
Update an existing task
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"taskId": "<taskId>"
},
"name": "update_task"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| taskId | Yes | Task ID to update (required) | |
| title | No | New task title | |
| content | No | New task description/content | |
| dueDate | No | New due date in ISO format | |
| priority | No | New task priority (0=None, 1=Low, 3=Medium, 5=High) | |
| tags | No | New task tags |
Implementation Reference
- src/index.ts:284-296 (handler)MCP tool handler for update_task: validates taskId presence and delegates to TickTickClient.updateTask, then returns success response with updated task JSON.
case 'update_task': if (!args?.taskId) { throw new McpError(ErrorCode.InvalidParams, 'Task ID is required'); } const updatedTask = await this.ticktickClient!.updateTask(args.taskId as string, args); return { content: [ { type: 'text', text: `Task updated successfully: ${JSON.stringify(updatedTask, null, 2)}`, }, ], }; - src/index.ts:125-159 (schema)Schema definition for the update_task tool, specifying input parameters including required taskId and optional fields like title, content, dueDate, priority, tags.
{ name: 'update_task', description: 'Update an existing task', inputSchema: { type: 'object', properties: { taskId: { type: 'string', description: 'Task ID to update (required)', }, title: { type: 'string', description: 'New task title', }, content: { type: 'string', description: 'New task description/content', }, dueDate: { type: 'string', description: 'New due date in ISO format', }, priority: { type: 'number', description: 'New task priority (0=None, 1=Low, 3=Medium, 5=High)', }, tags: { type: 'array', items: { type: 'string' }, description: 'New task tags', }, }, required: ['taskId'], }, }, - src/ticktick-client.ts:310-319 (helper)Implementation of updateTask in TickTickClient: ensures authentication, makes POST request to /task/{taskId} API endpoint with updates, returns the updated task or throws error.
async updateTask(taskId: string, updates: Partial<TickTickTask>): Promise<TickTickTask> { await this.ensureAuthenticated(); try { const response = await this.client.post(`/task/${taskId}`, updates); return response.data; } catch (error) { throw new Error(`Failed to update task: ${error instanceof Error ? error.message : 'Unknown error'}`); } }