Push (import) a translation file
push_fileImports a localization file into one locale: creates or updates source keys, writes target translations, and preserves human edits; merge is default, sync_removals deletes missing source keys.
Instructions
Import a localization file into one locale; pass the file content as a string (max 10 MB before JSON escaping, which can enlarge it, so a file with many non-ASCII characters may be refused below 10 MB). Formats: json_flat, json_nested, android_xml, ios_strings, ios_stringsdict, flutter_arb, laravel_php, laravel_json, xliff_12, ios_xcstrings, gettext_po, yaml, csv, xlsx, xliff_20, java_properties, resx, markdown, unity_csv, unreal_po. Pushing the SOURCE locale creates new keys and updates source values; pushing a target locale writes translations for existing keys (unknown keys are reported, never created). Values are written as human edits, but the server keeps existing human edits over pushed values and reports them as conflicts. Mode "sync_removals" (source locale only) additionally DELETES every project key missing from the file. This is destructive; the default "merge" never deletes. When the project has auto-translate on, a push may queue an AI batch (returned in batch, quota permitting; see quota_exceeded, and translation_paused for any other stop on AI spend). Optional metadata (source locale only, and not for formats that carry descriptions in the file) is a JSON sidecar of key descriptions and length ceilings keyed by key name, e.g. {"cart.title": {"description": "Cart page heading", "max_length": 40}}; null clears a field, an absent field is left alone. The result then carries a metadata block, and a warning if the server ignored the sidecar. Requires the "push" ability.
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": {
"format": "<format>",
"locale": "<locale>",
"content": "<content>"
},
"name": "push_file"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| mode | No | "merge" (default) never deletes; "sync_removals" deletes keys absent from a SOURCE-locale file. | |
| format | Yes | The file format id, e.g. "json_flat". | |
| locale | Yes | The locale the file contains. | |
| content | Yes | The raw file content, exactly as it would sit on disk. | |
| filename | No | Optional upload filename; defaults to "<locale>.<ext>". | |
| metadata | No | Optional key-metadata sidecar (JSON text, max 1 MiB): {"<key>": {"description": string|null, "max_length": integer|null}}. Source-locale push only. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| batch | Yes | ||
| metadata | No | ||
| warnings | Yes | ||
| conflicts | Yes | ||
| keys_created | Yes | ||
| keys_deleted | Yes | ||
| unknown_keys | Yes | ||
| quota_exceeded | Yes | ||
| source_updated | Yes | ||
| translation_paused | No | ||
| translations_written | Yes |