Skip to main content
Glama

update_task

Modify existing tasks in Clockify projects by updating details like name, assignees, estimates, or status to keep time tracking accurate and organized.

Instructions

Update an existing task

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
workspaceIdYesWorkspace ID
projectIdYesProject ID
taskIdYesTask ID
nameNoTask name
assigneeIdsNoArray of assignee user IDs
estimateNoTask estimate (ISO 8601 duration)
statusNoTask status

Implementation Reference

  • The main handler function for the 'update_task' tool. It extracts parameters from args, makes a PUT request to the Clockify API endpoint for updating a task, and returns a success message with updated task details.
    private async updateTask(args: any) { const { workspaceId, projectId, taskId, ...updateData } = args; const task = await this.makeRequest( `/workspaces/${workspaceId}/projects/${projectId}/tasks/${taskId}`, "PUT", updateData ); return { content: [ { type: "text", text: `Task updated successfully!\nName: ${task.name}\nStatus: ${task.status}\nEstimate: ${task.estimate || "No estimate"}`, }, ], isError: false, }; }
  • src/index.ts:777-779 (registration)
    The switch case in the CallToolRequestSchema handler that routes calls to the 'update_task' tool to the updateTask method, including parameter validation.
    case "update_task": if (!args?.workspaceId || !args?.projectId || !args?.taskId) throw new McpError(ErrorCode.InvalidParams, 'workspaceId, projectId and taskId are required'); return await this.updateTask(args as any);
  • src/index.ts:520-534 (registration)
    The tool registration in the ListToolsRequestSchema response, defining the name, description, and input schema for 'update_task'.
    name: "update_task", description: "Update an existing task", inputSchema: { type: "object", properties: { workspaceId: { type: "string", description: "Workspace ID" }, projectId: { type: "string", description: "Project ID" }, taskId: { type: "string", description: "Task ID" }, name: { type: "string", description: "Task name" }, assigneeIds: { type: "array", items: { type: "string" }, description: "Array of assignee user IDs" }, estimate: { type: "string", description: "Task estimate (ISO 8601 duration)" }, status: { type: "string", enum: ["ACTIVE", "DONE"], description: "Task status" }, }, required: ["workspaceId", "projectId", "taskId"], },
  • TypeScript interface defining the structure of a Task object, used in the context of task-related tools including update_task.
    interface Task { id?: string; name: string; projectId: string; assigneeIds?: string[]; estimate?: string; status?: "ACTIVE" | "DONE"; }

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