Create a string
wti_create_stringAdds a new string key to a WebTranslateIt master file with optional source text and translations, failing if the key already exists. Use it to register localizable strings before translating them.
Instructions
Create a new string (key) in a master file, optionally with its source text and translations. Fails if the key already exists in that file. In projects with one master file, file_id can be omitted.
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": {
"key": "<key>"
},
"name": "wti_create_string"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| key | Yes | Key of the new string, e.g. `home_rebook_card_title`. | |
| labels | No | Labels, e.g. ["android", "release-5.31"]. | |
| plural | No | Plural string. Set automatically when a text is a plural object. | |
| file_id | No | Master file to add the string to (see wti_get_project). | |
| dev_comment | No | Context for translators: where the text shows, length limits, what placeholders mean. | |
| source_text | No | Text in the project's source locale. | |
| translations | No | Translations in other locales. |