Skip to main content
Glama
dragosroua

addTaskManager MCP Server

by dragosroua

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}`);
    };
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries full burden. It states 'Filter tasks by realm,' which implies a read-only query operation, but doesn't disclose behavioral traits such as whether it returns all tasks or paginated results, error conditions, or any rate limits. The description is minimal and lacks essential operational context.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence with zero waste. It's appropriately sized and front-loaded, directly stating the tool's function without unnecessary elaboration, making it easy to parse quickly.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given no annotations, no output schema, and a simple parameter with full schema coverage, the description is incomplete. It doesn't explain what the tool returns (e.g., task list format), error handling, or usage context, leaving significant gaps for an agent to understand the tool's behavior and output.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, with the parameter 'realm' fully documented in the schema (including enum values and mapping). The description adds no additional meaning beyond the schema, such as explaining what 'realm' represents in the system context. Baseline score of 3 is appropriate as the schema does the heavy lifting.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose3/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description 'Filter tasks by realm' clearly states the action (filter) and resource (tasks), but it's vague about scope and doesn't differentiate from sibling tools like get_tasks_by_context or get_projects_by_realm. It specifies the filtering dimension (realm) but lacks detail about what 'tasks' encompasses in this system.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No guidance is provided on when to use this tool versus alternatives like get_tasks_by_context or other task-filtering siblings. The description implies usage for realm-based filtering but doesn't mention prerequisites, exclusions, or specific contexts where this is preferred over other tools.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

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