Skip to main content
Glama
mikemc
by mikemc

todoist_delete_task

Remove a task from Todoist by specifying its task ID, enabling efficient task management and cleanup within the Todoist MCP Server environment.

Instructions

Delete a task from Todoist

Args: task_id: ID of the task to delete

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
task_idYes

Implementation Reference

  • The handler function that implements the logic to delete a Todoist task by ID. It verifies the task exists, deletes it using the Todoist API client, and returns a success message with the task content.
    def todoist_delete_task(ctx: Context, task_id: str) -> str: """Delete a task from Todoist Args: task_id: ID of the task to delete """ todoist_client = ctx.request_context.lifespan_context.todoist_client try: logger.info(f"Deleting task with ID: {task_id}") try: task = todoist_client.get_task(task_id=task_id) task_content = task.content except Exception as error: logger.warning(f"Error getting task with ID: {task_id}: {error}") return f"Could not verify task with ID: {task_id}. Deletion aborted." is_success = todoist_client.delete_task(task_id=task_id) logger.info(f"Task deleted successfully: {task_id}") return f"Successfully deleted task: {task_content} (ID: {task_id})" except Exception as error: logger.error(f"Error deleting task: {error}") return f"Error deleting task: {str(error)}"
  • src/main.py:92-92 (registration)
    The registration of the todoist_delete_task tool using the MCP decorator mcp.tool().
    mcp.tool()(todoist_delete_task)

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/mikemc/todoist-mcp-server'

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