set_variant
Upsert ONE variant override for (key, language, surface) for ANY surface active on the project (task 928) - device (desktop / mobile / tablet / custom like watch / tv) OR a11y (aria_label / alt_text / screen_reader / plain_language). Address by key_uuid + locale CODE + surface slug (the fields get_variants / list_keys already give you). Stored as a draft. 422 unless the surface is OFFERED for this key - an active device surface (see list_surfaces) OR an a11y treatment relevant to the key's TYPE (e.g. no aria_label on a text key; see get_variants for the key's offered surfaces); 409 if the cell is already reviewed/approved (never overwritten). Returns {key_uuid, surface, language_code, value, status}. (For a11y specifically you can also use set_a11y_variant.)
Paramètres
Section intitulée « Paramètres »| Nom | Type | Description | |
|---|---|---|---|
project_uuid | string | optionnel | Project UUID. Required when multiple projects are configured (SONENTA_PROJECTS); defaults to the single configured project otherwise. |
key_uuid | string | requis | Key UUID (from list_keys / get_variants). |
language_code | string | requis | Target locale CODE, e.g. 'fr'. Backend resolves it; 404 if unknown. |
surface | string | requis | Surface slug - any surface ACTIVE for the project (device or a11y). See list_surfaces. |
value | string | requis | The variant text value for this (key, language, surface). |
{ "tool": "set_variant", "arguments": { "key_uuid": "<key_uuid>", "language_code": "<language_code>", "surface": "<surface>", "value": "<value>" }}