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,
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden. It discloses the return format ('structured JSON data with task details') and some behavioral aspects (exclusion of project categories), but doesn't mention pagination, rate limits, authentication requirements, error handling, or what 'excluding various project categories' specifically means. It provides basic context but lacks comprehensive behavioral details.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is efficiently structured in two sentences: the first states the core purpose with key constraints, and the second describes the return format. Every element adds value without redundancy, making it appropriately concise and front-loaded with essential information.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool has no parameters (simplifying input) but no output schema (requiring description to explain returns), the description adequately covers the return format. However, as a read operation with no annotations, it could benefit from more behavioral context like error cases or data freshness. It's minimally complete but leaves some contextual gaps.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema has 0 parameters with 100% coverage, so no parameter documentation is needed. The description appropriately doesn't discuss parameters, maintaining focus on the tool's purpose and behavior. This meets the baseline for tools with no parameters.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the verb ('Get') and resource ('tasks due this week from Todoist'), specifies the time scope ('next 7 days'), and distinguishes it from siblings by mentioning exclusion criteria ('excluding various project categories'). It provides specific differentiation from tools like get_tasks_due_tomorrow or get_tasks_with_label.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides clear context about when to use it ('tasks due this week'), but doesn't explicitly state when not to use it or name specific alternatives. It implies usage for weekly due tasks but lacks explicit exclusions or comparisons to siblings like get_tasks_due_tomorrow or search_tasks.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

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