Skip to main content
Glama
fabkho
by fabkho

Translate Key

translate_key

Add or update a single translation key and translate it into target locales. Supports overwriting stale translations and provides direct or agent-assisted translation modes.

Instructions

Add/update one source translation key and translate it into target locales. Unlike translate_missing, this can overwrite existing stale target translations. Same two modes as translate_missing: provider mode (server env-configured) translates directly; agent mode returns a fallbackContext — translate it inline and persist via write_translations.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
keyYesDot-separated key path to translate. Example: "bookingCreator.options.removeSubResource".
layerYesLayer name from discover to update (e.g., "root", "app-admin").
dryRunNoWhen true, previews source/target locales without writing files or calling the translation backend.
overwriteNoWhen true, overwrite existing target translations. When false, only fill missing targets. Default: true.
projectDirNoAbsolute path to the Nuxt project root. Defaults to I18N_PROJECT_DIR, then server cwd.
sourceValueNoOptional source value. If provided, source locale is added/updated before translating. If omitted, existing source value is read.
sourceLocaleYesSource locale ref. May be code ("en-us"), language ("en-US"), or file ("en-US.json").
targetLocalesNoTarget locales to translate into. Use "all" or omit for all locales except source.
includePreviewNoWhen true, include translated values in output. Default false to keep responses compact.
Behavior5/5

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

Beyond the readOnlyHint:false annotation, the description discloses that the operation can overwrite existing stale translations, how provider mode writes directly, and that agent mode returns a fallbackContext requiring separate persistence. These are important behavioral side effects not present in the annotation or schema.

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 compact, information-dense, and immediately front-loads the core action and key differentiator. It avoids repeating schema details and every clause contributes meaningful guidance about behavior, modes, or alternatives.

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?

For a nine-parameter tool with no output schema, the description covers the operation, the key edge behavior (overwrite), mode differences, and the follow-up write path. It gives an agent enough contextual grounding to select the tool and know important side effects before invoking it.

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 the baseline is 3. The description adds operational context around one or two parameters (e.g., overwrite behavior, source value handling), but most parameter meaning is already fully captured by the input schema, so it does not substantially exceed baseline.

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 adds or updates a source translation key and translates it into target locales. It also distinguishes itself from translate_missing by explicitly noting that it can overwrite existing stale target translations, which separates it from its closest sibling.

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?

The description explicitly references translate_missing as the alternative and clarifies when translate_key is preferable (overwriting stale translations). It also explains the two operating modes and directs the agent to persist agent-mode results via write_translations, giving actionable usage guidance.

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

Install Server

Other Tools

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/fabkho/the-i18n-kit'

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