Skip to main content
Glama
yantrix-ai

@praveen030686/data-apis-mcp

Extract and Translate

web_extract_translate
Read-onlyIdempotent

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 },
      },
Behavior4/5

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

Annotations already indicate this is a read-only, non-destructive, idempotent operation with open-world data. The description adds valuable context beyond annotations: it discloses the cost ('$0.10 USDC per request') and payment mechanism ('via x402 on Base'), which are critical behavioral traits not covered by annotations. No contradiction with annotations exists.

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) and front-loaded with the core functionality. Every sentence adds value: the first defines the tool's purpose, and the second provides critical cost information. There is no wasted text or redundancy.

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 (two parameters, no output schema), the description is mostly complete. It covers purpose, cost, and payment method, but lacks details on output format (e.g., structure of translated text) or error handling. With annotations providing safety context, it's adequate but could be more comprehensive.

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 clear descriptions for both parameters (URL and target language). The description does not add any semantic details beyond what the schema provides (e.g., it doesn't explain language code formats or URL constraints). With high schema coverage, the baseline score of 3 is appropriate.

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 from a URL and translate it to any language'), identifying both the resource (URL text) and the operation (extract + translate). It distinguishes itself from sibling tools like 'web_extract_text' (extract only) and 'web_extract_ai_summary' (extract + summarize).

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 (when you need both extraction and translation of web content) but does not explicitly state when to use this tool versus alternatives like 'web_extract_text' followed by a separate translation tool, or when not to use it (e.g., for non-text content). No explicit alternatives or exclusions are provided.

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