delete_task
Remove a task from a Clockify project to maintain organized time tracking by specifying workspace, project, and task identifiers.
Instructions
Delete a task
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| workspaceId | Yes | Workspace ID | |
| projectId | Yes | Project ID | |
| taskId | Yes | Task ID |
Implementation Reference
- src/index.ts:1219-1234 (handler)The main handler function for the delete_task tool. It makes a DELETE request to the Clockify API endpoint for the specified workspace, project, and task, then returns a success message.private async deleteTask(workspaceId: string, projectId: string, taskId: string) { await this.makeRequest( `/workspaces/${workspaceId}/projects/${projectId}/tasks/${taskId}`, "DELETE" ); return { content: [ { type: "text", text: `Task ${taskId} deleted successfully!`, }, ], isError: false, }; }
- src/index.ts:536-548 (schema)The input schema and tool metadata definition for delete_task, registered in the list of tools returned by ListToolsRequestSchema.{ name: "delete_task", description: "Delete a task", inputSchema: { type: "object", properties: { workspaceId: { type: "string", description: "Workspace ID" }, projectId: { type: "string", description: "Project ID" }, taskId: { type: "string", description: "Task ID" }, }, required: ["workspaceId", "projectId", "taskId"], }, },
- src/index.ts:780-782 (registration)The switch case in the CallToolRequestSchema handler that routes calls to the deleteTask method.case "delete_task": if (!args?.workspaceId || !args?.projectId || !args?.taskId) throw new McpError(ErrorCode.InvalidParams, 'workspaceId, projectId and taskId are required'); return await this.deleteTask(args.workspaceId as string, args.projectId as string, args.taskId as string);