Skip to main content
Glama

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
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • 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), }, ], }; },
  • 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: [], }, },
  • 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,

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

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