delete_task
Remove a specific task from a project in TickTick by providing the task ID and project ID. Use this tool to manage and organize tasks efficiently within the TickTick MCP Server.
Instructions
Delete a task
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| projectId | Yes | Project ID containing the task (required) | |
| taskId | Yes | Task ID to delete (required) |
Implementation Reference
- src/ticktick-client.ts:321-329 (handler)Core handler implementation: authenticates and sends DELETE API request to TickTick to delete the task.async deleteTask(taskId: string, projectId: string): Promise<void> { await this.ensureAuthenticated(); try { await this.client.delete(`/project/${projectId}/task/${taskId}`); } catch (error) { throw new Error(`Failed to delete task: ${error instanceof Error ? error.message : 'Unknown error'}`); } }
- src/index.ts:160-177 (registration)Tool registration in ListTools handler, including name, description, and input schema definition.{ name: 'delete_task', description: 'Delete a task', inputSchema: { type: 'object', properties: { taskId: { type: 'string', description: 'Task ID to delete (required)', }, projectId: { type: 'string', description: 'Project ID containing the task (required)', }, }, required: ['taskId', 'projectId'], }, },
- src/index.ts:298-310 (handler)MCP server dispatch handler: validates input parameters and delegates to TickTickClient.deleteTask method.case 'delete_task': if (!args?.taskId || !args?.projectId) { throw new McpError(ErrorCode.InvalidParams, 'Task ID and Project ID are required'); } await this.ticktickClient!.deleteTask(args.taskId as string, args.projectId as string); return { content: [ { type: 'text', text: 'Task deleted successfully', }, ], };
- src/index.ts:163-175 (schema)Input schema definition for the delete_task tool, specifying required taskId and projectId.inputSchema: { type: 'object', properties: { taskId: { type: 'string', description: 'Task ID to delete (required)', }, projectId: { type: 'string', description: 'Project ID containing the task (required)', }, }, required: ['taskId', 'projectId'],