update-task-planned-time
Modify the time estimate for a Sunsama task by specifying minutes or clear the estimate to improve time management and planning accuracy.
Instructions
Update the planned time (time estimate) for a task
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| limitResponsePayload | No | Whether to limit the response payload size | |
| taskId | Yes | The ID of the task to update planned time for | |
| timeEstimateMinutes | Yes | Time estimate in minutes (use 0 to clear the time estimate) |
Implementation Reference
- src/tools/task-tools.ts:266-288 (handler)The main handler function for the 'update-task-planned-time' tool. It uses the Sunsama client to update the task's time estimate and returns a formatted JSON response.export const updateTaskPlannedTimeTool = withTransportClient({ name: "update-task-planned-time", description: "Update the planned time (time estimate) for a task", parameters: updateTaskPlannedTimeSchema, execute: async ( { taskId, timeEstimateMinutes, limitResponsePayload }: UpdateTaskPlannedTimeInput, context: ToolContext, ) => { const result = await context.client.updateTaskPlannedTime( taskId, timeEstimateMinutes, limitResponsePayload, ); return formatJsonResponse({ success: result.success, taskId, timeEstimateMinutes, updatedFields: result.updatedFields, }); }, });
- src/schemas.ts:191-201 (schema)Zod schema defining the input parameters and validation for the tool.export const updateTaskPlannedTimeSchema = z.object({ taskId: z.string().min(1, "Task ID is required").describe( "The ID of the task to update planned time for", ), timeEstimateMinutes: z.number().int().min(0).describe( "Time estimate in minutes (use 0 to clear the time estimate)", ), limitResponsePayload: z.boolean().optional().describe( "Whether to limit the response payload size", ), });
- src/tools/task-tools.ts:406-426 (registration)Local registration of the tool within the taskTools array, which is exported and used in higher-level tool aggregations.export const taskTools = [ // Query tools getTasksBacklogTool, getTasksByDayTool, getArchivedTasksTool, getTaskByIdTool, // Lifecycle tools createTaskTool, deleteTaskTool, // Update tools updateTaskCompleteTool, updateTaskSnoozeDateTool, updateTaskBacklogTool, updateTaskPlannedTimeTool, updateTaskNotesTool, updateTaskDueDateTool, updateTaskTextTool, updateTaskStreamTool, ];
- src/tools/index.ts:1-9 (registration)Aggregates all tools including taskTools into the allTools array for top-level export.import { userTools } from "./user-tools.js"; import { taskTools } from "./task-tools.js"; import { streamTools } from "./stream-tools.js"; export const allTools = [ ...userTools, ...taskTools, ...streamTools, ];
- src/main.ts:33-44 (registration)Final MCP server registration loop that registers all tools, including 'update-task-planned-time', using the McpServer API.allTools.forEach((tool) => { server.registerTool( tool.name, { description: tool.description, inputSchema: "shape" in tool.parameters ? tool.parameters.shape : tool.parameters, }, tool.execute, ); });