Skip to main content
Glama
soil-dev

capsulemcp

get_tasks

Retrieve up to 10 tasks at once by providing an array of task IDs. Eliminates the need for multiple separate requests.

Instructions

Batch-fetch up to 10 tasks by ID in a single call.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idsYesArray of task IDs (1–10). Capsule caps batch fetches at 10.

Implementation Reference

  • Handler for the 'get_tasks' tool. Accepts an array of task IDs (1-10), makes a GET request to Capsule's batch endpoint using comma-separated IDs, and returns the fetched tasks.
    export async function getTasks(input: z.infer<typeof getTasksSchema>) {
      const { data } = await capsuleGet<{ tasks: unknown[] }>(`/tasks/${input.ids.join(",")}`);
      return data;
    }
  • Zod schema for the 'get_tasks' tool input: validates an array of 1-10 positive integer task IDs.
    export const getTasksSchema = z.object({
      ids: z
        .array(z.number().int().positive())
        .min(1)
        .max(10)
        .describe("Array of task IDs (1–10). Capsule caps batch fetches at 10."),
    });
  • src/server.ts:612-618 (registration)
    Registration of the 'get_tasks' tool with the MCP server, linking the name, description, schema, and handler.
    registerTool(
      server,
      "get_tasks",
      "Batch-fetch up to 10 tasks by ID in a single call.",
      getTasksSchema,
      getTasks,
    );
  • src/server.ts:71-86 (registration)
    Import of getTasksSchema and getTasks from the tasks module into the server registration file.
    import {
      listTasksSchema,
      listTasks,
      getTaskSchema,
      getTask,
      getTasksSchema,
      getTasks,
      createTaskSchema,
      createTask,
      updateTaskSchema,
      updateTask,
      completeTaskSchema,
      completeTask,
      deleteTaskSchema,
      deleteTask,
    } from "./tools/tasks.js";
  • The registerTool helper that wraps the handler result in a JSON text content response and registers it with the MCP SDK server.
    export function registerTool<Schema extends z.ZodObject<ZodRawShape>>(
      server: McpServer,
      name: string,
      description: string,
      schema: Schema,
      handler: (input: z.infer<Schema>) => Promise<unknown>,
    ): void {
      // Use the SDK config-form registerTool with the full Zod schema. The
      // deprecated shape overload rebuilds z.object(schema.shape), which drops
      // object-level refinements such as superRefine.
      const registerWithSchema = server.registerTool.bind(server) as (
        toolName: string,
        config: { description: string; inputSchema: Schema },
        callback: (input: z.infer<Schema>) => Promise<CallToolResult>,
      ) => void;
    
      registerWithSchema(name, { description, inputSchema: schema }, async (input) => {
        const result = await handler(input);
        return wrapAsText(result);
      });
    }
Behavior3/5

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

No annotations provided. Description discloses batch limit (10) and fetch-by-ID behavior, which is also repeated in the schema's ids parameter description. Does not add significant new behavioral details beyond what schema already provides.

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?

Single sentence conveying all critical information: action, resource, capacity, and input type. No filler or redundancy.

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

Completeness4/5

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

For a simple batch fetch tool with one well-documented parameter and no output schema, the description is sufficient. Could optionally mention return format for completeness, but not necessary.

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 coverage is 100% with clear description of 'ids' parameter, including min, max, and batch cap. Tool description adds no new parameter-level meaning beyond summarizing 'by ID', so a baseline of 3 is appropriate.

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

Purpose5/5

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

Description clearly states verb 'batch-fetch' and resource 'tasks' with explicit constraint 'up to 10 tasks by ID'. Unambiguously differentiates from sibling 'get_task' (singular fetch) and other tools.

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

Usage Guidelines4/5

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

Implies usage when fetching multiple tasks by ID, but does not explicitly exclude use for single tasks (where get_task would be more appropriate). Context from sibling names partially compensates.

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/soil-dev/capsulemcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server