Skip to main content
Glama

health_check

Read-onlyIdempotent

Check if Puppeteer and Chromium are operational. Use this tool when rendering fails to diagnose launch issues.

Instructions

Verify Puppeteer/Chromium can launch. Use when render fails.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The actual handler function for the health_check tool. It launches a browser via Puppeteer, returns version info, platform details, and outDir, or an error if the browser fails to launch.
    export async function handleHealthCheck(version: string) {
      try {
        const browser = await launchBrowser();
        const browserVersion = await browser.version();
        await browser.close();
        return {
          content: [{
            type: "text" as const,
            text: JSON.stringify({
              ok: true,
              serverVersion: version,
              browser: browserVersion,
              platform: process.platform,
              arch: process.arch,
              nodeVersion: process.version,
              outDir: defaultOutDir(),
              pid: process.pid,
            }, null, 2),
          }],
        };
      } catch (err: any) {
        return {
          content: [{
            type: "text" as const,
            text: JSON.stringify({ ok: false, error: err.message, platform: process.platform }),
          }],
          isError: true,
        };
      }
    }
  • Registration of the health_check tool on the McpServer. It has an empty schema (no inputs), read-only hint, and invokes handleHealthCheck(VERSION).
    server.tool(
      "health_check",
      "Verify Puppeteer/Chromium can launch. Use when render fails.",
      {},
      { readOnlyHint: true, destructiveHint: false, idempotentHint: true, openWorldHint: false },
      async () => handleHealthCheck(VERSION),
    );
  • The launchBrowser helper function used by handleHealthCheck to launch Puppeteer/Chromium with secure sandbox args.
    export async function launchBrowser(): Promise<Browser> {
      try {
        return await puppeteer.launch({
          headless: true,
          args: LAUNCH_ARGS,
          timeout: 30000,
        });
      } catch (err: any) {
        throw new Error(
          `browser_launch_failed: ${err.message}. ` +
          `Ensure Chromium is available. On containers, verify /dev/shm size or set --disable-dev-shm-usage.`,
        );
      }
    }
  • The defaultOutDir helper function used by handleHealthCheck to determine the output directory path.
    export function defaultOutDir(): string {
      if (process.env.SLIDESHOT_OUTPUT_DIR) {
        return process.env.SLIDESHOT_OUTPUT_DIR;
      }
    
      const home = os.homedir();
    
      const desktop = path.join(home, "Desktop");
      if (fs.existsSync(desktop)) {
        return path.join(desktop, "slideshot-output");
      }
    
      const downloads = path.join(home, "Downloads");
      if (fs.existsSync(downloads)) {
        return path.join(downloads, "slideshot-output");
      }
    
      return path.join(os.tmpdir(), "slideshot-output");
    }
    
    export function resolveFormats(formats?: ImageFormat[]): ImageFormat[] {
      if (!formats || formats.length === 0) return ["pdf"];
      return formats;
    }
Behavior4/5

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

Annotations already declare readOnly, idempotent, and not destructive. The description adds specific behavioral context (launch verification) beyond what annotations provide, without contradiction.

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, front-loaded sentences that each carry essential information: what the tool does and when to use it. No extraneous content.

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 zero parameters and no output schema, the description fully covers the tool's purpose and usage context. Annotations provide safety guarantees. Complete for this simple tool.

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?

No parameters exist, so the baseline is 4. The description does not need to add parameter details.

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 'Verify' and identifies the resource 'Puppeteer/Chromium can launch'. It clearly distinguishes this diagnostic tool from the slide and theme 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?

Explicitly states 'Use when render fails', providing clear context for when to invoke this tool. Could mention when not to use, but the guidance is sufficient for a simple diagnostic.

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/06ketan/slideshot'

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