Skip to main content
Glama

import_translations

Imports translated strings from XLIFF or TMX exchange files into JSON or Flutter ARB catalogs, with dry-run diff previews and collision-safe overwrite controls.

Instructions

Imports translated strings from standard XLIFF (1.2 / 2.0) or TMX 1.4 exchange files back into project translation catalogs (JSON or Flutter ARB), with unified diff support and collision safety.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "import_translations"
  }
}

Input Schema

NameRequiredDescriptionDefault
dryRunNoIf true, previews imported translations and unified diff without writing to disk.
formatNoExchange standard format. If omitted, auto-detected from XML content.
contentNoRaw XLIFF or TMX XML content to import directly.
filePathNoPath to the XLIFF (.xlf, .xliff) or TMX (.tmx) file to import.
overwriteNoWhether to overwrite existing translations in project catalogs. Defaults to true.
projectPathNoOptional project root directory. Defaults to current working directory.
targetLocalesNoTarget locales to import into. If omitted, read from XML file headers.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.6

TDQS

B3.4/5.0
Behavior3/5

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

With no annotations, the description carries the full burden; it does disclose that it writes to catalogs, offers unified diff output, and has 'collision safety'. However, it does not say what collision safety concretely means (abort? skip? error?), whether existing entries are backed up, or what the response contains after an import.

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?

A single front-loaded sentence with zero filler that packs source formats, target formats, and capabilities. The trailing clause chain ('with unified diff support and collision safety') is slightly jargon-heavy but still earns its place.

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

Completeness3/5

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

For a 7-parameter mutation tool with no annotations and no output schema, the description should say what an import returns (diff text? counts? errors?) and how partial or colliding imports behave. The write-safety story is gestured at but not specified.

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 every parameter is already documented, and the description adds only the format-to-extension mapping already implied by the schema. Baseline 3 applies since the schema does the heavy lifting.

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?

The description gives a precise verb+resource: 'Imports translated strings ... back into project translation catalogs', naming both source formats (XLIFF 1.2/2.0, TMX 1.4) and target catalogs (JSON, Flutter ARB). Direction of data flow ('back into') implicitly distinguishes it from the export_translations sibling, but no sibling is named explicitly.

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

Usage Guidelines3/5

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

Usage is only implied by the mechanics: an agent can infer this is the reverse of export and that dryRun previews changes. There is no statement of when to prefer this tool over alternatives, no prerequisites, and no mention of what happens if the project catalog is missing.

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