Skip to main content
Glama

get_tasks_by_realm

Filter tasks by realm (Assess, Decide, Do) to organize and manage workflow stages within the ADD framework.

Instructions

Filter tasks by realm.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
realmYesRealm to query (maps to realmId 1, 2, or 3)

Implementation Reference

  • src/index.ts:547-557 (registration)
    Tool registration in ListToolsRequestHandler, including the tool name, description, and input schema definition.
    { name: 'get_tasks_by_realm', description: 'Filter tasks by realm.', inputSchema: { type: 'object', properties: { realm: { type: 'string', enum: ['assess', 'decide', 'do'], description: 'Realm to query (maps to realmId 1, 2, or 3)' } }, required: ['realm'] } },
  • Dispatch handler in CallToolRequestHandler switch statement that validates input and calls the tool implementation method.
    case 'get_tasks_by_realm': this.validateArgs(args, ['realm']); return await this.getTasksByRealm(args.realm as RealmString);
  • Primary MCP tool handler method that converts realm string to ID and returns a formatted text response with mock task data (production version intended to use CloudKitService).
    private async getTasksByRealm(realm: RealmString) { const realmId = realmStringToId(realm); const mockTasks = [{ recordName: 'task_123', taskName: 'Sample Task A', realmId }]; return { content: [{ type: 'text', text: `Tasks in ${realm} realm (ID: ${realmId}):\n${mockTasks.map(t => `- ${t.taskName} (${t.recordName})`).join('\n')}` }] }; }
  • CloudKit service helper method that queries tasks filtered by realmId using the generic queryRecords method, intended for production use by the MCP tool handler.
    async getTasksByRealm(realmId: number): Promise<ZenTaskticTask[]> { return this.queryRecords<ZenTaskticTask>('Task', { filterBy: [{ fieldName: 'realmId', fieldValue: realmId, comparator: 'EQUALS' }], sortBy: [{ fieldName: 'lastModified', ascending: false }] }); }
  • Helper function to map realm string ('assess', 'decide', 'do') to numeric realmId (1,2,3) used in the tool handler.
    const realmStringToId = (realmStr: RealmString): number => { if (realmStr === 'assess') return REALM_ASSESS_ID; if (realmStr === 'decide') return REALM_DECIDE_ID; if (realmStr === 'do') return REALM_DO_ID; throw new McpError(ErrorCode.InvalidParams, `Invalid realm string: ${realmStr}`); };

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