Skip to main content
Glama
dragosroua

addTaskManager MCP Server

by dragosroua

get_tasks_soon_in_do

Retrieve upcoming tasks from the Do realm to prioritize completion within the ADD framework's structured workflow.

Instructions

Find tasks due soon in Do realm.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • src/index.ts:628-632 (registration)
    Tool registration in ListToolsRequestSchema handler, including name, description, and empty input schema (no parameters required).
    {
      name: 'get_tasks_soon_in_do',
      description: 'Find tasks due soon in Do realm.',
      inputSchema: { type: 'object', properties: {} }
    },
  • Dispatch in CallToolRequestSchema switch statement that invokes the main handler method.
    case 'get_tasks_soon_in_do':
      return await this.getTasksSoonInDo();
  • Primary MCP tool handler. In production, delegates to CloudKitService.getTasksInDoSoon() and formats response. In development/mock mode, returns simulated data with tasks due in 2-7 days.
    private async getTasksSoonInDo() {
      return this.withCloudKitOrMock(
        'getTasksSoonInDo',
        async () => {
          // CloudKit production implementation
          const soonTasks = await this.cloudKitService.getTasksInDoSoon();
          
          let response = `Soon items in Do realm (due within next 2-7 days):\n`;
          if (soonTasks.length === 0) {
            response += 'No tasks due soon in Do realm! 📋 Good planning ahead!';
          } else {
            response += soonTasks.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';
              const endDate = task.fields?.endDate?.value;
              const dueDate = new Date(endDate).toLocaleDateString();
              const daysUntil = Math.ceil((new Date(endDate).getTime() - Date.now()) / (24 * 60 * 60 * 1000));
              
              return `- ${name} (${task.recordName}) - Due: ${dueDate} (${daysUntil} days) - ${contextName} - ${priorityIcon}`;
            }).join('\n');
          }
          
          return { content: [{ type: 'text', text: response }] };
        },
        async () => {
          // Mock implementation
          const now = new Date();
          const threeDays = new Date(now.getTime() + 3 * 86400000);
          const sevenDays = new Date(now.getTime() + 7 * 86400000);
          
          const mockTasks = [
            { 
              recordName: 'task_soon_1', 
              taskName: 'Submit tax documents', 
              realmId: 3, 
              endDate: threeDays.toISOString().split('T')[0],
              contextRecordName: 'context_personal',
              priority: 1,
              timeEstimate: '2 hours',
              daysUntilDue: 3
            },
            { 
              recordName: 'project_soon_1', 
              projectName: 'Plan team offsite', 
              realmId: 3, 
              endDate: sevenDays.toISOString().split('T')[0],
              contextRecordName: 'context_work',
              priority: 2,
              timeEstimate: '5 hours',
              daysUntilDue: 7
            }
          ];
          
          let response = `Soon items in Do realm (due within next 2-7 days):\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';
            const dueDate = new Date(item.endDate).toLocaleDateString();
            return `- ${name} (${item.recordName}) - Due: ${dueDate} (${item.daysUntilDue} days) - ${contextName} - ${priority}`;
          }).join('\n');
          
          return { content: [{ type: 'text', text: response }] };
        }
      );
    }
  • Production CloudKit query implementation: fetches Tasks in Do realm (realmId=3) with endDate between +2 and +7 days from now, sorted by endDate ascending.
    async getTasksInDoSoon(): Promise<ZenTaskticTask[]> {
      const twoDaysFromNow = new Date();
      twoDaysFromNow.setDate(twoDaysFromNow.getDate() + 2);
      
      const sevenDaysFromNow = new Date();
      sevenDaysFromNow.setDate(sevenDaysFromNow.getDate() + 7);
      
      return this.queryRecords<ZenTaskticTask>('Task', {
        filterBy: [
          { fieldName: 'realmId', fieldValue: 3, comparator: 'EQUALS' },
          { fieldName: 'endDate', fieldValue: twoDaysFromNow.getTime(), comparator: 'GREATER_THAN_OR_EQUALS' },
          { fieldName: 'endDate', fieldValue: sevenDaysFromNow.getTime(), comparator: 'LESS_THAN_OR_EQUALS' }
        ],
        sortBy: [{ fieldName: 'endDate', ascending: true }]
      });
    }
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 mentions 'Find tasks due soon' but doesn't specify what 'soon' means, how results are returned (e.g., format, sorting, pagination), or any limitations (e.g., access permissions, rate limits). This leaves significant gaps for an agent to understand the tool's 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, efficient sentence with no wasted words. It's front-loaded with the core purpose, making it easy to parse quickly.

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

Completeness2/5

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

Given the tool's complexity (a query operation with no parameters) and the lack of annotations and output schema, the description is incomplete. It doesn't explain what 'soon' entails, how results are structured, or any behavioral nuances, which could hinder an agent's ability to use it effectively.

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, and the schema description coverage is 100% (since there are no parameters to describe). The description doesn't need to add parameter information, so it meets the baseline expectation without compensation needed.

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 action ('Find') and resource ('tasks due soon in Do realm'), making the purpose understandable. However, it doesn't explicitly differentiate from similar sibling tools like 'get_tasks_today_in_do' or 'get_tasks_overdue_in_do' beyond the 'soon' qualifier, which could be ambiguous about the exact timeframe.

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?

No guidance is provided on when to use this tool versus alternatives such as 'get_tasks_today_in_do' or 'get_tasks_by_realm'. The description implies usage for tasks due soon in the Do realm but lacks explicit context, exclusions, or comparisons to sibling tools.

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