labels
Search, inspect, create, update, and rename Dynamics 365 Finance & Operations localization strings across language files; use bulk writes to add or correct translations without manual file edits.
Instructions
Unified label operations — read and write. Writing an object? d365fo_file create/modify already turn a raw-text label/fieldLabel into a real @Ref by themselves; no call here is needed. Choose an action:
• search → full-text query across indexed label files. Never needed before a create.
• info → all translations for a labelId; without labelId lists label files (with labelFileId: physical .label.txt path per language).
• list → page one label file's labels; idPrefix/comment/missingLanguage/offset go in params.
• create → add a label to an AxLabelFile across every language .label.txt (write). ALWAYS pass createIfMissing=true: it creates when absent and reuses when present, so this ONE call replaces search-then-create. Bulk: labels:[{labelId, translations}, …] with shared labelFileId/model at top level does a whole object in one call. Label IDs describe MEANING — never a model prefix; target the model's ORIGINAL label file, never an …_Extension… one.
• update → overwrite the text of an EXISTING label; same args as create with corrected translations[] (write).
• rename → rename a label ID across .label.txt + X++ + XML + index. Use dryRun=true first (write).
Write plumbing (paths, languages, sortLabels…) is auto-resolved; overrides and list filters: get_knowledge(kind="op-spec", topic="labels").
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": {
"action": "<action>"
},
"name": "labels"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| model | No | [search|info|list|create|update|rename] Model owning the label file. | |
| query | No | [search] REQUIRED. Search text — matches label ID, text and developer comment. ARRAY = try several phrasings in ONE call. | |
| action | Yes | ||
| dryRun | No | [rename] Preview changes without writing anything. | |
| labels | No | [create|update] Bulk mode — shared fields stay at the top level (top-level labelId/translations are then ignored); a failed entry does not abort the batch. | |
| params | No | Optional overrides / list filters (see op-spec). | |
| labelId | No | [info|delete] Label ID, any spelling: SYS67433, @SYS67433, @ContosoExt:MyLabel (paste search output). labelFileId/model optional. Omit to list label files. | |
| verbose | No | [search|list] true = full block (list: all languages). | |
| language | No | [search|list] Language/locale (default en-US), e.g. cs, de, sk, fi. | |
| maxResults | No | [search|list] Page size (search 10, list 50); reports how many more matched. | |
| newLabelId | No | [rename] REQUIRED. New label ID. | |
| oldLabelId | No | [rename] REQUIRED. Current label ID (e.g. MyOldField). | |
| labelFileId | No | [search|info|list|create|update|rename] AxLabelFile ID (e.g. ContosoExt, SYS). New file: ID = MODEL name, never EXTENSION_PREFIX. | |
| translations | No | [create] REQUIRED for single-label create (omit with labels[]). Translations for each language. Provide at least en-US. |