Skip to main content
Glama
yantrix-ai

@praveen030686/data-apis-mcp

Extract Text from URL

web_extract_text
Read-onlyIdempotent

Extract clean, readable text from web pages. Converts webpage content into plain text format for analysis or processing.

Instructions

Extract clean, readable text from any web page URL. Costs $0.01 USDC per request via x402 on Base.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
urlYesURL to extract text from (e.g., https://example.com)

Implementation Reference

  • The handler function for web_extract_text that calls the external API.
    async ({ url }) => {
      const data = await apiPost(`${WEB_EXTRACT_API}/api/v1/extract/text`, { url });
      return { content: [{ type: "text", text: JSON.stringify(data, null, 2) }] };
    }
  • src/index.ts:268-283 (registration)
    Registration of the web_extract_text tool with the MCP server.
    server.registerTool(
      "web_extract_text",
      {
        title: "Extract Text from URL",
        description: `Extract clean, readable text from any web page URL.
    Costs $0.01 USDC per request via x402 on Base.`,
        inputSchema: {
          url: z.string().url().describe("URL to extract text from (e.g., https://example.com)"),
        },
        annotations: { readOnlyHint: true, destructiveHint: false, idempotentHint: true, openWorldHint: true },
      },
      async ({ url }) => {
        const data = await apiPost(`${WEB_EXTRACT_API}/api/v1/extract/text`, { url });
        return { content: [{ type: "text", text: JSON.stringify(data, null, 2) }] };
      }
    );
  • The input schema for web_extract_text requiring a URL.
    inputSchema: {
      url: z.string().url().describe("URL to extract text from (e.g., https://example.com)"),
    },
Behavior3/5

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

Annotations already cover key behavioral traits (read-only, open-world, idempotent, non-destructive). The description adds useful context about the cost ($0.01 USDC per request via x402 on Base), which is not captured in annotations. However, it lacks details on rate limits, error handling, or output format, limiting its transparency.

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 and front-loaded, consisting of two sentences that efficiently convey the core functionality and cost. Every sentence adds value without redundancy, making it easy for an agent to parse and understand.

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

Completeness3/5

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

Given the tool's simplicity (one parameter, no output schema) and rich annotations, the description is somewhat complete but lacks critical details. It does not explain the return format (e.g., plain text, structured data) or potential limitations (e.g., URL accessibility, content types), which are important for an agent to use the tool effectively.

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 'url' parameter well-documented. The description does not add any semantic details beyond what the schema provides, such as URL validation rules or supported protocols. With high schema coverage, a baseline score of 3 is appropriate.

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 tool's purpose as extracting clean, readable text from web page URLs. It uses specific verbs ('extract') and resources ('text from any web page URL'), but does not explicitly differentiate from sibling tools like web_extract_structured or web_extract_ai_summary, which might offer similar text extraction with additional processing.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives. It mentions a cost per request, but does not specify scenarios where this tool is preferred over siblings like web_extract_batch or web_extract_structured, leaving the agent without usage context.

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