Skip to main content
Glama

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
NameRequiredDescriptionDefault
dueDateYesDue date in ISO format (YYYY-MM-DDTHH:mm:ssZ) or null to clear the due date
limitResponsePayloadNoWhether to limit the response payload size
taskIdYesThe ID of the task to update due date for

Implementation Reference

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

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/robertn702/mcp-sunsama'

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