decide_set_project_interval
Define project timelines by setting start and end dates in the Decide realm using the ADD framework. Requires project record name and ISO-formatted dates for accuracy.
Instructions
Set project interval (start date and end date) in Decide realm.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| endDate | Yes | End date in ISO format | |
| projectRecordName | Yes | Record name of the project | |
| startDate | Yes | Start date in ISO format |
Implementation Reference
- src/index.ts:441-452 (registration)Registration of the 'decide_set_project_interval' tool in the ListToolsRequestSchema handler, including its description and input schema definition.name: 'decide_set_project_interval', description: 'Set project interval (start date and end date) in Decide realm.', inputSchema: { type: 'object', properties: { projectRecordName: { type: 'string', description: 'Record name of the project' }, startDate: { type: 'string', format: 'date-time', description: 'Start date in ISO format' }, endDate: { type: 'string', format: 'date-time', description: 'End date in ISO format' } }, required: ['projectRecordName', 'startDate', 'endDate'] } },
- src/index.ts:709-711 (handler)Dispatch logic in the CallToolRequestSchema handler that validates input arguments and invokes the setProjectInterval method for the tool.case 'decide_set_project_interval': this.validateArgs(args, ['projectRecordName', 'startDate', 'endDate']); return await this.setProjectInterval(args.projectRecordName, args.startDate, args.endDate);
- src/index.ts:1014-1016 (handler)Primary handler function for the 'decide_set_project_interval' tool. It delegates to the helper setDueDateForItem, setting only the endDate (startDate parameter is unused).private async setProjectInterval(projectRecordName: string, startDate: string, endDate: string) { return this.setDueDateForItem(projectRecordName, 'Project', endDate); }
- src/index.ts:1000-1005 (helper)Helper utility function that implements the core logic for setting endDate on tasks or projects. Provides a mock response; in production, would integrate with CloudKitService.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.` }] }; }