Skip to main content
Glama
Johnxjp

Todoist Python MCP Server

by Johnxjp

delete_task

Remove tasks from Todoist by specifying their unique ID to clean up completed or unnecessary items from your task list.

Instructions

Delete a task by its ID

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
task_idYes

Implementation Reference

  • The handler function for the 'delete_task' tool, decorated with @mcp.tool() to register it with the MCP server. It takes a task_id, strips quotes, calls the Todoist API to delete the task, and returns success or raises an exception.
    @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)}")

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