Skip to main content
Glama
ratheesh-aot

Clockify MCP Server

by ratheesh-aot

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
NameRequiredDescriptionDefault
workspaceIdYesWorkspace ID
projectIdYesProject ID
taskIdYesTask ID

Implementation Reference

  • 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,
      };
    }
  • 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);

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/ratheesh-aot/clockify-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server