Skip to main content
Glama

Translate a document

translate_document

Translate documents between languages while keeping layout, tables, images and formulas intact. Accepts common file formats and saves the translated copy next to the source.

Instructions

Translate a document into another language while keeping its layout, tables, images and formulas. Takes .docx, .pdf, .pptx, .xlsx, .epub, .html and .txt. Saves the result next to the source and returns its path. COSTS CREDITS at 10 per 1,000 words processed (10 minimum) - say so and get agreement first.

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": {
      "document_path": "<document_path>",
      "target_lang": "<target_lang>"
    },
    "name": "translate_document"
  }
}

Input Schema

NameRequiredDescriptionDefault
output_pathNoWhere to write the result; defaults to beside the source
source_langNoSource language, or auto to detect it (the default)
target_langYesTarget language: zh, en, zh-tw, ja, ko, es, fr, pt, ru, de, pl or it
wait_secondsNoHow long to wait before returning a job id (default 55)
document_pathYesAbsolute path to the document

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A4.2/5.0
Behavior4/5

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

Annotations only declare it is a non-read-only, non-destructive write; the description adds the real behavioral facts an agent needs: credit cost and rate (10 per 1,000 words, 10 minimum), that output is saved beside the source, and that a path is returned. It omits that the call may return a job id requiring the check_job sibling, which is the one significant undisclosed trait.

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?

Three tightly packed sentences led by the core action, then scope, then output, then the cost warning in caps. Every sentence carries distinct information and nothing is repeated from the schema.

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 paid mutation tool it covers the essentials: what is preserved, accepted formats, where output lands, what is returned, and the cost/consent requirement. The missing piece is the asynchronous job-id path (wait_seconds default 55, then check_job), which an agent needs to complete the workflow.

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 all five parameters are already documented in the schema; the description only reinforces the default output location ('saves the result next to the source'). It adds no language-format guidance or detail on wait_seconds/job behavior beyond the schema.

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 a specific verb+resource (translate a document) plus the distinguishing property that sets it apart from siblings like condense_document or humanize_document: layout/tables/images/formulas are preserved, and a file is written. The supported format list further pins down exactly what it operates on.

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?

Gives a concrete, actionable usage rule: it costs credits, so the agent must say so and get agreement first. It does not name a sibling alternative or state when-not to use it (e.g. condense vs translate), so it falls short of the explicit routing seen in top-tier definitions.

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