Skip to main content
Glama
maderwin

pinchtab-mcp

Get Text

pinchtab_get_text

Get readable text from any web page to extract article content or page information via accessibility tree snapshots.

Instructions

Get readable text content from the page (~800 tokens). Best for extracting article content or page information.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The async handler function for the pinchtab_get_text tool. It calls pinch('GET', '/text') to fetch readable page content from the PinchTab server, then returns it as a text content block. Wraps errors via toolError().
    async () => {
      try {
        const result = await pinch("GET", "/text");
        const text = typeof result === "string" ? result : toJson(result);
        return { content: [{ text, type: "text" as const }] };
      } catch (error) {
        return toolError(error);
      }
    },
  • The tool registration call including the schema (z.object({}) — no input parameters), description, and title for pinchtab_get_text.
    {
      description:
        "Get readable text content from the page (~800 tokens). Best for extracting article content or page information.",
      inputSchema: z.object({}),
      title: "Get Text",
  • The registerContentTools function registers pinchtab_get_text (along with screenshot, eval, pdf) on the MCP server via server.registerTool().
    export function registerContentTools(server: McpServer) {
      server.registerTool(
        "pinchtab_get_text",
        {
          description:
            "Get readable text content from the page (~800 tokens). Best for extracting article content or page information.",
          inputSchema: z.object({}),
          title: "Get Text",
        },
        async () => {
          try {
            const result = await pinch("GET", "/text");
            const text = typeof result === "string" ? result : toJson(result);
            return { content: [{ text, type: "text" as const }] };
          } catch (error) {
            return toolError(error);
          }
        },
      );
  • registerAllTools calls registerContentTools(server) which registers pinchtab_get_text on the MCP server.
    export function registerAllTools(server: McpServer) {
      registerInstanceTools(server);
      registerNavigationTools(server);
      registerInteractionTools(server);
      registerContentTools(server);
    }
  • The pinch() helper function that makes HTTP requests to the PinchTab server. Used by the handler to GET /text. Handles auth, timeouts, and JSON/text response parsing.
    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();
    }
Behavior3/5

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

No annotations provided, so description carries full burden. It discloses that output is readable and limited to ~800 tokens, but doesn't mention whether the tool is read-only, how it handles large pages, or if it waits for page load.

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 sentences, no fluff. Clearly communicates the action, token limit, and best use case.

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 tool with no parameters and no output schema, the description is fairly complete. It explains the essence and limitation, but could mention prerequisites (e.g., page must be loaded) or behavior on large pages.

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?

There are no parameters, and schema coverage is 100%. Baseline for 0 parameters is 4; description adds no redundant param info.

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?

Description clearly states the verb ('Get'), resource ('readable text content'), and scope ('from the page, up to 800 tokens'). Distinguishes from siblings like pinchtab_snapshot which might return raw HTML.

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 says 'Best for extracting article content or page information' which indicates when to use, but does not explicitly mention when not to use or provide alternative tools.

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