MCP Tools

get_translations

Get translation values by key path or by key prefix, from one layer or from every layer that defines them. Use "*" as the locale to read from all locales. Pass keys for an explicit list, or keyPrefix to read a whole namespace at once — one of the two is required, and a call with neither fails with EARG. With layer, the result is locale → key → value, exactly as it always was — unless limit cut it short, in which case it answers in the { byLayer } shape below, which has room for truncated and nextOffset. Without layer, every non-alias layer is read and the result is { byLayer, layersSearched }: byLayer holds that same shape per layer and names only the layers defining at least one of the keys, which is what answers where a key lives. limit counts one key per layer read, so a prefix read of seven layers is capped across all of them rather than per layer.

Parameters

ParameterTypeRequiredDescription
layerstringnoLayer name from discover (e.g., "root", "app-admin"). Omit to read every layer and get the { byLayer } shape back.
localestringyesLocale code, locale file name, or "" to read all locales. Examples: "en", "en-US", "en-US.json", "".
keysstring[]noDot-separated key paths to read. Example: "common.actions.save", "auth.login.title". Either this or keyPrefix is required.
keyPrefixstringnoNamespace to read every leaf key under, dots included: "auth" reads auth.login.title and everything else below auth. Either this or keys is required; passing both reads the union.
compactbooleannoWhen true and locale is "*", returns a summary grouped by key instead of per-locale detail. Default: false.
limitintegernoMaximum number of keys to return. Default: 100 for a tool call, unlimited at a terminal. When the cap applies the result carries truncated: true and nextOffset — call again with offset set to that value for the next page, or narrow the request instead.
offsetintegernoNumber of keys to skip before returning any. Default: 0. Pass the nextOffset of a truncated result to continue where it stopped.
projectDirstringnoAbsolute path to the project root. Defaults to I18N_PROJECT_DIR, then server cwd. Example: "/home/user/my-app".

Result

FieldTypeDescription
byLayerRecord<string, Record<string, Record<string, unknown>>>One entry per layer that defines at least one of the keys, each exactly what a read of that layer alone returns.
layersSearchedstring[]Every layer that was read, the ones defining none of the keys included.
truncatedbooleanTrue when limit cut the result short. The totals still count everything.
nextOffsetintegerThe offset to pass to continue where this result stopped. Present only when truncated.
messagestringThe step to take next — how to continue a capped read. Present when there is one.

Behavior Hints

A host reads these to decide whether a call needs your confirmation first.

HintValue
readOnlyHinttrue
openWorldHintfalse

Paired CLI Command

The same operation runs from a terminal as the-i18n-cli get, whose page documents its flags.

Copyright © 2026