Skip to main content
Glama

translate_document

Submit document translation tasks for PDF, Office, text, and image files, with automatic OCR detection for scanned PDFs and immediate order number retrieval.

Instructions

提交文档翻译任务。请先调用 get_model_list 获取可用模型,调用 get_supported_languages 获取支持的语言列表,然后让用户选择模型和目标语言。返回中的 orders[].translateOrderNo 即订单号,直接用它调 wait_for_translation,无需再查列表。图片(png/jpg/jpeg)也走这个工具——服务端把它们当 IMAGE 类型,按 1 页计费,且一律走 OCR(扣的是 OCR 额度),不需要另外的图片翻译接口。支持的格式:PDF / DOCX / PPTX / XLSX / TXT / EPUB / 图片。提交前本工具会对 file_list 里的 PDF 自动判定是不是扫描件(只有 PDF 有这个概念),据此填 OCR 开关,结果在返回的 msg 和 ocrDetection 里——请把「走没走 OCR」原样告诉用户,那关系到扣哪一本额度。若返回 code=202,表示判定还没出来,本次没有提交、没有扣费(data.submitted / data.charged 都是 false,data.detecting 是还在测的文件):等十几秒用完全相同的参数再调一次本工具即可,不要重新上传文件、也不要改参数。这一步挡着是因为判错两边都要付代价:扫描件按普通 PDF 翻会出一片空白,OCR 又扣另一本额度。确实等不及、或者反复 202 一直不出结果,就显式传 is_ocr(0=按普通 PDF 翻,1=强制整批走 OCR)绕过它。若返回非 200(如 600 系统繁忙),说明是翻译服务侧的问题而非上传问题:用相同参数重试本工具即可,不要重新上传文件。

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
modelYes翻译模型。这是必填项,请先调用 get_model_list 获取当前用户可用的模型列表,然后让用户选择。
is_ocrNo是否启用 OCR,0=否,1=是。**不要自己判断,正常情况下不要传**:提交前服务端会对每个 PDF 调分类接口,按真实结果逐个标记,比看文件名靠谱得多。这个参数的真实含义是「强制整批走 OCR」——服务端见到 1 就把批次里每个 PDF 都按 OCR 记账,不再看检测结果,文本版那几份等于白扣 OCR 额度。所以只有用户明确要求强制 OCR 时才传 1;传了不会被改掉,但返回里会提醒你这和检测结果不符。注意 OCR 扣的是 OCR 额度,和普通翻译不是同一本账。
file_listYes文件列表,每个文件包含 fileName 和 fileObjectKey
source_languageYes源语言代码,如 'en', 'zh-CN', 'ja', 'AnyLanguage'。如果用户未指定,请让用户从 get_supported_languages 返回的列表中选择。
target_languageYes目标语言代码,如 'zh-CN', 'en', 'ja'。这是必填项,如果用户未指定,请让用户从 get_supported_languages 返回的列表中选择。
terminology_collection_idNo术语表 ID(选填)。带上之后,这一批文件里凡是命中术语表的词都按表里指定的译法翻。**不要自己编,也不要猜**:这个 ID 只能由用户提供——他登录 belindoc.com 网页端、在术语库页面拿到。本服务没有列出术语表的工具,因为上游管理术语表的那几个接口认的是网页登录态而不是 API Key。用户没主动提术语表就别传这个参数,更不要为了它去打断用户。另外上游收到这个 ID 既不校验归属也不校验存在:写错或写了个不存在的,提交照样成功、翻译照常跑,只是术语表静默不生效,事后没有任何地方看得出来——所以只转述用户给的原值,一个字符都不要改。

Schema Changelog

Changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. First observedv0.1.0

TDQS

A4.9/5.0
Behavior5/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. It is exceptionally transparent: it details OCR detection before submission, the meaning of code=202 (not charged), the data fields submitted/charged/detecting, the is_ocr override behavior and its side effects, the OCR quota implications, and that non-200 errors come from the translation service rather than upload. This goes far beyond a basic description.

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?

Although long, every sentence carries meaningful, non-redundant operational information. Important warnings are bolded (code=202, no charge), and the narrative is front-loaded with the primary purpose. The density corresponds directly to the complexity of the tool, and there is no filler.

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?

There is no output schema, so the description must explain return fields and side effects, and it does: orders[].translateOrderNo, msg, ocrDetection, data.submitted/charged/detecting. It also handles edge cases (202 retry, service-busy 600, is_ocr override) and prerequisite steps. For a tool with this complexity, the description is remarkably complete.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100% and the schema itself already provides detailed parameter descriptions. The tool description adds valuable operational context for parameters, especially is_ocr (when not to set it, what it means, and the warning about incorrect usage) and file_list (PDF scanning auto-detection). It slightly overlaps with schema content but enhances it with real usage guidance.

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 '提交文档翻译任务' (submit a document translation task), names the supported formats, and explicitly distinguishes this from other siblings such as translate_video and wait_for_translation. It also explains that images go through this same tool, eliminating ambiguity about which tool to use for a given input type.

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

Usage Guidelines5/5

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

Provides explicit workflow: first call get_model_list and get_supported_languages, then let the user choose model and target language. It states exactly when to use this tool vs alternatives, including using the returned translateOrderNo to call wait_for_translation directly instead of re-querying lists, and that images do not require a separate interface. It also gives specific retry instructions for code=202 and non-200 responses.

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

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/zhang452064326/belindoc-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server