Skip to main content
Glama

Add a language

add_language
Idempotent

Adds a language: puts it in targetLocales in localize.config.json (creating the file when missing), translates every message into it and adds it to the i18n setup localize.dev generated. Needs a localize.dev API key. Send the files in files; nothing is read from or written to your disk. The answer's files are the ones to create or overwrite, each with its whole new content: write them back unchanged.

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": {
      "files": "<files>",
      "locale": "<locale>"
    },
    "name": "add_language"
  }
}

Input Schema

NameRequiredDescriptionDefault
appNoMonorepo: the app to work in (e.g. apps/web), relative to the repository root. Default: the root.
filesYesThe project files this call needs, with paths relative to the project root: the UI files to work on, package.json, localize.config.json when there is one, and the existing locale files (for example locales/en.json and locales/es.json). Leave out node_modules, build output and binary files.
localeYesBCP 47 code, e.g. "ja", "pt-BR".

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.3/5.0
Behavior5/5

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

Annotations only say it is a non-destructive, idempotent write; the description adds materially more — the config file is created when missing, the API key requirement, the fact that the server touches no disk, and the strict round-trip contract that returned file contents must be written back verbatim. Those are exactly the behaviors an agent cannot infer from the structured fields.

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?

Front-loads the action, then layers the file-handling contract and the disk/auth constraints in short sentences with no filler. The initial clause is a dense three-part run-on but every element in it carries distinct 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?

With no output schema, the description takes on the return-value burden itself and does so: it explains that the response's `files` are full file contents to create or overwrite. Auth, side effects, and the write-back obligation are all covered for a three-parameter mutation tool.

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, and the description earns an extra point by clarifying that the `files` key is symmetric between call and answer and that its content is the full new file body rather than a patch. It adds nothing about `app` or `locale` beyond the schema, which is acceptable at full coverage.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb and resource plus concrete side effects: it writes the locale into targetLocales in localize.config.json, translates every message, and registers the locale in the generated i18n setup. That is far more than a restatement of the name. It stops short of 5 because it never differentiates itself from the sibling `translate`, even though it also translates messages, leaving the agent to infer the split.

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

Usage Guidelines4/5

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

Gives clear operating context: an API key is required, all project files must be passed in `files`, and the returned files must be written back unchanged. It does not name an alternative tool or state when-not to use this one, so the routing to `translate` versus `add_language` remains implicit.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.