Skip to main content
Glama
soil-dev

capsulemcp

get_projects

Retrieve up to 10 projects at once by providing an array of project IDs. Supports optional embeds like tags and fields.

Instructions

Batch-fetch up to 10 projects (cases) by ID in a single call.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idsYesArray of project IDs (1–10). Capsule caps batch fetches at 10.
embedNoComma-separated embeds, e.g. 'tags,fields'

Implementation Reference

  • The actual handler function for the 'get_projects' tool. It takes an array of up to 10 project IDs and an optional embed parameter, and makes a GET request to /kases/<id1,id2,...> to batch-fetch projects.
    export async function getProjects(input: z.infer<typeof getProjectsSchema>) {
      const { data } = await capsuleGet<{ kases: unknown[] }>(`/kases/${input.ids.join(",")}`, {
        embed: input.embed,
      });
      return data;
    }
  • Zod input schema for get_projects. Defines 'ids' (array of positive ints, min 1 max 10) and 'embed' (optional string).
    export const getProjectsSchema = z.object({
      ids: z
        .array(z.number().int().positive())
        .min(1)
        .max(10)
        .describe("Array of project IDs (1–10). Capsule caps batch fetches at 10."),
      embed: z.string().optional().describe(EMBED_TAGS_FIELDS_DESCRIPTION),
    });
  • src/server.ts:510-516 (registration)
    Registration of the 'get_projects' tool on the MCP server via the registerTool helper, with description 'Batch-fetch up to 10 projects (cases) by ID in a single call.'
    registerTool(
      server,
      "get_projects",
      "Batch-fetch up to 10 projects (cases) by ID in a single call.",
      getProjectsSchema,
      getProjects,
    );
  • src/server.ts:56-69 (registration)
    Import of getProjectsSchema and getProjects from src/tools/projects.ts into the server registration file.
    import {
      listProjectsSchema,
      listProjects,
      getProjectSchema,
      getProject,
      getProjectsSchema,
      getProjects,
      createProjectSchema,
      createProject,
      updateProjectSchema,
      updateProject,
      deleteProjectSchema,
      deleteProject,
    } from "./tools/projects.js";
  • Generic registerTool helper that wraps a handler's return value in the standard MCP text-content response shape and registers it on the McpServer.
    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 are provided, so the description is the sole source. It indicates a read operation (fetch) but does not disclose behaviors like what happens on missing IDs or rate limits, leaving moderate gaps.

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?

A single, compact sentence (9 words) that front-loads the core action and limit, with no filler or redundant information.

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

Completeness3/5

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

Without an output schema, the description does not explain return values or error handling, but it covers the essential function and constraints. It is adequate but not fully complete.

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?

Input schema coverage is 100%, both parameters have descriptions that align with the tool description. The tool description adds no new semantic meaning beyond the schema, so baseline score of 3 applies.

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?

The description clearly states the tool batches up to 10 projects by ID using the verb 'batch-fetch' on resource 'projects', distinguishing it from singular 'get_project' and other list/filter siblings.

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

Usage Guidelines3/5

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

The description implies usage when needing multiple projects by ID but does not explicitly state when to avoid or name alternatives like 'get_project' for single fetches.

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