Skip to main content
Glama
soil-dev

capsulemcp

get_site

Retrieve the currently authenticated Capsule account details including subdomain, display name, and URL. Diagnose which Capsule account this connector is connected to.

Instructions

Return the Capsule account this connector is currently authenticated against (subdomain, display name, URL). Diagnostic for 'which Capsule account is this?'. For the PAT owner's user identity, use get_current_user.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The tool handler that makes a GET request to "/site" via capsuleGet and returns the site data.
    export async function getSite(_input: z.infer<typeof getSiteSchema>) {
      const { data } = await capsuleGet<{ site: unknown }>("/site");
      return data;
    }
  • Schema definition: no input parameters required (empty Zod object).
    export const getSiteSchema = z.object({});
  • src/server.ts:943-949 (registration)
    Registration of the "get_site" tool on the MCP server via the registerTool helper.
    registerTool(
      server,
      "get_site",
      "Return the Capsule account this connector is currently authenticated against (subdomain, display name, URL). Diagnostic for 'which Capsule account is this?'. For the PAT owner's user identity, use get_current_user.",
      getSiteSchema,
      getSite,
    );
  • Helper function that wraps the tool handler and registers it with the MCP server, formatting the result as JSON text content.
    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);
      });
    }
  • HTTP GET helper used by getSite to call the Capsule API's /site endpoint.
    export async function capsuleGet<T>(path: string, params?: QueryParams): Promise<PagedResult<T>> {
      const token = getToken();
      const url = buildUrl(path, params);
      const { res, cleanup } = await doFetch(url, { headers: baseHeaders(token) });
      try {
        const data = await handleResponse<T>(res);
        const nextPage = parseNextPage(res.headers.get("Link"));
        return { data, nextPage };
      } finally {
        cleanup();
      }
    }
Behavior3/5

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

No annotations provided; description carries full burden. It implicitly indicates read-only ('Return'), but does not disclose potential failure cases (e.g., authentication issues). For a simple diagnostic, this is adequate but not rich.

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?

Two concise sentences: first describes what the tool does, second clarifies sibling differentiation. Every word earns its place, no redundancy.

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

Completeness5/5

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

Given the tool's simplicity (no parameters, no output schema), the description is complete. It tells what it returns and how it differs from get_current_user, sufficient for correct invocation.

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?

Zero parameters with 100% schema coverage. Description adds value by specifying the returned fields (subdomain, display name, URL) beyond the empty schema, meeting the baseline of 4.

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 it returns the Capsule account info (subdomain, display name, URL) and distinguishes itself from get_current_user, making purpose and scope unambiguous.

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?

Description explicitly states diagnostic use case and differentiates from sibling tool get_current_user, providing clear context for when to use it. No explicit when-not, but sufficient for a simple read operation.

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