delete_task
Remove tasks from your Todoist workspace by specifying the task ID to clear completed items or eliminate unwanted entries from your task list.
Instructions
Delete a task.
Args:
task_id: The ID of the task to delete
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| task_id | Yes |
Implementation Reference
- todoist_mcp/server.py:222-232 (handler)The main MCP tool handler for 'delete_task'. It checks the client, calls the TodoistClient.delete_task method, and returns a success message. The @mcp.tool() decorator also serves as the registration.@mcp.tool() async def delete_task(task_id: str) -> str: """Delete a task. Args: task_id: The ID of the task to delete """ _check_client() await todoist_client.delete_task(task_id) return f"Task {task_id} deleted successfully!"
- todoist_mcp/client.py:150-152 (helper)The TodoistClient helper method that performs the actual HTTP DELETE request to the Todoist API to delete the task.async def delete_task(self, task_id: str) -> None: """Delete a task.""" await self._request("DELETE", f"/tasks/{task_id}")
- todoist_mcp/server.py:222-222 (registration)The @mcp.tool() decorator registers the delete_task function as an MCP tool.@mcp.tool()
- todoist_mcp/server.py:223-223 (schema)The function signature defines the input schema: task_id (str) and output str.async def delete_task(task_id: str) -> str: