Skip to main content
Glama
yantrix-ai

@praveen030686/data-apis-mcp

Extract Text from PDF

web_extract_pdf
Read-onlyIdempotent

Extract text content from PDF files by providing a URL. This tool processes PDF documents to retrieve readable text for analysis or integration.

Instructions

Extract text content from any PDF URL. Costs $0.03 USDC per request via x402 on Base.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
urlYesPDF URL to extract text from

Implementation Reference

  • src/index.ts:319-334 (registration)
    The "web_extract_pdf" tool is registered here with its schema and handler implementation.
    server.registerTool(
      "web_extract_pdf",
      {
        title: "Extract Text from PDF",
        description: `Extract text content from any PDF URL.
    Costs $0.03 USDC per request via x402 on Base.`,
        inputSchema: {
          url: z.string().url().describe("PDF URL to extract text from"),
        },
        annotations: { readOnlyHint: true, destructiveHint: false, idempotentHint: true, openWorldHint: true },
      },
      async ({ url }) => {
        const data = await apiPost(`${WEB_EXTRACT_API}/api/v1/extract/pdf`, { url });
        return { content: [{ type: "text", text: JSON.stringify(data, null, 2) }] };
      }
    );
Behavior4/5

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

Annotations already cover read-only, open-world, idempotent, and non-destructive behavior. The description adds valuable context about the cost ('$0.03 USDC per request via x402 on Base'), which is not captured in annotations and is critical for usage decisions. No contradictions with annotations exist.

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 extremely concise with two sentences: the first states the core functionality, and the second provides essential cost information. Every sentence adds value without any redundancy or fluff.

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?

Given the simple single-parameter input, comprehensive annotations, and lack of output schema, the description is mostly complete. It covers purpose and cost, but could benefit from mentioning output format (e.g., plain text) or limitations (e.g., PDF size, OCR support) to fully inform usage.

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

Parameters3/5

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

Schema description coverage is 100%, with the parameter 'url' fully documented in the schema as 'PDF URL to extract text from'. The description adds no additional parameter details beyond what the schema provides, meeting the baseline for high schema coverage.

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 specific action ('Extract text content') and resource ('from any PDF URL'), distinguishing it from siblings like web_extract_metadata or web_extract_structured by focusing on raw text extraction from PDFs specifically.

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 for PDF text extraction but provides no explicit guidance on when to use this tool versus alternatives like web_extract_text (for general web content) or web_extract_structured (for structured data). The cost mention hints at financial considerations but doesn't define selection criteria.

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/yantrix-ai/x402-apis-mcp-server'

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