Skip to main content
String Management logo
String Management FreeSystem

Adds, edits and removes source strings with the tool choice that keeps existing translations intact

SKILL.md

String Management

Copy link

Add, edit, and remove source strings through the Crowdin MCP tools.

Tool Selection

Copy link

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.

`string_batch_operations`

Copy link
{
  "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} for replace; /{stringId} for remove; /- for add.

Operations

Copy link
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

Patchable fields (for `replace`)

Copy link
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)

`add` value schema

Copy link
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

Preserving Translations When Editing `text`

Copy link

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_approvalsboth 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.

When to Fetch Current State First

Copy link

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.

Updating `context`: Append vs Replace

Copy link

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.

Atomicity & Error Handling

Copy link

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:

  1. Read the error to find the offending operation.
  2. Fix or drop it, then resubmit the rest.
  3. Don't retry the same failing batch unchanged. If the same operation fails twice, stop and surface the problem to the user.

Common Patterns

Copy link

Add multiple strings to a file

Copy link
{
  "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 } }
  ]
}

Append to context for multiple strings

Copy link

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" }
  ]
}

Reword text while keeping translations

Copy link
{
  "projectId": 130,
  "updateOption": "keep_translations",
  "operations": [
    { "op": "replace", "path": "/1001/text", "value": "Save changes" },
    { "op": "replace", "path": "/1002/text", "value": "Discard changes" }
  ]
}

Remove multiple strings

Copy link
{
  "projectId": 130,
  "operations": [
    { "op": "remove", "path": "/1001" },
    { "op": "remove", "path": "/1002" },
    { "op": "remove", "path": "/1003" }
  ]
}

Set max length / hide / assign labels

Copy link
{
  "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] }
  ]
}

Mixed operations in one call

Copy link
{
  "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" }
  ]
}

Reporting Results

Copy link

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.

Works with
  • crowdin.com
  • Crowdin Enterprise
Details

Released on Sep 4, 2026

Updated on Sep 4, 2026

Published by Crowdin

Identifier:string-management

All product and company names are trademarks™ or registered® trademarks of their respective holders. Use of them does not imply any affiliation with or endorsement by them.