Skip to main content
Glama

Get Localization

horizon_get_localization
Read-onlyIdempotent

Retrieve a single translated string by key for a specific language, defaulting to the app's default. Use for dynamic messages; missing keys return null and found false for fallback.

Instructions

Reads one translated string by key in one language (default: the app's default language). Use when: the game needs a single text, for example a dynamic message. Not for: loading the UI texts at start (use horizon_get_all_localizations) or finding out which languages exist (use horizon_get_localization_languages). Side effects: None (read only). Returns: {localizationKey, value, language, found}. A missing key or translation is not an error: found is false and value null, so show a fallback text. Errors: Needs HORIZON_API_KEY. Every failure returns an error result (isError) with the HTTP status and body: a 401 that horizon_test_connection also returns means HORIZON_API_KEY is wrong, 429 means the account's per-minute rate limit was reached (wait a minute, then retry).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
keyYesLocalization key exactly as defined in the dashboard, for example 'ui.play_button' (max 100 characters)
langNoISO 639-1 language code (2 lowercase letters). One of: en, de, es, fr, it, pt, nl, pl, ru, ja, zh, ar, ko, tr, id. Omit for the app's default language.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
foundNo
valueNo
languageNo
localizationKeyNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed4 schema fields changedv1.6.0
    • changedInput schema / properties / key / description
      Previous value: -"Localization key as defined in the dashboard, e.g. 'ui.play_button' (max 100 characters)"New value: +"Localization key exactly as defined in the dashboard, for example 'ui.play_button' (max 100 characters)"
    • addedInput schema / properties / key / minLength
      Added value: +1
    • changedInput schema / properties / lang / description
      Previous value: -"ISO 639-1 language code (2 characters). One of: en, de, es, fr, it, pt, nl, pl, ru, ja, zh, ar, ko, tr, id."New value: +"ISO 639-1 language code (2 lowercase letters). One of: en, de, es, fr, it, pt, nl, pl, ru, ja, zh, ar, ko, tr, id. Omit for the app's default language."
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "$schema": "http://json-schema.org/draft-07/schema#",
      +  "additionalProperties": {},
      +  "properties": {
      +    "found": {
      +      "anyOf": [
      +        {
      +          "description": "false when the key has no translation",
      +          "type": "boolean"
      +        },
      +        {
      +          "type": "null"
      +        }
      +      ]
      +    },
      +    "language": {
      +      "anyOf": [
      +        {
      +          "description": "ISO 639-1 code of the language used",
      +          "type": "string"
      +        },
      +        {
      +          "type": "null"
      +        }
      +      ]
      +    },
      +    "localizationKey": {
      +      "anyOf": [
      +        {
      +          "description": "The requested key",
      +          "type": "string"
      +        },
      +        {
      +          "type": "null"
      +        }
      +      ]
      +    },
      +    "value": {
      +      "anyOf": [
      +        {
      +          "description": "The translated text, null when not found",
      +          "type": "string"
      +        },
      +        {
      +          "type": "null"
      +        }
      +      ]
      +    }
      +  },
      +  "type": "object"
      +}
  2. Changed1 schema field changedv1.5.5
    • changedInput schema / properties / key / description
      Previous value: -"Localization key (max 100 characters)"New value: +"Localization key as defined in the dashboard, e.g. 'ui.play_button' (max 100 characters)"
  3. First observedv1.5.4

TDQS

A4.7/5.0
Behavior5/5

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

Goes well beyond the annotations (which only cover readOnly/idempotent/destructive/openWorld) by disclosing the return shape, that a missing key is NOT an error (found=false, value=null), the HORIZON_API_KEY requirement, and the 401/429 failure semantics including rate-limit retry guidance.

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?

Front-loaded with the core action, then clearly labelled Use when / Not for / Side effects / Returns / Errors sections. Dense but every sentence carries actionable information.

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?

Despite the output schema existing, the description completes the picture by covering the auth prerequisite, non-error missing-key case, and error taxonomy, which the schema and annotations do not convey.

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 both parameters are already documented in the schema. The description only restates the default-language behavior for 'lang', adding no syntax beyond the structured fields; baseline 3 applies.

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?

States a specific verb and resource ('Reads one translated string by key in one language') plus the default behavior, which an agent can distinguish immediately from horizon_get_all_localizations and horizon_get_localization_languages.

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?

Explicit 'Use when' with a concrete example (dynamic message) and an explicit 'Not for' clause naming both alternative tools and the conditions that select them.

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