Skip to main content
Glama

翻译文档

fanbei_translate_document

Upload a document via local path, public URL, or base64 and order translation; optionally auto-confirm credits and wait for completion.

Instructions

上传一个文档并下单翻译。文件来源三选一:file_path(本地路径,stdio 模式用)、file_url(公网直链)、file_base64(≤50MB,远程模式用)。auto_confirm=True 会立刻扣积分并开始翻译;False 只上传返回 tranId。wait_seconds>0 会同步等待到完成或超时(超时仍可用 fanbei_task_status 继续查)。

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "fanbei_translate_document"
  }
}

Input Schema

NameRequiredDescriptionDefault
ocrNo
engineNoBAIDU
file_urlNo
filenameNo
bilingualNo
file_pathNo
file_base64No
source_langNo1
target_langNo2
auto_confirmNo
wait_secondsNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.2/5.0
Behavior4/5

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

Beyond the annotations (readOnlyHint=false, destructiveHint=false, openWorldHint=true), the description discloses the consequential behavior an agent most needs: auto_confirm=True deducts credits immediately and starts work, while False only uploads and returns a tranId. The synchronous wait semantics and timeout recovery path are also spelled out. What is missing is the consequence of repeated calls (idempotentHint=false means re-calls create new orders and charge again), which is left to the annotations.

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 dense clauses, each front-loaded with its key fact (file source, credit behavior, wait behavior), with no filler or restatement of the tool name. Every phrase carries actionable information an agent needs before calling.

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 an 11-parameter, no-output-schema, side-effecting upload tool, the description covers the full workflow arc: upload, optional immediate order, and how to follow up. It even indicates the return value shape (tranId) in the non-confirming branch. It falls short only on the language/engine knobs and on what the response looks like when auto_confirm=True completes.

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 coverage is 0% (titles only), so the description carries the full burden and it explains five of eleven parameters well — the three file sources, auto_confirm, and wait_seconds. However, ocr, engine, filename, bilingual, source_lang, and target_lang are entirely undocumented, and the opaque defaults (engine="BAIDU", source_lang="1", target_lang="2") give an agent no way to know the accepted values without calling fanbei_engines.

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 first sentence names a specific two-part action (upload a document and place a translation order), which is precisely what distinguishes it from fanbei_task_status (query) and fanbei_download (retrieve). It also explicitly routes to fanbei_task_status for polling after a timeout, so an agent can place it among its siblings without opening any schema.

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 concrete selection rules for the three mutually exclusive file-source parameters, tied to transport mode (file_path for stdio, file_base64 for remote, file_url for public links), plus the 50MB cap. It also states when to use wait_seconds versus falling back to fanbei_task_status. The one gap is that it never mentions fanbei_quote, even though auto_confirm=True deducts credits immediately.

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