Skip to main content
Glama

PDF → Markdown → Translate

pdf_to_markdown_then_translate

Convert a public PDF URL to Markdown via MinerU, then translate the markdown via the public text API. Pass file_url (or files with exactly 1 PDF http(s) URL; path must end in .pdf) and required target_lang. Optional: source_lang (default auto), include_source_markdown (default true), wait_seconds (default 45, max 55). URL max 2048 chars. Returns markdown, translated_markdown, bilingual_markdown, task_id, target_lang. Cost: 2 credits per call (MinerU 1 + translate_text 1), charged by mcp-credit-gateway before forwarding. DOCX input is not supported this wave. Compliance: Use only on documents you own or are explicitly licensed/authorized to convert and translate. Do not upload or redistribute copyrighted material without permission. Output markdown is ephemeral and must not be abused for bulk scraping. Calls are rate-limited/metered by mcp-credit-gateway and require a valid sk_live_ key. (仅处理自有或已获授权文档;禁止滥用转换/翻译他人受版权保护材料;调用限频。)

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "target_lang": "<target_lang>"
    },
    "name": "pdf_to_markdown_then_translate"
  }
}

Input Schema

NameRequiredDescriptionDefault
filesNoAlternative to `file_url`: exactly one public http(s) PDF URL.
file_urlNoPublic http(s) PDF URL (<= 2048 chars, path must end in .pdf). Provide either `file_url` or a single-element `files` array.
source_langNoOptional source language code (default `auto`).
target_langYesTarget language code for translation (e.g. `zh`, `en`, `ja`). Required.
wait_secondsNoHow long to wait for MinerU, 0–55 seconds (default 45).
idempotency_keyNoOptional caller correlation key. Billing is handled by mcp-credit-gateway.
include_source_markdownNoWhen true (default), include original MinerU markdown in the result.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.1/5.0
Behavior5/5

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

Beyond the annotations (which only say non-read-only, open-world, non-idempotent, non-destructive), the description discloses billing mechanics (2 credits, MinerU 1 + translate_text 1, charged by mcp-credit-gateway before forwarding), rate limiting/metering, an `sk_live_` auth requirement, the 55-second wait cap, and that output markdown is ephemeral. That is exactly the kind of operational context annotations cannot carry.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The front half is dense and front-loaded with the essential call contract, but the compliance paragraph is long and the trailing Chinese sentence repeats the English licensing/rate-limit warning verbatim in another language, adding bulk without new information. Cost and return-field lists are useful but push the compliance boilerplate into an outsized share of the text.

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

Completeness5/5

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

With no output schema, the description correctly enumerates the return fields (`markdown`, `translated_markdown`, `bilingual_markdown`, `task_id`, `target_lang`), and it covers cost, auth, timing, and licensing constraints for a 7-parameter networked pipeline. An agent has everything needed to decide, authenticate, and call it without guessing.

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%, so every parameter is already documented in the schema, including the `file_url`/`files` mutual exclusivity, 2048-char cap, and defaults. The description restates those same facts (URL cap, `wait_seconds` default 45/max 55, `include_source_markdown` default true) without materially extending them, so baseline 3 applies.

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 states a concrete two-stage verb chain: 'Convert a public PDF URL to Markdown via MinerU, then translate the markdown via the public text API', which tells an agent exactly what the tool produces. It is specific about input type (public PDF URL) and output artifacts, but it never explicitly distinguishes itself from nearby siblings such as convert_to_markdown, translate_document, or translate_text, leaving the agent to infer that this is the combined pipeline.

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

Usage Guidelines4/5

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

It gives clear operating context: provide `file_url` or a single-element `files`, the path must end in `.pdf`, `target_lang` is required, and DOCX is rejected this wave — an implicit exclusion that steers callers elsewhere. There are exclusions (DOCX) but no positive alternative named, so the agent is not explicitly routed to translate_document or convert_to_markdown for other cases.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.