Skip to main content
Glama
fabkho
by fabkho

Move Translation Key Between Layers

move_translation_key

Move a translation key between layers, preserving all locale values. Promote an app key to a shared layer or demote a shared key that became app-specific. Skips on conflict; dryRun previews.

Instructions

Move a key from one layer to another, carrying every locale that defines it — promoting an app-layer key to a shared layer once a second app needs it, or demoting a shared key that turned out to be app-specific. Call discover first: layerGraph.shared names the layers more than one app consumes. Writes nothing at all if the target layer already holds the key with a different value in any locale; if it holds the same value, that locale is deduplicated instead. Use dryRun to preview the plan.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
keyYesDot-separated key path to move. Example: "calendar.views.save".
dryRunNoWhen true, returns the plan without writing any files. Default: false.
newKeyNoKey path in the target layer, when the move also renames it. Example: "common.actions.save". Defaults to the same path.
toLayerYesLayer to move it to, from discover. Example: "root". Must differ from fromLayer — to rename within one layer, use rename_translation_key.
fromLayerYesLayer the key lives in today, from discover. Example: "app-admin".
projectDirNoAbsolute path to the project root. Defaults to I18N_PROJECT_DIR, then server cwd.
Behavior4/5

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

With no annotations, the description carries full behavioral burden and discloses the critical behavior: it writes nothing if the target layer holds a different value, deduplicates locales when the value matches, supports dryRun for preview, and carries every locale. It would be complete with a little more detail about dryRun output shape, but the main side effects are clear.

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 dense but well-organized: it states the operation, adds the motivating scenarios, gives a prerequisite, then covers side-effect semantics and dryRun. Every sentence earns its place and there is no filler.

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 mapping tool with no annotations and no output schema, the description covers purpose, prerequisites, main behavior, conflict semantics, deduplication, and dryRun preview. The only modest gap is the exact shape of the dryRun plan, which is not output by described beyond 'preview'.

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 schema already documents every parameter. The description adds useful behavioral context around key movement and dryRun, but it does not need to explain each parameter further, leaving it at the 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 states a precise operation: moving a translation key between layers while carrying every locale that defines it. It also grounds the purpose in concrete use cases, promoting an app-layer key to a shared layer and demoting a shared key that became app-specific, which removes ambiguity.

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 says to call discover first and points the agent to layerGraph.shared as the source of layer choices. It also frames when the move is appropriate, and the schema's toLayer description directs renames within a single layer to rename_translation_key.

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