Skip to main content
Glama

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
NameRequiredDescriptionDefault
task_idYes

Implementation Reference

  • 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!"
  • 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}")
  • The @mcp.tool() decorator registers the delete_task function as an MCP tool.
    @mcp.tool()
  • The function signature defines the input schema: task_id (str) and output str.
    async def delete_task(task_id: str) -> str:

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