Skip to main content
Glama

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
NameRequiredDescriptionDefault
limitResponsePayloadNoWhether to limit response size
taskIdYesThe ID of the task to delete
wasTaskMergedNoWhether the task was merged before deletion

Implementation Reference

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

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