Skip to main content
Glama

get_collections

Retrieve all collections from the addTaskManager MCP Server to manage tasks, projects, and ideas using the ADD framework across Assess, Decide, and Do realms.

Instructions

Get all collections.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • src/index.ts:587-591 (registration)
    Tool registration including name, description, and input schema (empty object)
    { name: 'get_collections', description: 'Get all collections.', inputSchema: { type: 'object', properties: {} } },
  • Primary MCP tool handler for 'get_collections'. Dispatches to CloudKitService in production mode or returns mock data in development. Formats results as text response.
    private async getCollections() { return this.withCloudKitOrMock( 'getCollections', async () => { // CloudKit production implementation const collections = await this.cloudKitService.getCollections(); let response = `All collections:\n`; if (collections.length === 0) { response += 'No collections found. Create some to organize your tasks! šŸ“‹'; } else { response += collections.map((collection: any) => { const name = collection.fields?.collectionName?.value || 'Unnamed Collection'; return `- ${name} (${collection.recordName})`; }).join('\n'); } return { content: [{ type: 'text', text: response }] }; }, async () => { // Mock implementation const mockCollections = [ { recordName: 'collection_1', collectionName: 'Work Projects' }, { recordName: 'collection_2', collectionName: 'Personal Goals' }, { recordName: 'collection_3', collectionName: 'Done' } ]; return { content: [{ type: 'text', text: `All collections:\n${mockCollections.map(c => `- ${c.collectionName} (${c.recordName})`).join('\n')}` }] }; } ); }
  • Dispatch from MCP CallToolRequestSchema switch statement to the getCollections handler method
    return await this.getCollections(); case 'get_tasks_by_context':
  • CloudKitService helper method queried by MCP handler. Performs sorted query on 'Collections' record type.
    async getCollections(): Promise<any[]> { return this.queryRecords('Collections', { sortBy: [{ fieldName: 'collectionName', ascending: true }] }); }
  • TypeScript interface defining the structure of Collection records from CloudKit/CoreData model.
    interface ZenTaskticCollection { recordName?: string; recordType: 'Collections'; fields: { collectionName: { value: string }; // Collection name uniqueId: { value: string }; // UUID, max 58 chars creationDate?: { value: number }; // Timestamp lastModified: { value: number }; // Timestamp // References (relationships in Core Data) ideas?: { value: CKReference[] }; // List of references to Ideas records projects?: { value: CKReference[] }; // List of references to Projects records tasks?: { value: CKReference[] }; // List of references to Task records }; }

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