update-task-due-date
Change the due date for a Sunsama task by providing the task ID and new date, or remove the due date entirely to clear the deadline.
Instructions
Update the due date for a task
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| dueDate | Yes | Due date in ISO format (YYYY-MM-DDTHH:mm:ssZ) or null to clear the due date | |
| limitResponsePayload | No | Whether to limit the response payload size | |
| taskId | Yes | The ID of the task to update due date for |
Implementation Reference
- src/tools/task-tools.ts:329-346 (handler)Core execution logic for the update-task-due-date tool: calls the client API and returns formatted JSON response.execute: async ( { taskId, dueDate, limitResponsePayload }: UpdateTaskDueDateInput, context: ToolContext, ) => { const result = await context.client.updateTaskDueDate( taskId, dueDate, limitResponsePayload, ); return formatJsonResponse({ success: result.success, taskId, dueDate, dueDateUpdated: true, updatedFields: result.updatedFields, }); },
- src/schemas.ts:231-244 (schema)Zod input schema defining parameters: taskId (string), dueDate (datetime string or null), limitResponsePayload (optional boolean).export const updateTaskDueDateSchema = z.object({ taskId: z.string().min(1, "Task ID is required").describe( "The ID of the task to update due date for", ), dueDate: z.union([ z.string().datetime("Must be a valid ISO date-time string"), z.null(), ]).describe( "Due date in ISO format (YYYY-MM-DDTHH:mm:ssZ) or null to clear the due date", ), limitResponsePayload: z.boolean().optional().describe( "Whether to limit the response payload size", ), });
- src/tools/task-tools.ts:325-347 (registration)Tool definition and registration wrapper using withTransportClient, linking name, schema, and handler. Included in taskTools array and ultimately registered via allTools in main.ts.export const updateTaskDueDateTool = withTransportClient({ name: "update-task-due-date", description: "Update the due date for a task", parameters: updateTaskDueDateSchema, execute: async ( { taskId, dueDate, limitResponsePayload }: UpdateTaskDueDateInput, context: ToolContext, ) => { const result = await context.client.updateTaskDueDate( taskId, dueDate, limitResponsePayload, ); return formatJsonResponse({ success: result.success, taskId, dueDate, dueDateUpdated: true, updatedFields: result.updatedFields, }); }, });
- src/tools/task-tools.ts:406-426 (registration)Aggregates the updateTaskDueDateTool with other task tools for inclusion in global allTools export.export const taskTools = [ // Query tools getTasksBacklogTool, getTasksByDayTool, getArchivedTasksTool, getTaskByIdTool, // Lifecycle tools createTaskTool, deleteTaskTool, // Update tools updateTaskCompleteTool, updateTaskSnoozeDateTool, updateTaskBacklogTool, updateTaskPlannedTimeTool, updateTaskNotesTool, updateTaskDueDateTool, updateTaskTextTool, updateTaskStreamTool, ];