todoist_reopen_task
Reopen completed Todoist tasks by ID to restore them to active status for continued tracking and management.
Instructions
Reopen a completed task by its ID
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| taskId | Yes | The ID of the completed task to reopen |
Implementation Reference
- src/index.ts:1283-1297 (handler)Handler implementation for the todoist_reopen_task tool. Validates input using isTaskIdArgs type guard, calls todoistClient.reopenTask(taskId), and returns a success message.if (name === "todoist_reopen_task") { if (!isTaskIdArgs(args)) { throw new Error("Invalid arguments for todoist_reopen_task"); } await todoistClient.reopenTask(args.taskId); return { content: [{ type: "text", text: `Task ${args.taskId} reopened successfully` }], isError: false, }; }
- src/index.ts:213-226 (schema)Schema definition for todoist_reopen_task tool, specifying input requirements (taskId as string).const REOPEN_TASK_TOOL: Tool = { name: "todoist_reopen_task", description: "Reopen a completed task by its ID", inputSchema: { type: "object", properties: { taskId: { type: "string", description: "The ID of the completed task to reopen" } }, required: ["taskId"] } };
- src/index.ts:1093-1093 (registration)Registration of the REOPEN_TASK_TOOL in the tools array returned by ListToolsRequestSchema handler.REOPEN_TASK_TOOL,
- src/index.ts:788-798 (helper)Helper type guard function isTaskIdArgs used to validate the input arguments for todoist_reopen_task and similar task ID-based tools.function isTaskIdArgs(args: unknown): args is { taskId: string; } { return ( typeof args === "object" && args !== null && "taskId" in args && typeof (args as { taskId: string }).taskId === "string" ); }