Skip to main content
Glama
dragosroua

addTaskManager MCP Server

by dragosroua

get_tasks_tomorrow_in_do

Retrieve tasks scheduled for tomorrow within the Do realm of the ADD framework, helping users focus on upcoming actionable items.

Instructions

Find tasks due tomorrow in Do realm.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • src/index.ts:624-627 (registration)
    Tool registration in the ListToolsRequestSchema handler, defining the tool name, description, and empty input schema.
      name: 'get_tasks_tomorrow_in_do',
      description: 'Find tasks due tomorrow in Do realm.',
      inputSchema: { type: 'object', properties: {} }
    },
  • Primary MCP tool handler that either delegates to CloudKitService for production queries or returns formatted mock data listing tasks due tomorrow in the Do realm.
    private async getTasksTomorrowInDo() {
      return this.withCloudKitOrMock(
        'getTasksTomorrowInDo',
        async () => {
          // CloudKit production implementation
          const tomorrowsTasks = await this.cloudKitService.getTasksInDoTomorrow();
          
          let response = `Tomorrow's items in Do realm (due: ${new Date(Date.now() + 86400000).toLocaleDateString()}):\n`;
          if (tomorrowsTasks.length === 0) {
            response += 'No tasks scheduled for tomorrow in Do realm! 📅';
          } else {
            response += tomorrowsTasks.map((task: any) => {
              const name = task.fields?.taskName?.value || 'Unnamed Task';
              const contextRecordName = task.fields?.context?.value?.recordName;
              const contextName = contextRecordName?.replace('context_', '') || 'No context';
              const priority = task.fields?.taskPriority?.value || 3;
              const priorityIcon = priority === 1 ? '🔴 High' : priority === 2 ? '🟡 Medium' : '🟢 Low';
              
              return `- ${name} (${task.recordName}) - ${contextName} - ${priorityIcon}`;
            }).join('\n');
          }
          
          return { content: [{ type: 'text', text: response }] };
        },
        async () => {
          // Mock implementation
          const tomorrow = new Date(Date.now() + 86400000);
          const tomorrowStr = tomorrow.toISOString().split('T')[0];
          
          const mockTasks = [
            { 
              recordName: 'task_tomorrow_1', 
              taskName: 'Dentist appointment', 
              realmId: 3, 
              endDate: tomorrowStr,
              contextRecordName: 'context_personal',
              priority: 1,
              timeEstimate: '1 hour'
            },
            { 
              recordName: 'task_tomorrow_2', 
              taskName: 'Prepare presentation slides', 
              realmId: 3, 
              endDate: tomorrowStr,
              contextRecordName: 'context_work',
              priority: 2,
              timeEstimate: '3 hours'
            }
          ];
          
          let response = `Tomorrow's items in Do realm (due: ${tomorrow.toLocaleDateString()}):\n`;
          response += mockTasks.map(item => {
            const type = item.recordName.startsWith('task_') ? 'Task' : 'Project';
            const name = item.taskName || (item as any).projectName;
            const contextName = item.contextRecordName?.replace('context_', '') || 'No context';
            const priority = item.priority === 1 ? '🔴 High' : item.priority === 2 ? '🟡 Medium' : '🟢 Low';
            return `- ${name} (${item.recordName}) - ${contextName} - ${priority} - ~${item.timeEstimate}`;
          }).join('\n');
          
          return { content: [{ type: 'text', text: response }] };
        }
      );
    }
  • src/index.ts:770-771 (registration)
    Tool dispatch in the CallToolRequestSchema switch statement, routing calls to the handler method.
    case 'get_tasks_tomorrow_in_do':
      return await this.getTasksTomorrowInDo();
  • Helper method in CloudKitService that performs the actual CloudKit database query for tasks (recordType 'Task') in the Do realm (realmId=3) due specifically tomorrow (endDate within tomorrow's full day).
    async getTasksInDoTomorrow(): Promise<ZenTaskticTask[]> {
      const tomorrow = new Date();
      tomorrow.setDate(tomorrow.getDate() + 1);
      const startOfDay = new Date(tomorrow.setHours(0, 0, 0, 0)).getTime();
      const endOfDay = new Date(tomorrow.setHours(23, 59, 59, 999)).getTime();
      
      return this.queryRecords<ZenTaskticTask>('Task', {
        filterBy: [
          { fieldName: 'realmId', fieldValue: 3, comparator: 'EQUALS' },
          { fieldName: 'endDate', fieldValue: startOfDay, comparator: 'GREATER_THAN_OR_EQUALS' },
          { fieldName: 'endDate', fieldValue: endOfDay, comparator: 'LESS_THAN_OR_EQUALS' }
        ]
      });
    }
  • Type definition for ZenTaskticTask used by the CloudKit query to structure task records with fields like realmId and endDate crucial for filtering Do realm tasks due tomorrow.
    export interface ZenTaskticTask {
      recordName?: string; // CloudKit record name (UUID string, typically)
      recordType: 'Task';
      fields: {
        taskName: { value: string }; // Max 1000 chars, combines original title & body
        realmId: { value: number }; // 1 (Assess), 2 (Decide), 3 (Do)
        uniqueId: { value: string }; // UUID string, primary key in CoreData model
        
        // Core Data model fields
        taskId?: { value: number }; // Integer 16, default 0
        contextId?: { value: number }; // Integer 16, default 0 (legacy field)
        taskAudioRecordId?: { value: number }; // Integer 16, default 0
        taskPictureId?: { value: number }; // Integer 16, default 0
        orderInParent?: { value: number }; // Integer 16, default 0
        taskPriority?: { value: number }; // Integer 16, 1-5, default 3
        
        // References (relationships in Core Data)
        context?: { value: CKReference }; // Reference to a Contexts record
        projects?: { value: CKReference }; // Reference to a Projects record (renamed from project)
        collection?: { value: CKReference }; // Reference to a Collections record
        ideas?: { value: CKReference }; // Reference to an Ideas record (if task derived from idea)
        realms?: { value: CKReference }; // Reference to Realms record
        
        // Dates
        startDate?: { value: number }; // Timestamp (milliseconds since epoch)
        endDate?: { value: number }; // Timestamp (due date, or completion date)
        lastModified: { value: number }; // Timestamp
        
        // Task-specific fields
        localNotification?: { value: string }; // Alert date/trigger (max 100 chars)
        taskParentId?: { value: string }; // UUID string of parent Task/Project/Idea
        taskParentType?: { value: string }; // 'Task', 'Project', 'Idea'
        
        // removed isCompleted, completion handled by setting endDate & potentially realm
      };
    }
Behavior2/5

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

No annotations are provided, so the description carries full burden. It states what the tool does but doesn't disclose behavioral traits like whether it returns all tasks or paginated results, error conditions, or performance characteristics. For a read operation with zero annotation coverage, this is a significant gap.

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 waste. It's front-loaded with the core purpose and appropriately sized for a simple query tool.

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 simplicity (0 parameters, no output schema, no annotations), the description is adequate but minimal. It lacks details on return format (e.g., list structure, fields) or error handling, which would be helpful for an agent to use it correctly.

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 tool has 0 parameters with 100% schema description coverage. The description doesn't need to explain parameters, and it appropriately doesn't mention any. Baseline for 0 parameters is 4, as there's nothing to compensate for.

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 ('Find'), resource ('tasks'), and scope ('due tomorrow in Do realm'). It distinguishes from siblings like 'get_tasks_by_realm' (general realm tasks) and 'get_tasks_today_in_do' (today vs tomorrow), providing precise differentiation.

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 implies usage context: when you need tasks due tomorrow in the Do realm. It doesn't explicitly state when not to use it or name alternatives, but the specificity helps differentiate from siblings like 'get_tasks_overdue_in_do' or 'get_tasks_soon_in_do'.

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/dragosroua/addtaskmanager-mcp-server'

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