Get Translations
get_translationsRetrieve translation values by key path or namespace prefix from one or all layers, optionally for every locale, to inspect or debug i18n strings.
Instructions
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.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"locale": "<locale>"
},
"name": "get_translations"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| keys | No | Dot-separated key paths to read. Example: ["common.actions.save", "auth.login.title"]. Either this or keyPrefix is required. | |
| layer | No | Layer name from discover (e.g., "root", "app-admin"). Omit to read every layer and get the { byLayer } shape back. | |
| limit | No | Maximum 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. | |
| locale | Yes | Locale code, locale file name, or "*" to read all locales. Examples: "en", "en-US", "en-US.json", "*". | |
| offset | No | Number of keys to skip before returning any. Default: 0. Pass the nextOffset of a truncated result to continue where it stopped. | |
| compact | No | When true and locale is "*", returns a summary grouped by key instead of per-locale detail. Default: false. | |
| keyPrefix | No | Namespace 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. | |
| projectDir | No | Absolute path to the project root. Defaults to I18N_PROJECT_DIR, then server cwd. Example: "/home/user/my-app". |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||