Adds, edits and removes source strings with the tool choice that keeps existing translations intact
Add, edit, and remove source strings through the Crowdin MCP tools.
Pick the tool that matches the operation count:
| Operation | Tool |
|---|---|
| Add / edit / remove 2+ strings in one call | string_batch_operations |
| Edit exactly 1 string | edit_string |
| Add exactly 1 string | add_string_file_based_project (file-based) or add_string_string_based_project (string-based) |
| Delete exactly 1 string | delete_string |
| Inspect a single string | get_string |
| List / filter strings | list_strings |
If you need to perform more than one string operation, always use string_batch_operations — regardless of whether you'd otherwise call the single-item tools sequentially, in parallel, or in a loop. The batch tool is faster, uses less API quota, and is the only correct option for any multi-string work.
{
"projectId": 130,
"updateOption": "keep_translations",
"operations": [
{ "op": "replace", "path": "/{stringId}/{field}", "value": "..." },
{ "op": "remove", "path": "/{stringId}" },
{ "op": "add", "path": "/-", "value": { /* new string */ } }
]
}
- Max 50 operations per call. Split larger sets into sequential calls.
path:/{stringId}/{field}forreplace;/{stringId}forremove;/-foradd.
op |
Purpose | path |
value |
|---|---|---|---|
replace |
Edit a field on an existing string | /{stringId}/{field} |
New field value |
remove |
Delete a string | /{stringId} |
— |
add |
Create a new string | /- |
Object with string properties |
| Field | Type | Notes |
|---|---|---|
text |
string | Source text. By default resets translations — see Preserving translations below |
context |
string | Translator notes. Doesn't affect translations |
identifier |
string | String key — must stay unique in the file/branch |
isHidden |
boolean | Hide from translators (excluded from export and word count) |
maxLength |
integer | Max translation length (0 = unlimited) |
labelIds |
integer[] | Replaces all labels on the string |
fields |
object | Custom fields (Enterprise only) |
| Field | Type | Required | Notes |
|---|---|---|---|
text |
string | Yes | Source text |
identifier |
string | Yes | Unique key within the file/branch |
fileId |
integer | File-based projects | Target file |
branchId |
integer | String-based projects | Target branch |
context |
string | No | Translator notes |
isHidden |
boolean | No | Default false |
maxLength |
integer | No | 0 = unlimited |
labelIds |
integer[] | No | Labels to attach |
Editing a string's text (or identifier) resets its existing translations by default. The updateOption parameter (also available on edit_string) lets you control this:
| Value | Behavior |
|---|---|
keep_translations_and_approvals |
Keep translations and their approvals |
keep_translations |
Keep translations, drop approvals |
clear_translations_and_approvals |
Clear both (default) |
updateOption only applies when text or identifier changes; ignored for other fields.
Always set updateOption explicitly when editing text or identifier. Omitting it falls back to the API default, which clears both translations and approvals — that destruction can be silent and irreversible.
Choose the value that matches the user's intent — preservation usually fits typo fixes and minor rewordings; clearing fits substantive meaning changes.
Confirm with the user before any destructive choice:
keep_translations— translations stay, but approvals are dropped. Tell the user that approval work will be lost and ask before proceeding.clear_translations_and_approvals— both translations and approvals are wiped. Confirm explicitly; this destroys translator work.keep_translations_and_approvals— no destruction; no confirmation needed.
When the user's intent is ambiguous, ask which option they want before making the call.
Fetch existing values only when you need them to compute the new value:
| Situation | Fetch first? |
|---|---|
Append to context (preserve translator history) |
Yes — read current context |
Replace context entirely (user explicitly asked) |
No |
Set isHidden, maxLength, labelIds to a known value |
No |
Edit text / identifier with a relative request ("shorten", "add prefix") |
Yes |
Edit text / identifier with an absolute new value |
No |
remove strings |
No — IDs are sufficient |
add new strings |
No |
When fetching is needed for several strings in the same file, prefer list_strings with a fileId filter (single call) over a get_string per ID.
By default, append new notes to existing context — translator history is valuable, blindly overwriting it loses information. Fetch the current value, add a newline, and append.
Replace the context outright only when the user explicitly asks ("replace the context", "overwrite", "rewrite"). Explicit intent overrides the default.
string_batch_operations is atomic — if any operation fails (invalid ID, duplicate identifier, schema violation, etc.), the entire batch is rejected and no changes are applied. There is no partial success.
When a batch fails:
- Read the error to find the offending operation.
- Fix or drop it, then resubmit the rest.
- Don't retry the same failing batch unchanged. If the same operation fails twice, stop and surface the problem to the user.
{
"projectId": 130,
"operations": [
{ "op": "add", "path": "/-", "value": { "text": "Save", "identifier": "btn.save", "context": "Save button in settings", "fileId": 42 } },
{ "op": "add", "path": "/-", "value": { "text": "Cancel", "identifier": "btn.cancel", "context": "Cancel button in settings", "fileId": 42 } }
]
}
After reading the current values:
{
"projectId": 130,
"operations": [
{ "op": "replace", "path": "/1001/context", "value": "Existing note\nNew: shown in settings header" },
{ "op": "replace", "path": "/1002/context", "value": "Existing note\nNew: tooltip on hover" }
]
}
{
"projectId": 130,
"updateOption": "keep_translations",
"operations": [
{ "op": "replace", "path": "/1001/text", "value": "Save changes" },
{ "op": "replace", "path": "/1002/text", "value": "Discard changes" }
]
}
{
"projectId": 130,
"operations": [
{ "op": "remove", "path": "/1001" },
{ "op": "remove", "path": "/1002" },
{ "op": "remove", "path": "/1003" }
]
}
{
"projectId": 130,
"operations": [
{ "op": "replace", "path": "/1001/maxLength", "value": 30 },
{ "op": "replace", "path": "/1002/maxLength", "value": 0 },
{ "op": "replace", "path": "/1003/isHidden", "value": true },
{ "op": "replace", "path": "/1004/labelIds", "value": [5, 12] }
]
}
{
"projectId": 130,
"operations": [
{ "op": "add", "path": "/-", "value": { "text": "New feature", "identifier": "feature.new", "fileId": 42 } },
{ "op": "replace", "path": "/1001/context", "value": "Updated context" },
{ "op": "remove", "path": "/1005" }
]
}
After execution, summarize what changed: counts and IDs of strings added, edited, removed. On failure, report the offending operation plus the error so the user can decide how to proceed.
- —crowdin.com
- —Crowdin Enterprise
Released on Sep 4, 2026
Updated on Sep 4, 2026
Published by Crowdin
Identifier:string-management