Skip to main content
Glama
maderwin

pinchtab-mcp

Health Check

pinchtab_health

Determines if the PinchTab server is operational and responsive for browser automation.

Instructions

Check if PinchTab server is running and responsive.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • Registration of 'pinchtab_health' tool with server.registerTool(), including description and inputSchema.
    server.registerTool(
      "pinchtab_health",
      {
        description: "Check if PinchTab server is running and responsive.",
        inputSchema: z.object({}),
        title: "Health Check",
      },
      async () => {
        try {
          return toolResult(await pinch("GET", "/health"));
        } catch (error) {
          return toolError(error);
        }
      },
    );
  • Handler function that executes the health check by calling pinch('GET', '/health') and returning the result or error.
    async () => {
      try {
        return toolResult(await pinch("GET", "/health"));
      } catch (error) {
        return toolError(error);
      }
    },
  • Input schema for pinchtab_health: empty object (no parameters needed). Title is 'Health Check'.
    {
      description: "Check if PinchTab server is running and responsive.",
      inputSchema: z.object({}),
      title: "Health Check",
  • The pinch() helper function used by the handler to make HTTP requests to the PinchTab server (GET /health).
    export async function pinch(
      method: string,
      path: string,
      body?: Record<string, unknown>,
    ): Promise<unknown> {
      if (!(await isPinchtabRunning())) {
        await ensurePinchtabRunning();
      }
    
      const headers: Record<string, string> = {
        "Content-Type": "application/json",
      };
      if (PINCHTAB_TOKEN) {
        headers["Authorization"] = `Bearer ${PINCHTAB_TOKEN}`;
      }
    
      const url = `${PINCHTAB_URL}${path}`;
    
      let res: Response;
      try {
        res = await fetch(url, {
          body: body ? JSON.stringify(body) : undefined,
          headers,
          method,
          signal: AbortSignal.timeout(REQUEST_TIMEOUT_MS),
        });
      } catch (error) {
        if (error instanceof DOMException && error.name === "TimeoutError") {
          throw new Error(`PinchTab ${method} ${path} timed out after ${REQUEST_TIMEOUT_MS / 1000}s`);
        }
        throw error;
      }
    
      if (!res.ok) {
        const text = await res.text();
        throw new Error(`PinchTab ${method} ${path} → ${res.status}: ${text}`);
      }
    
      const contentType = (res.headers.get("content-type") ?? "").split(";")[0].toLowerCase().trim();
      if (contentType === "application/json") {
        return res.json();
      }
      return res.text();
    }
  • Utility functions toolResult() and toolError() used by the handler to format success/error responses.
    export function toolResult(data: unknown): ToolResult {
      return { content: [{ text: toJson(data), type: "text" as const }] };
    }
    
    /** Format an error as an MCP tool error response. */
    export function toolError(error: unknown): ToolResult {
      const message = error instanceof Error ? error.message : String(error);
      return {
        content: [{ text: message, type: "text" as const }],
        isError: true,
      };
Behavior4/5

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

With no annotations, the description carries the burden. It indicates the operation is a read-only check, but does not detail behavior on failure (e.g., timeout, error message) or response format. For a simple health check, the description is adequately transparent.

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?

The description is a single, precise sentence with no extraneous information, fitting the recommendation to be front-loaded and concise.

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

Completeness2/5

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

Without an output schema, the agent cannot determine the tool's return type (e.g., boolean, status text). The description omits what 'running and responsive' means in terms of response, leaving the agent without necessary context to handle the result.

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 input schema has zero parameters, so schema coverage is 100%. Baseline score of 4 applies as the description need not 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 clearly states the verb 'Check' and the resource 'PinchTab server', specifying what is checked ('running and responsive'). It effectively distinguishes from sibling tools like pinchtab_click or pinchtab_navigate, which are action-oriented for browser interactions.

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 the tool is for verifying server availability, but lacks explicit guidance on when to use it (e.g., before other operations) or when not to (e.g., if server is definitely down). No alternatives are mentioned, though no sibling tool duplicates this function.

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/maderwin/pinchtab-mcp'

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