Skip to main content
Glama

Translate JSON

translate_json

Translate a locale JSON object into one or more languages while preserving key structure and placeholders. Provide source content and target language codes; requires your Anthropic or OpenAI API key.

Instructions

Translate an i18n locale JSON object to one or more target languages, preserving structure and placeholders. Requires your own LLM key (ANTHROPIC_API_KEY/OPENAI_API_KEY). For key-free work use the validation tools. Legacy: the MCP client's model via sampling.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
toYesTarget language code(s), comma-separated, e.g. "es,fr,de"
fromNoSource language code (default: en)
modelNoOverride the provider default model
contentYesThe source locale as a JSON string, e.g. {"greeting":"Hello {{name}}"}
providerNoForce a provider: anthropic or openai. Omit to auto-detect from the environment.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.1/5.0
Behavior3/5

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

Without annotations, the description provides some behavioral insight (preserving structure/placeholders, using external LLM keys, legacy mode) but does not explicitly state whether the operation is read-only or has side effects. It implies a translation action but lacks a clear safety profile.

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 description is three sentences, each providing useful information: core functionality, key requirement, and legacy behavior. It is fairly concise but the legacy note adds a slight layer of complexity that could be separated or clarified.

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?

The description gives context about the tool's purpose, prerequisites, and alternatives. It does not describe output format or error scenarios, but for a translation tool these are not essential for basic usage and the schema covers parameter specifics.

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?

The schema already provides 100% coverage with descriptions for all five parameters, so the description adds little beyond what is already known. It mentions 'target languages' and 'source locale' but doesn't elaborate on each parameter's meaning or constraints beyond the schema.

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 clearly states the tool's function: translating an i18n locale JSON object to one or more target languages while preserving structure and placeholders. It also distinguishes itself from validation tools and mentions legacy behavior, giving a full picture of its purpose.

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?

It explicitly states the requirement for an LLM key, directs users to validation tools for key-free work, and mentions legacy mode. This gives clear guidance on when to use this tool versus alternatives.

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