Skip to main content
Glama

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
NameRequiredDescriptionDefault
limitResponsePayloadNoWhether to limit the response payload size
taskIdYesThe ID of the task to update planned time for
timeEstimateMinutesYesTime estimate in minutes (use 0 to clear the time estimate)

Implementation Reference

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

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