Skip to main content
Glama
dragosroua

addTaskManager MCP Server

by dragosroua

get_tasks_today_in_do

Retrieve tasks scheduled for completion today within the Do realm of the ADD framework, helping users focus on immediate actionable items.

Instructions

Find tasks due today in Do realm.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • MCP tool handler: Fetches and formats tasks due today in Do realm (realmId=3). Uses CloudKitService in production or mock data in dev. Handles response formatting with context, priority.
    private async getTasksTodayInDo() {
      return this.withCloudKitOrMock(
        'getTasksTodayInDo',
        async () => {
          // CloudKit production implementation
          const todaysTasks = await this.cloudKitService.getTasksInDoToday();
          
          let response = `Today's items in Do realm (due: ${new Date().toLocaleDateString()}):\n`;
          if (todaysTasks.length === 0) {
            response += 'No tasks scheduled for today in Do realm! 🎉 Time to move some ready items from Decide realm?';
          } else {
            response += todaysTasks.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 today = new Date();
          const todayStr = today.toISOString().split('T')[0];
          
          const mockTasks = [
            { 
              recordName: 'task_today_1', 
              taskName: 'Morning standup meeting', 
              realmId: 3, 
              endDate: todayStr,
              contextRecordName: 'context_work',
              priority: 1,
              timeEstimate: '30 minutes'
            },
            { 
              recordName: 'task_today_2', 
              taskName: 'Pick up groceries', 
              realmId: 3, 
              endDate: todayStr,
              contextRecordName: 'context_errands',
              priority: 2,
              timeEstimate: '45 minutes'
            },
            { 
              recordName: 'project_today_1', 
              projectName: 'Review quarterly goals', 
              realmId: 3, 
              endDate: todayStr,
              contextRecordName: 'context_work',
              priority: 1,
              timeEstimate: '2 hours'
            }
          ];
          
          let response = `Today's items in Do realm (due: ${today.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 }] };
        }
      );
    }
  • Core production implementation: CloudKit query for Tasks in Do realm (realmId=3) with endDate between start/end of today, sorted by priority.
    async getTasksInDoToday(): Promise<ZenTaskticTask[]> {
      const today = new Date();
      const startOfDay = new Date(today.setHours(0, 0, 0, 0)).getTime();
      const endOfDay = new Date(today.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' }
        ],
        sortBy: [{ fieldName: 'taskPriority', ascending: true }] // High priority first
      });
    }
  • src/index.ts:619-622 (registration)
    Tool registration and schema in MCP ListTools handler: defines name, description, empty input schema.
      name: 'get_tasks_today_in_do',
      description: 'Find tasks due today in Do realm.',
      inputSchema: { type: 'object', properties: {} }
    },
  • Dispatch in MCP CallToolRequestSchema switch statement: routes tool call to handler method.
    case 'get_tasks_today_in_do':
      return await this.getTasksTodayInDo();
  • Generic helper: Performs CloudKit database query with filterBy, sortBy, handles errors and pagination.
    async queryRecords<T>(recordType: string, options?: QueryOptions): Promise<T[]> {
      this.ensureAuthenticated();
    
      const query: any = {
        recordType,
        resultsLimit: options?.resultsLimit || 200,
        desiredKeys: options?.desiredKeys
      };
    
      // Add filters
      if (options?.filterBy && options.filterBy.length > 0) {
        query.filterBy = options.filterBy.map(filter => ({
          fieldName: filter.fieldName,
          fieldValue: { value: filter.fieldValue },
          comparator: filter.comparator || 'EQUALS'
        }));
      }
    
      // Add sorting
      if (options?.sortBy && options.sortBy.length > 0) {
        query.sortBy = options.sortBy.map(sort => ({
          fieldName: sort.fieldName,
          ascending: sort.ascending
        }));
      }
    
      // Add zone ID if specified
      if (options?.zoneID) {
        query.zoneID = options.zoneID;
      }
    
      try {
        const response: CloudKitResponse<T> = await this.database.performQuery(query);
        
        if (response.hasErrors) {
          const error = response.errors?.[0];
          throw new Error(`CloudKit query failed: ${error?.reason} (${error?.serverErrorCode})`);
        }
    
        return response.records || [];
      } catch (error) {
        console.error('CloudKit query error:', error);
        throw error;
      }
    }
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 implies a read operation ('Find') but doesn't disclose behavioral traits such as permissions needed, rate limits, return format, or pagination. For a tool with zero annotation coverage, this is a significant gap in transparency.

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 and appropriately sized for the tool's simplicity, making it highly concise and well-structured.

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 (0 params, no output schema, no annotations), the description is minimally complete but lacks depth. It states what the tool does but misses behavioral context and usage guidelines, making it adequate but with clear gaps for an agent's understanding.

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, so no parameter documentation is needed. The description doesn't add param info, which is appropriate, earning a baseline score of 4 for adequately handling the lack of parameters.

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 verb 'Find' and the resource 'tasks due today in Do realm', making the purpose specific and understandable. It distinguishes from some siblings like 'get_tasks_by_realm' or 'get_tasks_overdue_in_do' by specifying the due date constraint, though not explicitly compared.

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 like 'get_tasks_by_realm' or 'get_tasks_tomorrow_in_do'. It lacks explicit context, prerequisites, or exclusions, leaving usage unclear relative to siblings.

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