get_ideas
Retrieve all ideas stored in the addTaskManager app to support task and project management using the ADD framework.
Instructions
Get all ideas.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/services/CloudKitService.ts:427-431 (handler)Core handler function that executes the tool logic by querying all CloudKit 'Ideas' records sorted by lastModified descending. Called by the MCP server in production mode.async getIdeas(): Promise<ZenTaskticIdea[]> { return this.queryRecords<ZenTaskticIdea>('Ideas', { sortBy: [{ fieldName: 'lastModified', ascending: false }] }); }
- src/index.ts:1243-1271 (handler)Top-level MCP tool handler for 'get_ideas'. Dispatches to CloudKitService in production or returns mock data in development, formats the list of ideas as a text response.private async getIdeas() { return this.withCloudKitOrMock( 'getIdeas', async () => { // CloudKit production implementation const ideas = await this.cloudKitService.getIdeas(); let response = `All ideas:\n`; if (ideas.length === 0) { response += 'No ideas found. Time to brainstorm! š”'; } else { response += ideas.map((idea: any) => { const name = idea.fields?.ideaName?.value || 'Unnamed Idea'; const realmId = idea.fields?.realmId?.value || 1; const realmName = realmId === 1 ? 'Assess' : 'Unknown'; return `- ${name} (${idea.recordName}) [${realmName}]`; }).join('\n'); } return { content: [{ type: 'text', text: response }] }; }, async () => { // Mock implementation const mockIdeas = [{ recordName: 'idea_789', ideaName: 'Brilliant Idea Z' }]; return { content: [{ type: 'text', text: `Found ${mockIdeas.length} ideas:\n${mockIdeas.map(i => `- ${i.ideaName} (${i.recordName})`).join('\n')}` }] }; } ); }
- src/index.ts:569-573 (schema)Tool schema definition including name, description, and empty input schema (no parameters required).{ name: 'get_ideas', description: 'Get all ideas.', inputSchema: { type: 'object', properties: {} } },
- src/index.ts:746-748 (registration)Registration of the tool handler in the CallToolRequestSchema switch statement.case 'get_ideas': return await this.getIdeas(); case 'moveToRealm':
- src/index.ts:133-149 (schema)Type definition for ZenTaskticIdea used by the getIdeas handler for type safety in CloudKit queries.export interface ZenTaskticIdea { recordName?: string; recordType: 'Ideas'; // Note: entity name is 'Ideas' in Core Data fields: { ideaName: { value: string }; // Max 1500 chars, combines original title & body realmId: { value: number }; // Integer 16, default 0 (usually REALM_ASSESS_ID) uniqueId: { value: string }; // UUID lastModified: { value: number }; // Timestamp // References (relationships in Core Data) collection?: { value: CKReference }; // Reference to Collections record realm?: { value: CKReference }; // Reference to Realms record tasks?: { value: CKReference[] }; // Tasks derived from this idea // removed createdAt, use lastModified or CloudKit system creationDate }; }