Skip to main content
Glama
yantrix-ai

@praveen030686/data-apis-mcp

Batch Extract Text

web_extract_batch
Read-onlyIdempotent

Extract text from multiple web pages simultaneously, processing up to 5 URLs in one request for efficient data collection.

Instructions

Extract text from up to 5 URLs in a single request. Costs $0.08 USDC per request via x402 on Base.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
urlsYesArray of URLs to extract (max 5)

Implementation Reference

  • The async handler function that calls the web extract batch API.
    async ({ urls }) => {
      const data = await apiPost(`${WEB_EXTRACT_API}/api/v1/extract/batch`, { urls });
      return { content: [{ type: "text", text: JSON.stringify(data, null, 2) }] };
    }
  • src/index.ts:370-385 (registration)
    Registration of the web_extract_batch tool using server.registerTool.
    server.registerTool(
      "web_extract_batch",
      {
        title: "Batch Extract Text",
        description: `Extract text from up to 5 URLs in a single request.
    Costs $0.08 USDC per request via x402 on Base.`,
        inputSchema: {
          urls: z.array(z.string().url()).min(1).max(5).describe("Array of URLs to extract (max 5)"),
        },
        annotations: { readOnlyHint: true, destructiveHint: false, idempotentHint: true, openWorldHint: true },
      },
      async ({ urls }) => {
        const data = await apiPost(`${WEB_EXTRACT_API}/api/v1/extract/batch`, { urls });
        return { content: [{ type: "text", text: JSON.stringify(data, null, 2) }] };
      }
    );
  • Input schema definition for the tool, restricting input to an array of 1-5 URLs.
    inputSchema: {
      urls: z.array(z.string().url()).min(1).max(5).describe("Array of URLs to extract (max 5)"),
    },
Behavior4/5

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

Annotations already indicate this is a safe, read-only, idempotent operation (readOnlyHint: true, destructiveHint: false, idempotentHint: true). The description adds valuable behavioral context beyond annotations by disclosing the cost ('$0.08 USDC per request via x402 on Base'), which is critical for usage decisions. It doesn't describe rate limits or output format, but with annotations covering core traits, this is sufficient.

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—two sentences that efficiently convey key information: the batch operation and cost. Every word earns its place, with no redundancy or fluff, and it's front-loaded with the core functionality.

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 tool's moderate complexity (batch extraction with cost), annotations cover safety and idempotency, and the schema fully documents parameters. The description adds crucial cost information, which isn't in structured fields. However, without an output schema, it doesn't describe return values (e.g., text format, error handling), leaving a minor gap for a tool with financial implications.

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?

The input schema has 100% description coverage, with the 'urls' parameter fully documented (array of URIs, min 1, max 5). The description reinforces the batch limit ('up to 5 URLs') but doesn't add significant meaning beyond what the schema provides, such as URL format requirements or extraction behavior. Baseline 3 is appropriate given high schema coverage.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the action ('Extract text') and resource ('from up to 5 URLs'), making the purpose specific. It distinguishes from siblings like web_extract_metadata or web_extract_structured by focusing on text extraction, but doesn't explicitly differentiate from web_extract_text (which appears to be a single-URL version).

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 context through the batch limit ('up to 5 URLs') and cost information, suggesting this is for batch processing. However, it doesn't provide explicit guidance on when to use this versus alternatives like web_extract_text (likely for single URLs) or other extraction tools, nor does it mention prerequisites or exclusions.

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