decide_move_project_to_do
Move a project from the Decide realm to the Do realm to mark it ready for execution within the ADD framework.
Instructions
Move project to Do realm from Decide realm.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| projectRecordName | Yes | Project record name |
Implementation Reference
- src/index.ts:724-726 (registration)Registration and dispatch for the 'decide_move_project_to_do' tool in the CallToolRequestSchema switch statement, calling the moveProjectToRealm handler.
case 'decide_move_project_to_do': this.validateArgs(args, ['projectRecordName']); return await this.moveProjectToRealm(args.projectRecordName, 'do'); - src/index.ts:1051-1058 (handler)Primary handler function for 'decide_move_project_to_do' tool. Validates the realm transition for the project and delegates to the generic moveItemToRealm method if valid.
private async moveProjectToRealm(projectRecordName: string, targetRealm: string) { // Add validation before moving const validationResult = await this.validateRealmTransition(projectRecordName, 'Project', targetRealm as RealmString); if (!validationResult.valid) { throw new McpError(ErrorCode.InvalidParams, validationResult.reason); } return this.moveItemToRealm(projectRecordName, 'Project', targetRealm as RealmString); } - src/index.ts:1200-1214 (helper)Core helper method that performs the realm move operation for projects or tasks, currently implemented as a mock that returns a success message (production would update CloudKit).
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 that validates ADD framework realm transition rules before allowing project move from Decide to Do, ensuring context and future due date are set.
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:500-508 (schema)Tool registration including name, description, and input schema definition for 'decide_move_project_to_do' in ListTools response.
name: 'decide_move_project_to_do', description: 'Move project to Do realm from Decide realm.', inputSchema: { type: 'object', properties: { projectRecordName: { type: 'string', description: 'Project record name' } }, required: ['projectRecordName'] }