Skip to main content
Glama

Todoist Python MCP Server

by Johnxjp

delete_task

Remove a specific task from Todoist by providing its unique task ID using this tool, enabling efficient task management through the Todoist Python MCP Server.

Instructions

Delete a task by its ID

Input Schema

NameRequiredDescriptionDefault
task_idYes

Input Schema (JSON Schema)

{ "properties": { "task_id": { "title": "Task Id", "type": "string" } }, "required": [ "task_id" ], "title": "delete_taskArguments", "type": "object" }

Implementation Reference

  • The main handler function for the 'delete_task' tool. It is decorated with @mcp.tool(), which registers it as an MCP tool. The function deletes a task using the Todoist API by its ID and handles errors.
    @mcp.tool() def delete_task(task_id: str): """Delete a task by its ID""" try: task_id = task_id.strip('"') is_success = todoist_api.delete_task(task_id=task_id) if not is_success: raise Exception return "Task deleted successfully" except Exception as e: raise Exception(f"Couldn't delete task {str(e)}")

Other Tools

Related Tools

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/Johnxjp/todoist-mcp-python'

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