Skip to main content
Glama
fabkho
by fabkho

Get Translations

get_translations
Read-only

Retrieve 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.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
keysNoDot-separated key paths to read. Example: ["common.actions.save", "auth.login.title"]. Either this or keyPrefix is required.
layerNoLayer name from discover (e.g., "root", "app-admin"). Omit to read every layer and get the { byLayer } shape back.
limitNoMaximum 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.
localeYesLocale code, locale file name, or "*" to read all locales. Examples: "en", "en-US", "en-US.json", "*".
offsetNoNumber of keys to skip before returning any. Default: 0. Pass the nextOffset of a truncated result to continue where it stopped.
compactNoWhen true and locale is "*", returns a summary grouped by key instead of per-locale detail. Default: false.
keyPrefixNoNamespace 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.
projectDirNoAbsolute path to the project root. Defaults to I18N_PROJECT_DIR, then server cwd. Example: "/home/user/my-app".

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed9 schema fields changedv1.0.6
    • changedInput schema / properties / compact / description
      Previous value: -"When true and locale is \"*\", returns a compact summary grouped by key instead of per-locale detail. Default: false."New value: +"When true and locale is \"*\", returns a summary grouped by key instead of per-locale detail. Default: false."
    • addedInput schema / properties / keyPrefix
      Added value: +{
      +  "description": "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.",
      +  "type": "string"
      +}
    • changedInput schema / properties / keys / description
      Previous value: -"Dot-separated key paths to read. Example: [\"common.actions.save\", \"auth.login.title\"]."New value: +"Dot-separated key paths to read. Example: [\"common.actions.save\", \"auth.login.title\"]. Either this or keyPrefix is required."
    • changedInput schema / properties / layer / description
      Previous value: -"Layer name from discover (e.g., \"root\", \"app-admin\"). Call discover to discover available layers."New value: +"Layer name from discover (e.g., \"root\", \"app-admin\"). Omit to read every layer and get the { byLayer } shape back."
    • addedInput schema / properties / limit
      Added value: +{
      +  "description": "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.",
      +  "maximum": 9007199254740991,
      +  "minimum": 1,
      +  "type": "integer"
      +}
    • addedInput schema / properties / offset
      Added value: +{
      +  "description": "Number of keys to skip before returning any. Default: 0. Pass the nextOffset of a truncated result to continue where it stopped.",
      +  "maximum": 9007199254740991,
      +  "minimum": 0,
      +  "type": "integer"
      +}
    • changedInput schema / properties / projectDir / description
      Previous value: -"Absolute path to the Nuxt project root. Defaults to I18N_PROJECT_DIR, then server cwd. Example: \"/home/user/my-app\"."New value: +"Absolute path to the project root. Defaults to I18N_PROJECT_DIR, then server cwd. Example: \"/home/user/my-app\"."
    • changedInput schema / required
      Previous value: -[
      -  "layer",
      -  "locale",
      -  "keys"
      -]New value: +[
      +  "locale"
      +]
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "$schema": "https://json-schema.org/draft/2020-12/schema",
      +  "anyOf": [
      +    {
      +      "additionalProperties": {
      +        "additionalProperties": {
      +          "description": "The value that locale holds, or null when the key is not defined there. In compact mode, a per-key digest: status (\"ok\" | \"partial\" | \"missing\"), totalPresent, and the locales the key is empty or missing in."
      +        },
      +        "propertyNames": {
      +          "description": "The dot-path key as it was requested, or the key being summarised in compact mode.",
      +          "type": "string"
      +        },
      +        "type": "object"
      +      },
      +      "description": "Locale code → requested key → value. With compact and locale \"*\", one entry keyed \"byKey\" holding a digest per key instead.",
      +      "propertyNames": {
      +        "description": "Locale code, or \"byKey\" in compact mode.",
      +        "type": "string"
      +      },
      +      "type": "object"
      +    },
      +    {
      +      "additionalProperties": false,
      +      "description": "The shape a read with no layer answers with.",
      +      "properties": {
      +        "byLayer": {
      +          "additionalProperties": {
      +            "additionalProperties": {
      +              "additionalProperties": {
      +                "description": "The value that locale holds, or null when the key is not defined there. In compact mode, a per-key digest: status (\"ok\" | \"partial\" | \"missing\"), totalPresent, and the locales the key is empty or missing in."
      +              },
      +              "propertyNames": {
      +                "description": "The dot-path key as it was requested, or the key being summarised in compact mode.",
      +                "type": "string"
      +              },
      +              "type": "object"
      +            },
      +            "description": "Locale code → requested key → value. With compact and locale \"*\", one entry keyed \"byKey\" holding a digest per key instead.",
      +            "propertyNames": {
      +              "description": "Locale code, or \"byKey\" in compact mode.",
      +              "type": "string"
      +            },
      +            "type": "object"
      +          },
      +          "description": "One entry per layer that defines at least one of the keys, each exactly what a read of that layer alone returns.",
      +          "propertyNames": {
      +            "description": "Layer name.",
      +            "type": "string"
      +          },
      +          "type": "object"
      +        },
      +        "layersSearched": {
      +          "description": "Every layer that was read, the ones defining none of the keys included.",
      +          "items": {
      +            "type": "string"
      +          },
      +          "type": "array"
      +        },
      +        "message": {
      +          "description": "The step to take next — how to continue a capped read. Present when there is one.",
      +          "type": "string"
      +        },
      +        "nextOffset": {
      +          "description": "The offset to pass to continue where this result stopped. Present only when truncated.",
      +          "maximum": 9007199254740991,
      +          "minimum": -9007199254740991,
      +          "type": "integer"
      +        },
      +        "truncated": {
      +          "description": "True when limit cut the result short. The totals still count everything.",
      +          "type": "boolean"
      +        }
      +      },
      +      "required": [
      +        "byLayer",
      +        "layersSearched",
      +        "truncated"
      +      ],
      +      "type": "object"
      +    }
      +  ],
      +  "description": "With a layer: locale → key → value. Without one: the same per layer that defines the keys, under byLayer.",
      +  "type": "object"
      +}
  2. Changed2 schema fields changedv1.0.3
    • changedInput schema / $schema
      Previous value: -"http://json-schema.org/draft-07/schema#"New value: +"https://json-schema.org/draft/2020-12/schema"
    • changedInput schema / properties / projectDir / description
      Previous value: -"Absolute path to the Nuxt project root. Defaults to server cwd. Example: \"/home/user/my-app\"."New value: +"Absolute path to the Nuxt project root. Defaults to I18N_PROJECT_DIR, then server cwd. Example: \"/home/user/my-app\"."
  3. First observedv1.0.0

TDQS

A4.4/5.0
Behavior5/5

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

Annotations already declare readOnlyHint and openWorldHint, but the description adds substantial context beyond them: the EARG failure when neither selector is given, the two distinct result shapes depending on layer, truncation/nextOffset behavior, and the per-layer counting semantics of limit. This is exactly the behavioral disclosure the annotations cannot carry.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Purpose and required-selector rule are front-loaded, and every sentence carries real information about scope, shape, or pagination. It is a dense single block with several shape variants packed together, which is slightly heavy but not padded.

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?

With annotations covering the safety profile, full schema coverage, and an output schema present, the description is more than complete: it still explains the layer-dependent return shapes and pagination flow. An agent has everything needed to call this correctly.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so the baseline is 3, but the description adds genuine meaning: limit counts one key per layer read (so a prefix read across seven layers is capped collectively, not per layer), keys plus keyPrefix reads the union, and layer omission changes both scope and return shape. These go beyond the schema text.

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 opens with a specific verb and resource ("Get translation values") and immediately scopes it by key path or prefix, one layer or all layers. This is enough to separate it from siblings like search_translations or get_missing_translations without opening any schema.

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

Usage Guidelines3/5

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

It clarifies the internal choice between keys and keyPrefix and the requirement that one be present, which is useful invocation guidance. However, it never names an alternative sibling tool or states when to prefer get_translations over search_translations or get_missing_translations, so sibling routing is left to inference.

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