Skip to main content
Glama

delete_task

Remove a specific task from ClickUp by providing its Task ID. This function is part of the ClickUp MCP Server, enabling AI assistants to manage project workflows efficiently.

Instructions

Delete a task

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
task_idYesTask ID to delete

Implementation Reference

  • The main handler function for the 'delete_task' MCP tool. It resolves the flexible task ID using _resolve_task_id and delegates to the ClickUpClient's delete_task method.
    async def delete_task(self, task_id: str) -> Dict[str, Any]: """Delete a task.""" try: # First resolve the task to get the internal ID task = await self._resolve_task_id(task_id) await self.client.delete_task(task.id) return {"id": task.id, "deleted": True} except ClickUpAPIError as e: return {"error": f"Failed to delete task '{task_id}': {e!s}"}
  • The Tool schema definition for 'delete_task', specifying the input schema requiring a 'task_id' string.
    Tool( name="delete_task", description="Delete a task", inputSchema={ "type": "object", "properties": { "task_id": {"type": "string", "description": "Task ID to delete"}, }, "required": ["task_id"], }, ),
  • Registration of the 'delete_task' handler in the ClickUpTools._tools dictionary, used by call_tool to dispatch invocations.
    "delete_task": self.delete_task,
  • Supporting method in ClickUpClient that sends the DELETE request to the ClickUp API to delete the task by ID.
    async def delete_task(self, task_id: str) -> None: """Delete a task.""" await self._request("DELETE", f"/task/{task_id}")

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/DiversioTeam/clickup-mcp'

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