update_task
Modify task details in Zoho Projects by updating name, description, priority, or dates to reflect project changes and maintain accurate tracking.
Instructions
Update a task
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| project_id | Yes | Project ID | |
| task_id | Yes | Task ID | |
| name | No | Task name | |
| description | No | Task description | |
| priority | No | Task priority | |
| start_date | No | Start date (YYYY-MM-DD) | |
| end_date | No | End date (YYYY-MM-DD) |
Implementation Reference
- src/index.ts:746-761 (handler)The main handler function for the 'update_task' tool. It extracts project_id, task_id, and other update data from params, makes a PATCH request to the Zoho API endpoint for the specific task, and returns a formatted success response with the API response data.private async updateTask(params: any) { const { project_id, task_id, ...taskData } = params; const data = await this.makeRequest( `/portal/${this.config.portalId}/projects/${project_id}/tasks/${task_id}`, "PATCH", taskData ); return { content: [ { type: "text", text: `Task updated successfully:\n${JSON.stringify(data, null, 2)}`, }, ], }; }
- src/index.ts:346-364 (schema)The input schema definition for the 'update_task' tool, specifying required project_id and task_id, and optional fields like name, description, priority, start_date, end_date.inputSchema: { type: "object", properties: { project_id: { type: "string", description: "Project ID" }, task_id: { type: "string", description: "Task ID" }, name: { type: "string", description: "Task name" }, description: { type: "string", description: "Task description" }, priority: { type: "string", description: "Task priority", enum: ["none", "low", "medium", "high"], }, start_date: { type: "string", description: "Start date (YYYY-MM-DD)", }, end_date: { type: "string", description: "End date (YYYY-MM-DD)" }, }, required: ["project_id", "task_id"],
- src/index.ts:343-365 (registration)The tool registration object in the list_tools response, defining name, description, and inputSchema for 'update_task'.{ name: "update_task", description: "Update a task", inputSchema: { type: "object", properties: { project_id: { type: "string", description: "Project ID" }, task_id: { type: "string", description: "Task ID" }, name: { type: "string", description: "Task name" }, description: { type: "string", description: "Task description" }, priority: { type: "string", description: "Task priority", enum: ["none", "low", "medium", "high"], }, start_date: { type: "string", description: "Start date (YYYY-MM-DD)", }, end_date: { type: "string", description: "End date (YYYY-MM-DD)" }, }, required: ["project_id", "task_id"], },
- src/index.ts:578-579 (registration)The dispatch case in the CallToolRequestSchema handler that routes 'update_task' calls to the updateTask method.case "update_task": return await this.updateTask(params);
- src/http-server.ts:749-764 (handler)Identical handler function for 'update_task' in the HTTP server variant.private async updateTask(params: any) { const { project_id, task_id, ...taskData } = params; const data = await this.makeRequest( `/portal/${this.config.portalId}/projects/${project_id}/tasks/${task_id}`, "PATCH", taskData ); return { content: [ { type: "text", text: `Task updated successfully:\n${JSON.stringify(data, null, 2)}`, }, ], }; }