delete-task
Remove tasks permanently from your Sunsama workspace using task IDs to maintain organized workflows and eliminate completed or unnecessary items.
Instructions
Delete a task permanently
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| limitResponsePayload | No | Whether to limit response size | |
| taskId | Yes | The ID of the task to delete | |
| wasTaskMerged | No | Whether the task was merged before deletion |
Implementation Reference
- src/tools/task-tools.ts:159-180 (handler)The main handler function that executes the 'delete-task' tool logic by calling the client's deleteTask method and formatting the JSON response.export const deleteTaskTool = withTransportClient({ name: "delete-task", description: "Delete a task permanently", parameters: deleteTaskSchema, execute: async ( { taskId, limitResponsePayload, wasTaskMerged }: DeleteTaskInput, context: ToolContext, ) => { const result = await context.client.deleteTask( taskId, limitResponsePayload, wasTaskMerged, ); return formatJsonResponse({ success: result.success, taskId, deleted: true, updatedFields: result.updatedFields, }); }, });
- src/schemas.ts:149-159 (schema)Zod input schema for the 'delete-task' tool defining required taskId and optional limitResponsePayload, wasTaskMerged parameters.export const deleteTaskSchema = z.object({ taskId: z.string().min(1, "Task ID is required").describe( "The ID of the task to delete", ), limitResponsePayload: z.boolean().optional().describe( "Whether to limit response size", ), wasTaskMerged: z.boolean().optional().describe( "Whether the task was merged before deletion", ), });
- src/main.ts:32-44 (registration)Registration of all tools to the MCP server, including 'delete-task' via the allTools array imported from src/tools/index.ts.// Register all tools allTools.forEach((tool) => { server.registerTool( tool.name, { description: tool.description, inputSchema: "shape" in tool.parameters ? tool.parameters.shape : tool.parameters, }, tool.execute, ); });
- src/tools/task-tools.ts:406-426 (registration)The taskTools array that includes the deleteTaskTool, which is spread into allTools for server registration.export const taskTools = [ // Query tools getTasksBacklogTool, getTasksByDayTool, getArchivedTasksTool, getTaskByIdTool, // Lifecycle tools createTaskTool, deleteTaskTool, // Update tools updateTaskCompleteTool, updateTaskSnoozeDateTool, updateTaskBacklogTool, updateTaskPlannedTimeTool, updateTaskNotesTool, updateTaskDueDateTool, updateTaskTextTool, updateTaskStreamTool, ];