delete_task
Remove a task by specifying the workspace ID, project ID, and task ID to streamline task management in the Clockify MCP Server.
Instructions
Delete a task
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| projectId | Yes | Project ID | |
| taskId | Yes | Task ID | |
| workspaceId | Yes | Workspace ID |
Implementation Reference
- src/index.ts:1219-1233 (handler)The main handler function for the 'delete_task' tool. It performs a DELETE request to the Clockify API endpoint for the specified task and 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 (registration)Tool registration in the ListTools response, including name, description, and input schema definition.{ 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)Dispatch handler in the CallToolRequestSchema switch statement that validates input parameters and calls 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);