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) and translates every message into it. 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.7/5.0
Behavior5/5

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

Beyond the annotations, it discloses that the config file is created when missing, that the call is fully stateless ("nothing is read from or written to your disk"), and that the caller must persist the returned files unchanged. Those are exactly the mutation and side-effect details the annotations do not convey, and nothing here conflicts with destructiveHint=false or idempotentHint=true.

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?

Five short sentences, front-loaded with the action and its effects, then prerequisites, then the input/output contract. Nothing is redundant; even the instruction to "write them back unchanged" earns its place because there is no output schema to convey that.

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 must explain the return value, and it does so precisely: the answer's `files` are complete new file contents to create or overwrite. Combined with the API-key requirement and the statelessness note, an agent has everything needed to call and consume the tool 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; the description earns an extra point by clarifying the contract of `files` — the call is self-contained, so the caller must supply everything the operation needs rather than relying on filesystem access. The return-shape note also indirectly clarifies what the caller does with the parameter payload afterward.

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?

"Adds a language" is a specific verb plus resource, and the description immediately spells out the two effects: writing the locale into targetLocales in localize.config.json and translating every message into it. That two-part scope implicitly separates it from the plain `translate` and `config` siblings, so an agent knows this is the combined configure-and-translate operation.

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?

It states the prerequisites for use clearly: a localize.dev API key is required, and all input must be sent through `files` because nothing is read from disk. It does not explicitly name when to prefer a sibling (for example, translation-only work via `translate`), so alternatives remain inferred rather than declared.

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.