Skip to main content
Glama
yantrix-ai

@praveen030686/data-apis-mcp

web_extract_text

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)"),
    },

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