Skip to main content
Glama
rafliruslan

TickTick MCP Server

by rafliruslan

get_overdue_tasks

Retrieve incomplete tasks that have passed their due date from TickTick, with optional filtering by project and timezone adjustment.

Instructions

Get all overdue tasks (incomplete tasks past their due date)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
projectIdNoOptional project ID to filter overdue tasks
timezoneOffsetHoursNoTimezone offset in hours from UTC (e.g., 8 for UTC+8). Defaults to 8

Implementation Reference

  • src/index.ts:52-68 (registration)
    Tool registration in ListToolsRequestSchema handler, defining name, description, and input schema for get_overdue_tasks
    {
      name: 'get_overdue_tasks',
      description: 'Get all overdue tasks (incomplete tasks past their due date)',
      inputSchema: {
        type: 'object',
        properties: {
          projectId: {
            type: 'string',
            description: 'Optional project ID to filter overdue tasks',
          },
          timezoneOffsetHours: {
            type: 'number',
            description: 'Timezone offset in hours from UTC (e.g., 8 for UTC+8). Defaults to 8',
          },
        },
      },
    },
  • MCP CallToolRequestSchema handler case for get_overdue_tasks: extracts args, calls TickTickClient.getOverdueTasks, returns JSON response
    case 'get_overdue_tasks':
      const timezoneOffsetHours = args?.timezoneOffsetHours as number || 8;
      const overdueTasks = await this.ticktickClient!.getOverdueTasks(args?.projectId as string, timezoneOffsetHours);
      return {
        content: [
          {
            type: 'text',
            text: JSON.stringify(overdueTasks, null, 2),
          },
        ],
      };
  • Core handler in TickTickClient: fetches raw tasks, filters overdue using isTaskOverdue helper, enhances for display
    async getOverdueTasks(projectId?: string, timezoneOffsetHours: number = 8): Promise<any[]> {
      // Get raw tasks for filtering logic
      const allTasks = await this.getTasksRaw(projectId);
      const overdueTasks = allTasks.filter(task => isTaskOverdue(task, timezoneOffsetHours));
      return overdueTasks.map(task => enhanceTaskForDisplay(task));
    }
  • Key helper function that implements overdue logic: checks if incomplete task's adjusted due date is past now, handling all-day and timezone adjustment
    function isTaskOverdue(task: TickTickTask, timezoneOffsetHours: number = 8): boolean {
      // If task is completed, it's not overdue
      if (task.completedTime) {
        return false;
      }
      
      // If no due date, it's not overdue
      if (!task.dueDate) {
        return false;
      }
      
      try {
        // Get current date/time
        const now = new Date();
        
        // Parse due date and add 1 day to compensate for timezone difference
        const dueDate = new Date(task.dueDate);
        const adjustedDueDate = new Date(dueDate.getTime() + (24 * 60 * 60 * 1000)); // Add 1 day
        
        // If it's an all-day task, compare dates only
        if (task.allDay) {
          // Get today's date in YYYY-MM-DD format
          const today = now.toISOString().split('T')[0];
          const adjustedDueDateStr = adjustedDueDate.toISOString().split('T')[0];
          
          // Task is overdue if adjusted due date is before today
          return adjustedDueDateStr < today;
        }
        
        // For timed tasks, compare datetime directly
        return adjustedDueDate < now;
      } catch (error) {
        // If date parsing fails, assume not overdue
        return false;
      }
    }
Behavior2/5

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

With no annotations provided, the description carries full burden for behavioral disclosure. It states the tool retrieves data ('Get'), implying read-only behavior, but doesn't mention any limitations like rate limits, authentication requirements, pagination, or what happens if no overdue tasks exist. The description is minimal and lacks operational context.

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 a single, efficient sentence with zero wasted words. It's front-loaded with the core purpose and uses parentheses to add clarifying detail without redundancy. Every element earns its place.

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?

For a read-only tool with 100% schema coverage but no annotations or output schema, the description is adequate but has gaps. It clearly states what the tool does but lacks behavioral context like response format, error conditions, or performance characteristics. The description meets minimum viability but doesn't fully compensate for missing structured data.

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

Parameters3/5

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

Schema description coverage is 100%, so the schema fully documents both parameters. The description doesn't add any parameter-specific information beyond what's in the schema, such as explaining how 'projectId' filtering works or clarifying 'timezoneOffsetHours' usage. Baseline 3 is appropriate when schema handles parameter documentation.

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 specific action ('Get') and resource ('overdue tasks'), with precise scope definition ('incomplete tasks past their due date'). It effectively distinguishes this from sibling tools like 'get_tasks' or 'get_todays_tasks' by specifying the overdue filter.

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

Usage Guidelines3/5

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

The description implies usage context through the term 'overdue tasks' but doesn't explicitly state when to use this tool versus alternatives like 'get_tasks' or 'get_todays_tasks'. No guidance is provided about prerequisites, exclusions, or specific scenarios where this tool is preferred.

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/rafliruslan/ticktick-mcp-server'

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