decide_move_task_to_do
Move tasks from the Decide realm to the Do realm to mark them ready for execution in the ADD framework workflow.
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:477-487 (registration)Tool registration in ListToolsRequestSchema handler, including name, description, and input schema.{ 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:718-720 (handler)Dispatch handler in CallToolRequestSchema switch statement: validates input arguments and invokes the moveTaskToRealm method.case 'decide_move_task_to_do': this.validateArgs(args, ['taskRecordName']); return await this.moveTaskToRealm(args.taskRecordName, 'do');
- src/index.ts:1042-1049 (handler)Primary handler function for moving tasks between realms: performs realm transition validation and delegates to moveItemToRealm.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:1200-1214 (helper)Helper function that performs the actual realm move: updates realmId, applies ADD framework cleanup rules, and returns success message (mock implementation).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)Helper function for realm transition validation according to ADD framework rules (Assess-Decide-Do), fetches item and checks allowed moves.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}` }; } }