get_tasks_due_this_week
Retrieve tasks scheduled for completion within the next 7 days from Todoist, providing structured task details for weekly planning.
Instructions
Get all tasks due this week (next 7 days) from Todoist, excluding various project categories. Returns structured JSON data with task details including id, content, due date, project id, and labels.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/tools/task-queries.ts:81-93 (handler)The asynchronous handler function that executes the core tool logic: calls getTasksDueThisWeek helper, stringifies the result as JSON, and returns it as text content.handler: async () => { console.error('Executing get_tasks_due_this_week...'); const result = await getTasksDueThisWeek(); console.error('get_tasks_due_this_week completed successfully'); return { content: [ { type: 'text', text: JSON.stringify(result, null, 2), }, ], }; },
- src/tools/task-queries.ts:71-80 (schema)The tool schema defining name, description, and empty input schema (no parameters required).schema: { name: 'get_tasks_due_this_week', description: 'Get all tasks due this week (next 7 days) from Todoist, excluding various project categories. Returns structured JSON data with task details including id, content, due date, project id, and labels.', inputSchema: { type: 'object', properties: {}, required: [], }, },
- src/handlers/tool-request-handler.ts:66-87 (registration)Registration of the tool's handler in the toolsWithoutArgs registry, used for dispatching tool calls without arguments.const toolsWithoutArgs: Record<string, () => Promise<ToolResponse>> = { list_personal_inbox_tasks: listPersonalInboxTasksTool.handler, list_brian_inbox_per_becky_tasks: listBrianInboxPerBeckyTasksTool.handler, list_becky_inbox_per_brian_tasks: listBeckyInboxPerBrianTasksTool.handler, list_next_actions: listNextActionsTool.handler, get_brian_only_projects: getBrianOnlyProjectsTool.handler, get_brian_shared_projects: getBrianSharedProjectsTool.handler, get_becky_shared_projects: getBeckySharedProjectsTool.handler, get_inbox_projects: getInboxProjectsTool.handler, get_context_labels: getContextLabelsTool.handler, get_chores_due_today: getChoresDueTodayTool.handler, get_tasks_due_tomorrow: getTasksDueTomorrowTool.handler, get_tasks_due_this_week: getTasksDueThisWeekTool.handler, get_tickler_tasks: getTicklerTasksTool.handler, list_gtd_projects: listGtdProjectsTool.handler, get_waiting_tasks: getWaitingTasksTool.handler, get_recent_media: getRecentMediaTool.handler, get_areas_of_focus: getAreasOfFocusTool.handler, get_shopping_list: getShoppingListTool.handler, list_brian_time_sensitive_tasks: listBrianTimeSensitiveTasksTool.handler, list_becky_time_sensitive_tasks: listBeckyTimeSensitiveTasksTool.handler, };
- Helper function that fetches raw tasks due this week from Todoist using a predefined filter (THIS_WEEK_FILTER) via the generic fetchRawTasksByFilter.export async function getTasksDueThisWeek(): Promise<TodoistTask[]> { return await fetchRawTasksByFilter( THIS_WEEK_FILTER, 'get tasks due this week' ); }
- src/index.ts:105-105 (registration)The tool schema is registered in the MCP server's listTools response.getTasksDueThisWeekTool.schema,