Skip to main content
Glama

delete_task

Remove a task from Todoist by specifying its task ID to manage your task list effectively.

Instructions

Delete a task.

Args:
    task_id: The ID of the task to delete

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
task_idYes

Implementation Reference

  • The main handler function for the 'delete_task' tool, registered via @mcp.tool() decorator. It validates the client and delegates to the TodoistClient.delete_task method.
    @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!"
  • The supporting client method that executes the DELETE request to the Todoist API endpoint /tasks/{task_id}.
    async def delete_task(self, task_id: str) -> None:
        """Delete a task."""
        await self._request("DELETE", f"/tasks/{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/dan-bailey/todoist-mcp'

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