decide_move_task_to_do
Move approved tasks from the Decide realm to the Do realm in the addTaskManager MCP Server, enabling users to transition tasks ready for execution within the ADD framework.
Instructions
Move task to Do realm from Decide realm.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| taskRecordName | Yes | Task record name |
Implementation Reference
- src/index.ts:1042-1049 (handler)Core handler function executed for the 'decide_move_task_to_do' tool. Validates the realm transition using ADD framework rules and moves the task to the 'do' realm if valid.private async moveTaskToRealm(taskRecordName: string, targetRealm: string) { // Add validation before moving const validationResult = await this.validateRealmTransition(taskRecordName, 'Task', targetRealm as RealmString); if (!validationResult.valid) { throw new McpError(ErrorCode.InvalidParams, validationResult.reason); } return this.moveItemToRealm(taskRecordName, 'Task', targetRealm as RealmString); }
- src/index.ts:478-487 (registration)Tool registration in the listTools handler, defining the name, description, and input schema for 'decide_move_task_to_do'.name: 'decide_move_task_to_do', description: 'Move task to Do realm from Decide realm.', inputSchema: { type: 'object', properties: { taskRecordName: { type: 'string', description: 'Task record name' } }, required: ['taskRecordName'] } },
- src/index.ts:1200-1214 (helper)Helper function that performs the actual realm move operation and generates the response message, called by the handler.private async moveItemToRealm(itemRecordName: string, itemType: 'Task' | 'Project', targetRealmStr: RealmString) { const targetRealmId = realmStringToId(targetRealmStr); // Mock update realmId and clean up fields based on realm rules let updateMessage = `${itemType} ${itemRecordName} moved to ${targetRealmStr} realm (ID: ${targetRealmId})`; // Apply realm-specific cleanup rules if (targetRealmId === REALM_ASSESS_ID) { updateMessage += '. Context and due date cleared for fresh evaluation'; } else if (targetRealmId === REALM_DECIDE_ID && targetRealmStr !== 'decide') { updateMessage += '. Ready for context assignment and due date setting'; } return { content: [{ type: 'text', text: updateMessage }] }; }
- src/index.ts:1061-1086 (helper)Validates whether a task can be moved to the target realm according to ADD framework rules (Assess-Decide-Do progression), crucial for the tool's logic.private async validateRealmTransition(itemRecordName: string, itemType: 'Task' | 'Project', targetRealm: RealmString): Promise<{valid: boolean, reason: string}> { // Mock fetch current item data const currentItem = await this.mockFetchItem(itemRecordName, itemType); if (!currentItem) { return { valid: false, reason: `${itemType} ${itemRecordName} not found` }; } const currentRealmId = currentItem.realmId; const targetRealmId = realmStringToId(targetRealm); // Validate transition rules based on ADD framework switch (currentRealmId) { case REALM_ASSESS_ID: // From Assess (1) return this.validateFromAssess(currentItem, targetRealmId, itemType); case REALM_DECIDE_ID: // From Decide (2) return this.validateFromDecide(currentItem, targetRealmId, itemType); case REALM_DO_ID: // From Do (3) return this.validateFromDo(currentItem, targetRealmId, itemType); default: return { valid: false, reason: `Invalid current realm ID: ${currentRealmId}` }; } }
- src/index.ts:720-722 (handler)Dispatch handler in the CallToolRequestSchema switch statement that invokes the moveTaskToRealm for this specific tool.return await this.moveTaskToRealm(args.taskRecordName, 'do'); case 'decide_move_task_to_assess_from_decide': this.validateArgs(args, ['taskRecordName']);