Skip to main content
Glama

get_tasks_tomorrow_in_do

Retrieve tasks scheduled for tomorrow within the Do realm using the addTaskManager MCP Server, helping users stay organized and focused on their priorities.

Instructions

Find tasks due tomorrow in Do realm.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • Production handler in CloudKitService that queries tasks due tomorrow (realmId=3, endDate in tomorrow's date range) using CloudKit queryRecords.
    async getTasksInDoTomorrow(): Promise<ZenTaskticTask[]> { const tomorrow = new Date(); tomorrow.setDate(tomorrow.getDate() + 1); const startOfDay = new Date(tomorrow.setHours(0, 0, 0, 0)).getTime(); const endOfDay = new Date(tomorrow.setHours(23, 59, 59, 999)).getTime(); return this.queryRecords<ZenTaskticTask>('Task', { filterBy: [ { fieldName: 'realmId', fieldValue: 3, comparator: 'EQUALS' }, { fieldName: 'endDate', fieldValue: startOfDay, comparator: 'GREATER_THAN_OR_EQUALS' }, { fieldName: 'endDate', fieldValue: endOfDay, comparator: 'LESS_THAN_OR_EQUALS' } ] }); }
  • MCP server handler for the tool. Dispatches to CloudKitService in production mode or mock data in development. Formats results into MCP response with task list including context and priority.
    private async getTasksTomorrowInDo() { return this.withCloudKitOrMock( 'getTasksTomorrowInDo', async () => { // CloudKit production implementation const tomorrowsTasks = await this.cloudKitService.getTasksInDoTomorrow(); let response = `Tomorrow's items in Do realm (due: ${new Date(Date.now() + 86400000).toLocaleDateString()}):\n`; if (tomorrowsTasks.length === 0) { response += 'No tasks scheduled for tomorrow in Do realm! 📅'; } else { response += tomorrowsTasks.map((task: any) => { const name = task.fields?.taskName?.value || 'Unnamed Task'; const contextRecordName = task.fields?.context?.value?.recordName; const contextName = contextRecordName?.replace('context_', '') || 'No context'; const priority = task.fields?.taskPriority?.value || 3; const priorityIcon = priority === 1 ? '🔴 High' : priority === 2 ? '🟡 Medium' : '🟢 Low'; return `- ${name} (${task.recordName}) - ${contextName} - ${priorityIcon}`; }).join('\n'); } return { content: [{ type: 'text', text: response }] }; }, async () => { // Mock implementation const tomorrow = new Date(Date.now() + 86400000); const tomorrowStr = tomorrow.toISOString().split('T')[0]; const mockTasks = [ { recordName: 'task_tomorrow_1', taskName: 'Dentist appointment', realmId: 3, endDate: tomorrowStr, contextRecordName: 'context_personal', priority: 1, timeEstimate: '1 hour' }, { recordName: 'task_tomorrow_2', taskName: 'Prepare presentation slides', realmId: 3, endDate: tomorrowStr, contextRecordName: 'context_work', priority: 2, timeEstimate: '3 hours' } ]; let response = `Tomorrow's items in Do realm (due: ${tomorrow.toLocaleDateString()}):\n`; response += mockTasks.map(item => { const type = item.recordName.startsWith('task_') ? 'Task' : 'Project'; const name = item.taskName || (item as any).projectName; const contextName = item.contextRecordName?.replace('context_', '') || 'No context'; const priority = item.priority === 1 ? '🔴 High' : item.priority === 2 ? '🟡 Medium' : '🟢 Low'; return `- ${name} (${item.recordName}) - ${contextName} - ${priority} - ~${item.timeEstimate}`; }).join('\n'); return { content: [{ type: 'text', text: response }] }; } ); }
  • src/index.ts:624-627 (registration)
    Tool registration in listTools handler, defining name, description, and empty input schema.
    name: 'get_tasks_tomorrow_in_do', description: 'Find tasks due tomorrow in Do realm.', inputSchema: { type: 'object', properties: {} } },
  • Input schema for the tool (no parameters required).
    inputSchema: { type: 'object', properties: {} }
  • Helper method queryRecords used by getTasksInDoTomorrow to perform the filtered CloudKit database query.
    async queryRecords<T>(recordType: string, options?: QueryOptions): Promise<T[]> { this.ensureAuthenticated(); const query: any = { recordType, resultsLimit: options?.resultsLimit || 200, desiredKeys: options?.desiredKeys }; // Add filters if (options?.filterBy && options.filterBy.length > 0) { query.filterBy = options.filterBy.map(filter => ({ fieldName: filter.fieldName, fieldValue: { value: filter.fieldValue }, comparator: filter.comparator || 'EQUALS' })); } // Add sorting if (options?.sortBy && options.sortBy.length > 0) { query.sortBy = options.sortBy.map(sort => ({ fieldName: sort.fieldName, ascending: sort.ascending })); } // Add zone ID if specified if (options?.zoneID) { query.zoneID = options.zoneID; } try { const response: CloudKitResponse<T> = await this.database.performQuery(query); if (response.hasErrors) { const error = response.errors?.[0]; throw new Error(`CloudKit query failed: ${error?.reason} (${error?.serverErrorCode})`); } return response.records || []; } catch (error) { console.error('CloudKit query error:', error); throw error; } }

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