Skip to main content
Glama

ai_translate_json

Read-only

Translate a JSON locale file (i18n) — Translates the string values of a JSON object or array (an i18n locale file, UI strings, product copy) into any language while keeping keys and structure identical. Leaves numbers, URLs, emails, identifiers and chosen keys untouched, preserves placeholders like {name}, {{count}}, %s and HTML tags, and reports any string whose placeholders changed. Optional from=, context= and skip_keys=. Up to 200 strings / 8000 chars per call. Price: $0.008 USDC (Base, via x402).

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": {
      "json": "<json>",
      "to": "<to>"
    },
    "name": "ai_translate_json"
  }
}

Input Schema

NameRequiredDescriptionDefault
toYestarget language, e.g. Spanish or de
jsonYesURL-encoded JSON object or array of strings, e.g. an i18n file with keys greeting = Hello, {name}! and cart.empty = Your cart is empty

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.3/5.0
Behavior5/5

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

Annotations already declare readOnlyHint=true and openWorldHint=true, and the description goes well beyond that: it specifies which content is left untouched (numbers, URLs, emails, identifiers, chosen keys), which token formats are preserved ({name}, {{count}}, %s, HTML), that placeholder changes are reported, the size ceiling, and that payment is required. These are operational facts an agent cannot get from the annotations or schema.

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?

The purpose is front-loaded in the first clause, followed by preservation rules, limits, and pricing in a logical order with no filler sentences. It is dense and em-dash-heavy but every clause carries information an agent needs.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a two-required-parameter tool with no output schema, the description covers behavior, limits, and cost adequately. The main gap is the return shape: it mentions reporting strings whose placeholders changed but does not say whether the response is the translated JSON, a report object, or both — relevant since no output schema exists to explain it.

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 coverage is 100%, so the schema already documents both required parameters, and the description mostly restates them. It names three optional parameters (from=, context=, skip_keys=) that do not appear in the input schema and gives no meaning for them beyond their names, which is both thin and slightly inconsistent with the structured data.

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 names a specific verb and resource ('Translate a JSON locale file (i18n)') and immediately constrains the scope: string values of a JSON object/array are translated while keys and structure stay identical. This is enough to separate it from the generic sibling ai_translate without opening either schema.

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 gives clear conditions for use: input is a JSON object or array (i18n file, UI strings, product copy), limits of 200 strings / 8000 chars, and a cost of $0.008 USDC via x402. It never explicitly says when to prefer the plain-text sibling ai_translate instead, so the guidance is strong but has no named alternative or exclusion.

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.

Resources