Skip to main content
Glama

Polytranslator

Translate a document

translate_document

Translate a PDF (native or scanned), Word, PowerPoint, Excel, EPUB or image file and get a translated file with its layout preserved (native formats retain their type; images return PNG; converted formats return DOCX). Also accepts DOC, ODT, RTF, TXT, Markdown, HTML, subtitles, CSV and ebooks. Up to 50 MB and 1,000 PDF pages. Waits up to wait_seconds; if the document is still running, call get_document with the returned id. Charges the quoted credits once; failed documents are refunded.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
tierNofast (default) or advanced (most accurate, more credits).
outputNoformatted (default): layout preserved; native formats retain their type, images return PNG, converted formats return DOCX. text: translated text only, usually cheaper.
file_urlNoPublic https URL of the document. Provide this or file_base64.
filenameNoFile name with extension, e.g. contract.pdf. Required with file_base64; optional with file_url.
file_base64NoThe document's bytes, base64-encoded. Requires filename.
max_creditsNoRefuse (without charging) if the document would cost more credits than this.
wait_secondsNoHow long to wait for the result (default 50).
source_languageNoSource language name or code. Omit to detect it.
target_languageYesLanguage name (e.g. "Spanish", "Ancient Greek") or code from list_languages (e.g. "spa_Latn").

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedInput schema / properties / output / description
      Previous value: -"formatted (default): same file type, layout preserved. text: translated text only, usually cheaper."New value: +"formatted (default): layout preserved; native formats retain their type, images return PNG, converted formats return DOCX. text: translated text only, usually cheaper."
  2. First observed

TDQS

A4.3/5.0
Behavior5/5

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

Annotations only set generic flags (readOnlyHint false, openWorldHint true, etc.). The description adds critical behavioral detail: cost ('Charges the quoted credits once; failed documents are refunded'), asynchronous wait ('Waits up to wait_seconds'), and output format outcomes. These are significant beyond what annotations convey.

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

Conciseness4/5

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

A single paragraph but efficiently packed, starting with the main action and supported formats, then size limits, async behavior, and cost. Each sentence contributes new information without fluff. While it could be broken into bullets, the text is still concise and well-ordered.

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?

For a complex tool with 9 parameters and no output schema, the description covers supported formats, size/page limits, output format rules, async wait, and cost/refund. It mentions calling get_document for results, implying the return of an id. It does not specify the exact return structure, but that is a minor gap given the strong coverage of constraints and behaviors.

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 each parameter is already documented in the schema. The description reinforces meaning for 'output' (layout preservation and format outcomes) and 'wait_seconds' (waiting behavior), but adds little for others like file_url, file_base64, or target_language. It provides marginal added value over the schema, so baseline 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?

States the verb 'Translate' with the resource 'document' and enumerates supported file types (PDF, Word, PowerPoint, Excel, EPUB, image). It clarifies output behavior (native types retained, images return PNG, converted formats return DOCX), distinguishing it from translate_text which handles text-only. This is a precise, resource-specific purpose.

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?

Provides explicit usage for the asynchronous case: 'if the document is still running, call get_document with the returned id.' Also mentions cost and refund behavior. However, it does not explicitly direct users to translate_text for short text or quote_document for pricing, though the sibling list implies these alternatives. So it gives clear context for one scenario but not full exclusions.

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.