Skip to main content
Glama
soil-dev

capsulemcp

get_project

Retrieve a specific project (case) by providing its numeric ID. Optionally include related data such as tags and fields using comma-separated embeds.

Instructions

Fetch a single project (case) by its numeric ID.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYes
embedNoComma-separated embeds, e.g. 'tags,fields'

Implementation Reference

  • The main handler for the get_project tool. Takes an object with `id` (positive integer) and optional `embed` string, and fetches a single project (case) from Capsule's API via GET /kases/{id}. Returns the `data` containing the `kase` object.
    export async function getProject(input: z.infer<typeof getProjectSchema>) {
      const { data } = await capsuleGet<{ kase: unknown }>(`/kases/${input.id}`, {
        embed: input.embed,
      });
      return data;
    }
  • Zod schema for the get_project tool input: requires a positive integer `id` and an optional `embed` string (for embedding tags/fields in the response).
    export const getProjectSchema = z.object({
      id: z.number().int().positive(),
      embed: z.string().optional().describe(EMBED_TAGS_FIELDS_DESCRIPTION),
    });
  • src/server.ts:502-508 (registration)
    Registration of the get_project tool on the MCP server via the registerTool helper, with name 'get_project', description 'Fetch a single project (case) by its numeric ID.', and the exported schema and handler from projects.ts.
    registerTool(
      server,
      "get_project",
      "Fetch a single project (case) by its numeric ID.",
      getProjectSchema,
      getProject,
    );
  • The fieldsArrayDescriptor helper function used to generate per-tool descriptions for the 'fields' parameter. Called with 'get_project' in updateProjectSchema to reference get_project in the field-setting description.
    export function fieldsArrayDescriptor(entityToolName: string): string {
      return (
        "Set custom field values on this record. PARTIAL UPDATE: only the definitions you list are touched; any field NOT in this array is left unchanged. " +
        `Discover available definitions via list_custom_fields; read current values via ${entityToolName} with embed='fields'.`
      );
    }
  • Generic registerTool helper that wraps a handler's return value in MCP text-content response format and registers it with the server.
     *   while editing description text.
     *
     * The exception is `get_attachment` — its handler does
     * content-type-aware response shaping (image vs text vs binary) and
     * needs the raw `server.tool(...)` call. That registration stays
     * inline.
     */
    
    import type { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
    import type { CallToolResult } from "@modelcontextprotocol/sdk/types.js";
    import type { z, ZodRawShape } from "zod";
    
    /** Wrap a handler's return value in the MCP `content: [{text}]` shape. */
    function wrapAsText(result: unknown): {
      content: Array<{ type: "text"; text: string }>;
    } {
      return {
        content: [{ type: "text", text: JSON.stringify(result, null, 2) }],
      };
    }
    
    /**
     * Register an MCP tool whose handler takes a zod-typed input and
     * returns any JSON-serialisable value. The value gets wrapped in the
     * standard MCP text-content response.
     */
    export function registerTool<Schema extends z.ZodObject<ZodRawShape>>(
Behavior3/5

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

The description clearly indicates a read operation, but with no annotations, it lacks details on permissions, error handling, or potential side effects. The simplicity keeps it adequate for a basic fetch.

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, front-loaded sentence with no unnecessary words. All content is relevant and earns its place.

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 fetch tool with one required parameter and an optional embed, the description covers the essential usage. The lack of an output schema is acceptable as the tool's return is implicitly a single project object.

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

Parameters4/5

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

The description adds meaning to the 'id' parameter by stating it is numeric, which is not in the schema. For 'embed', the schema already provides a description. Since schema coverage is 50%, the description compensates partially.

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 uses a specific verb ('Fetch'), identifies the resource ('project (case)'), and specifies the method ('by its numeric ID'). It clearly distinguishes from sibling tools that list or filter multiple projects.

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 a numeric ID is known, but it does not explicitly state when to use this tool versus alternatives like get_projects or filter_projects. No guidance on when not to use it.

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