Skip to main content
Glama
by mikemc

todoist_reopen_task

Reopen a Todoist task by marking it as incomplete using the task ID. Restores tasks that were previously completed for better task management and organization.

Instructions

Reopen a task in Todoist (i.e., mark the task as incomplete)

Args: task_id: ID of the task to reopen

Input Schema

NameRequiredDescriptionDefault
task_idYes

Input Schema (JSON Schema)

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

Implementation Reference

  • The handler function todoist_uncomplete_task implements the logic to reopen (uncomplete) a Todoist task using the Todoist API. This matches the functionality of 'todoist_reopen_task'.
    def todoist_uncomplete_task(ctx: Context, task_id: str) -> str: """Reopen a task in Todoist (i.e., mark the task as incomplete) Args: task_id: ID of the task to reopen """ todoist_client = ctx.request_context.lifespan_context.todoist_client try: logger.info(f"Reopening 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}. Task reopening aborted." is_success = todoist_client.uncomplete_task(task_id=task_id) logger.info(f"Task reopened successfully: {task_id}") return f"Successfully reopened task: {task_content} (ID: {task_id})" except Exception as error: logger.error(f"Error reopening task: {error}") return f"Error reopening task: {str(error)}"
  • src/main.py:90-90 (registration)
    Registers the todoist_uncomplete_task (reopen task handler) as an MCP tool.
    mcp.tool()(todoist_uncomplete_task)
  • src/main.py:26-36 (registration)
    Imports the todoist_uncomplete_task function from tasks.py for registration.
    from .tasks import ( todoist_get_task, todoist_get_tasks, todoist_filter_tasks, todoist_add_task, todoist_update_task, todoist_complete_task, todoist_uncomplete_task, todoist_move_task, 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