Skip to main content
Glama

Translate File

translate_file

Read a JSON locale file, translate it into specified languages, and write translated JSON files, optionally reusing existing translations for incremental updates.

Instructions

Read a JSON locale file from disk, translate it into one or more languages, and write .json files. Set incremental=true to reuse existing output files and only translate new/missing keys.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
toYesTarget language code(s), comma-separated, e.g. "es,fr,de"
fromNoSource language code (default: en)
pathYesPath to the source locale JSON file, e.g. locales/en.json
modelNo
outDirNoOutput directory (default: same directory as the source file)
providerNo
incrementalNoReuse existing <lang>.json and only translate new keys

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.5/5.0
Behavior3/5

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

The description explains the core behavior of reading, translating, and writing, and implies overwriting by mentioning incremental mode. However, it does not mention error handling, provider selection, or output details beyond file names.

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?

The description is concise, with two sentences, and effectively communicates the main function without unnecessary detail.

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

Completeness3/5

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

The description lacks context about how it relates to sibling tools like translate_json, and does not specify the provider/model usage or potential side effects, making it incomplete for full context.

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?

Most parameters have descriptions (5 out of 7), but 'model' and 'provider' lack descriptions. The provider has an enum, but model is completely unspecified, leaving ambiguity.

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 the tool reads a JSON locale file, translates it, and writes output files, which is specific and distinct from potential sibling tools like translate_json.

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

Usage Guidelines2/5

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

The description gives a tip about using incremental=true but does not explicitly state when to choose this tool over siblings like translate_json, so guidance is minimal.

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