Skip to main content
Glama
yantrix-ai

@praveen030686/data-apis-mcp

web_extract_translate

Extract text from any webpage URL and translate it to your target language using USDC micropayments on Base.

Instructions

Extract text from a URL and translate it to any language. Costs $0.10 USDC per request via x402 on Base.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
urlYesURL to extract and translate
languageYesTarget language (e.g., Spanish, French, Hindi, Japanese)

Implementation Reference

  • The handler function for web_extract_translate which calls the external translation API.
      async ({ url, language }) => {
        const data = await apiPost(`${WEB_EXTRACT_API}/api/v1/extract/translate`, { url, language });
        return { content: [{ type: "text", text: JSON.stringify(data, null, 2) }] };
      }
    );
  • src/index.ts:405-416 (registration)
    Registration of the web_extract_translate tool with its schema.
    server.registerTool(
      "web_extract_translate",
      {
        title: "Extract and Translate",
        description: `Extract text from a URL and translate it to any language.
    Costs $0.10 USDC per request via x402 on Base.`,
        inputSchema: {
          url: z.string().url().describe("URL to extract and translate"),
          language: z.string().min(2).max(30).describe("Target language (e.g., Spanish, French, Hindi, Japanese)"),
        },
        annotations: { readOnlyHint: true, destructiveHint: false, idempotentHint: true, openWorldHint: true },
      },

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