Skip to main content
Glama
dragosroua

addTaskManager MCP Server

by dragosroua

decide_set_task_due_date

Set due dates for tasks in the Decide realm to schedule work and manage deadlines within the ADD framework.

Instructions

Set due date for a task in Decide realm.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
taskRecordNameYesRecord name of the task
endDateYesDue date in ISO format

Implementation Reference

  • src/index.ts:454-463 (registration)
    Tool registration in the listTools response, including name, description, and input schema definition.
    name: 'decide_set_task_due_date',
    description: 'Set due date for a task in Decide realm.',
    inputSchema: {
      type: 'object',
      properties: {
        taskRecordName: { type: 'string', description: 'Record name of the task' },
        endDate: { type: 'string', format: 'date-time', description: 'Due date in ISO format' }
      },
      required: ['taskRecordName', 'endDate']
    }
  • Dispatch handler in the CallToolRequestSchema switch statement that invokes the main setTaskDueDate method.
    case 'decide_set_task_due_date':
      this.validateArgs(args, ['taskRecordName', 'endDate']);
      return await this.setTaskDueDate(args.taskRecordName, args.endDate);
  • Primary handler function: validates task is in Decide realm (realmId=2), ensures due date is in future, then calls helper to update.
      if (!item) {
        throw new McpError(ErrorCode.InvalidParams, `Task ${taskRecordName} not found`);
      }
      if (item.realmId !== REALM_DECIDE_ID) {
        throw new McpError(ErrorCode.InvalidParams, `Task ${taskRecordName} must be in Decide realm to set due date. Current realm: ${item.realmId}`);
      }
      
      // Validate due date is in the future
      const dueDate = new Date(endDate);
      const now = new Date();
      if (dueDate <= now) {
        throw new McpError(ErrorCode.InvalidParams, `Due date must be in the future. Provided: ${dueDate.toLocaleDateString()}`);
      }
      
      return this.setDueDateForItem(taskRecordName, 'Task', endDate);
    }
    
    private async setTaskAlert(taskRecordName: string, alertDateTime: string) {
      return this.setAlertForTask(taskRecordName, alertDateTime);
  • Shared helper function that performs the actual (mock) update of endDate field and returns success response.
    private async setDueDateForItem(itemRecordName: string, itemType: 'Task' | 'Project', endDateISO: string) {
      // Mock fetch & check realm (should be REALM_DECIDE_ID)
      const endDateTimestamp = new Date(endDateISO).getTime();
      // Mock update: console.log('Mock CloudKit: Setting endDate', endDateTimestamp, 'for', itemType, itemRecordName);
      return { content: [{ type: 'text', text: `Due date (endDate) ${endDateISO} set for ${itemType} ${itemRecordName} in Decide realm.` }] };
    }
  • Mock helper used by handler to fetch item data for realm validation (simulates CloudKit query).
    private async mockFetchItem(itemRecordName: string, itemType: 'Task' | 'Project'): Promise<any> {
      // Mock different scenarios based on record name patterns
      const baseItem = {
        recordName: itemRecordName,
        type: itemType,
        lastModified: new Date().toISOString()
      };
    
      // Simulate different states for validation testing
      if (itemRecordName.includes('assess')) {
        return { ...baseItem, realmId: REALM_ASSESS_ID, contextRecordName: null, endDate: null };
      } else if (itemRecordName.includes('undecided')) {
        return { ...baseItem, realmId: REALM_DECIDE_ID, contextRecordName: null, endDate: null };
      } else if (itemRecordName.includes('stalled')) {
        const yesterday = new Date(Date.now() - 86400000).toISOString();
        return { ...baseItem, realmId: REALM_DECIDE_ID, contextRecordName: 'context_work', endDate: yesterday };
      } else if (itemRecordName.includes('ready')) {
        const tomorrow = new Date(Date.now() + 86400000).toISOString();
        return { ...baseItem, realmId: REALM_DECIDE_ID, contextRecordName: 'context_work', endDate: tomorrow };
      } else if (itemRecordName.includes('do')) {
        const today = new Date().toISOString();
        return { ...baseItem, realmId: REALM_DO_ID, contextRecordName: 'context_work', endDate: today };
      } else {
        // Default to Assess realm item
        return { ...baseItem, realmId: REALM_ASSESS_ID, contextRecordName: null, endDate: null };
      }
    }
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 but only states the basic action. It doesn't mention whether this is a mutation (implied by 'Set'), permission requirements, side effects, error conditions, or response format, leaving significant behavioral gaps for a tool that modifies data.

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 directly states the tool's purpose without redundancy. It's appropriately sized for a simple tool and front-loaded with essential information, 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?

For a mutation tool with no annotations and no output schema, the description is incomplete. It lacks behavioral context (e.g., what happens on success/failure), doesn't explain the 'Decide realm' context, and provides no usage guidance, making it inadequate for an agent to use this tool confidently in a complex environment with many siblings.

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 adds no parameter semantics beyond what the schema provides. Since schema description coverage is 100% (both parameters are well-documented with types and formats), the baseline score of 3 is appropriate—the schema does the heavy lifting, but the description doesn't enhance understanding of the parameters' roles or constraints.

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 ('Set due date') and target resource ('for a task in Decide realm'), providing specific verb+resource pairing. However, it doesn't differentiate from sibling tools like 'decide_set_task_alert' or 'decide_set_project_interval' that also modify task/project properties in the Decide realm, missing explicit distinction.

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 doesn't mention prerequisites (e.g., task must exist), exclusions, or comparisons to similar tools like 'assess_edit_task' which might also handle due dates, leaving usage context unclear.

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