Skip to main content
Glama

get_ready_items_in_decide

Retrieve tasks and projects ready for action in the Decide realm to manage workflow progression within the ADD framework.

Instructions

Find ready to do items (tasks + projects) in Decide realm.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • Main handler function for the 'get_ready_items_in_decide' tool. Fetches ready tasks using CloudKitService.getTasksInDecideReady() and filters projects from Decide realm that have context and future due dates. Formats and returns the list of ready items.
    private async getReadyItemsInDecide() { return this.withCloudKitOrMock( 'getReadyItemsInDecide', async () => { // CloudKit production implementation const [readyTasks, allProjects] = await Promise.all([ this.cloudKitService.getTasksInDecideReady(), this.cloudKitService.getProjectsByRealm(2) ]); // Filter projects that have both context and future due date const now = new Date(); const readyProjects = allProjects.filter((project: any) => { const hasContext = project.fields?.context?.value?.recordName; const endDate = project.fields?.endDate?.value; const hasFutureEndDate = endDate && new Date(endDate) > now; return hasContext && hasFutureEndDate; }); const allReadyItems = [...readyTasks, ...readyProjects]; let response = `Ready items in Decide realm (context + future due date set):\n`; if (allReadyItems.length === 0) { response += 'No items are ready for Do realm. Check undecided and stalled items first! šŸ“‹'; } else { response += allReadyItems.map(item => { const isTask = item.recordType === 'Task'; const name = isTask ? item.fields?.taskName?.value : item.fields?.projectName?.value; const contextRecordName = item.fields?.context?.value?.recordName; const endDate = item.fields?.endDate?.value; const type = isTask ? 'Task' : 'Project'; const dueDate = new Date(endDate).toLocaleDateString(); const contextName = contextRecordName?.replace('context_', '') || 'Unknown'; return `- ${name} (${item.recordName}) - Due: ${dueDate}, Context: ${contextName} [${type}]`; }).join('\n'); } return { content: [{ type: 'text', text: response }] }; }, async () => { // Mock implementation const tomorrow = new Date(Date.now() + 86400000).toISOString(); const nextWeek = new Date(Date.now() + 7 * 86400000).toISOString(); const mockItems = [ { recordName: 'task_ready_1', taskName: 'Schedule dentist appointment', contextRecordName: 'context_personal', endDate: tomorrow, realmId: 2, readyStatus: 'Fully planned - ready for Do realm' }, { recordName: 'task_ready_2', taskName: 'Submit expense report', contextRecordName: 'context_work', endDate: nextWeek, realmId: 2, readyStatus: 'Context and deadline set' }, { recordName: 'project_ready_1', projectName: 'Plan weekend camping trip', contextRecordName: 'context_personal', endDate: nextWeek, realmId: 2, readyStatus: 'Timeline and context decided' } ]; let response = `Ready items in Decide realm (context + future due date set):\n`; response += mockItems.map(item => { const type = item.recordName.startsWith('task_') ? 'Task' : 'Project'; const name = item.taskName || (item as any).projectName; const dueDate = new Date(item.endDate).toLocaleDateString(); const contextName = item.contextRecordName?.replace('context_', '') || 'Unknown'; return `- ${name} (${item.recordName}) - Due: ${dueDate}, Context: ${contextName}`; }).join('\n'); return { content: [{ type: 'text', text: response }] }; } ); }
  • src/index.ts:614-617 (registration)
    Tool registration in the ListToolsRequestSchema handler, including name, description, and input schema (no parameters required).
    name: 'get_ready_items_in_decide', description: 'Find ready to do items (tasks + projects) in Decide realm.', inputSchema: { type: 'object', properties: {} } },
  • Dispatch handler in the CallToolRequestSchema switch statement that invokes the main getReadyItemsInDecide method.
    case 'get_ready_items_in_decide': return await this.getReadyItemsInDecide();
  • Core helper method that queries CloudKit for tasks in Decide realm (realmId=2) with future endDate, then filters client-side for those with assigned context. Used by the main handler for tasks.
    async getTasksInDecideReady(): Promise<ZenTaskticTask[]> { const now = new Date().getTime(); // Get tasks with future due dates first const tasksWithFutureDates = await this.queryRecords<ZenTaskticTask>('Task', { filterBy: [ { fieldName: 'realmId', fieldValue: 2, comparator: 'EQUALS' }, { fieldName: 'endDate', fieldValue: now, comparator: 'GREATER_THAN' } ] }); // Filter client-side for those that also have a context return tasksWithFutureDates.filter((task: any) => task.fields?.contextRecordName?.value != null ); }
  • Helper method to fetch all projects in a given realm. Used by main handler to get Decide projects (realmId=2) then filter client-side for ready ones.
    async getProjectsByRealm(realmId: number): Promise<ZenTaskticProject[]> { return this.queryRecords<ZenTaskticProject>('Projects', { filterBy: [{ fieldName: 'realmId', fieldValue: realmId, comparator: 'EQUALS' }], sortBy: [{ fieldName: 'lastModified', ascending: false }] }); }

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