Skip to main content
Glama
rafliruslan

TickTick MCP Server

by rafliruslan

get_todays_tasks

Retrieve tasks due today from TickTick, optionally filtered by project, to help users manage their daily priorities and deadlines.

Instructions

Get tasks that are specifically due today

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
projectIdNoOptional project ID to filter today's tasks

Implementation Reference

  • Core handler function that fetches raw tasks, filters for today's due tasks using the isTaskDueToday helper, enhances them for display, and returns the result.
    async getTodaysTasks(projectId?: string): Promise<any[]> {
      // Get raw tasks for filtering logic
      const allTasks = await this.getTasksRaw(projectId);
      const todaysTasks = allTasks.filter(task => isTaskDueToday(task));
      return todaysTasks.map(task => enhanceTaskForDisplay(task));
    }
  • Supporting helper that determines if a task is due today, accounting for completion status, all-day flags, and timezone adjustments by adding one day to the due date.
    function isTaskDueToday(task: TickTickTask): boolean {
      // If task is completed, it's not due today
      if (task.completedTime) {
        return false;
      }
      
      // If no due date, it's not due today
      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) {
          const today = now.toISOString().split('T')[0];
          const adjustedDueDateStr = adjustedDueDate.toISOString().split('T')[0];
          
          // Task is due today if adjusted due date equals today
          return adjustedDueDateStr === today;
        }
        
        // For timed tasks, check if it's due today (same date)
        const today = now.toISOString().split('T')[0];
        const adjustedDueDateStr = adjustedDueDate.toISOString().split('T')[0];
        return adjustedDueDateStr === today;
      } catch (error) {
        // If date parsing fails, assume not due today
        return false;
      }
    }
  • Tool schema definition including name, description, and input schema for optional projectId parameter.
    {
      name: 'get_todays_tasks',
      description: 'Get tasks that are specifically due today',
      inputSchema: {
        type: 'object',
        properties: {
          projectId: {
            type: 'string',
            description: 'Optional project ID to filter today\'s tasks',
          },
        },
      },
    },
  • src/index.ts:248-257 (registration)
    Registration and dispatch handler in the MCP CallToolRequestSchema switch statement that calls the client implementation and formats the response.
    case 'get_todays_tasks':
      const todaysTasks = await this.ticktickClient!.getTodaysTasks(args?.projectId as string);
      return {
        content: [
          {
            type: 'text',
            text: JSON.stringify(todaysTasks, null, 2),
          },
        ],
      };
  • Helper utility to enhance task objects with human-readable priority text for better display.
    function enhanceTaskForDisplay(task: TickTickTask): any {
      const enhanced = { ...task };
      
      // Add human-readable priority
      let priorityText = 'None';
      switch (task.priority) {
        case 0:
          priorityText = 'None';
          break;
        case 1:
          priorityText = 'Low';
          break;
        case 3:
          priorityText = 'Medium';
          break;
        case 5:
          priorityText = 'High';
          break;
        default:
          priorityText = task.priority ? `Custom (${task.priority})` : 'None';
      }
      
      return {
        ...enhanced,
        priorityText,
        // Keep original dates for display - they should show correctly
        dueDate: task.dueDate
      };
    }
Behavior2/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. It states the tool retrieves tasks due today, which implies a read-only operation, but does not clarify aspects like permissions required, rate limits, pagination, or error handling. For a tool with zero annotation coverage, this leaves significant gaps in understanding its behavior.

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, clear sentence with no wasted words. It is appropriately sized and front-loaded, directly stating the tool's purpose without unnecessary elaboration, making it efficient and easy to understand.

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's low complexity (one optional parameter, no output schema, no annotations), the description is minimally adequate. It covers the basic purpose but lacks details on usage guidelines, behavioral traits, and output format. Without annotations or an output schema, more context on what is returned would be helpful for completeness.

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?

The description does not mention any parameters, but the input schema has 100% description coverage for its single parameter ('projectId'), which is documented as 'Optional project ID to filter today's tasks.' Since schema coverage is high, the baseline score is 3, as the description adds no additional parameter details beyond what the schema provides.

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

Purpose4/5

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

The description clearly states the tool's purpose: 'Get tasks that are specifically due today.' It includes a specific verb ('Get') and resource ('tasks'), with a clear scope ('due today'). However, it does not explicitly distinguish itself from sibling tools like 'get_tasks' or 'get_overdue_tasks,' which would require mentioning the specific date-based filtering.

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

Usage Guidelines2/5

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

The description provides no guidance on when to use this tool versus alternatives. It does not mention sibling tools like 'get_tasks' (for general task retrieval) or 'get_overdue_tasks' (for past-due tasks), nor does it specify prerequisites or exclusions. Usage is implied by the 'due today' scope, but explicit alternatives are lacking.

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