labels
Search, create, update, and rename Dynamics 365 F&O label entries across all languages and files.
Instructions
Unified label operations — read and write. Choose an action:
• search → full-text query across indexed label files.
• info → all translations for a labelId; without labelId lists label files (with labelFileId: physical .label.txt path per language).
• create → add a new label to an AxLabelFile across every language .label.txt (write). Label IDs describe MEANING — never add a model prefix; target the model's ORIGINAL label file, never an …_Extension… file. Pass createIfMissing=true to reuse an existing label instead of reporting it — one call, no search first. Bulk: pass labels:[{labelId, translations}, …] with shared labelFileId/model at top level.
• 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, allowExtensionLabelFile…) is auto-resolved; override it via get_knowledge(kind="op-spec", topic="labels").
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | [search] Alias of maxResults. | |
| model | No | [search|info|create|update|rename] Model that owns the label file (e.g. ContosoExt). | |
| query | No | [search] REQUIRED. Search text — matches label ID, text and developer comment. ARRAY = try several phrasings in ONE call. | |
| action | Yes | Label operation to perform. "list"/"list-files" are aliases of "info" (lists label files). | |
| dryRun | No | [rename] Preview changes without writing anything (default: false). Use this first! | |
| labels | No | [create] OPTIONAL bulk mode — create several labels in one call; shared fields (labelFileId, model, languages, paths…) stay at the top level and top-level labelId/translations are ignored. A failed entry does not abort the batch. | |
| params | No | Optional write plumbing (packagePath, projectPath, languages, sortLabels, allowExtensionLabelFile, …) — all auto-resolved when omitted. Contract: get_knowledge(kind="op-spec", topic="labels"). | |
| labelId | No | [info] Exact label ID. Omit for action=info to list available label files for the model. | |
| verbose | No | [search] Default one line per label; true = full multi-line block. | |
| language | No | [search] Language/locale (default: en-US). Examples: cs, de, sk. | |
| maxResults | No | [search] Max labels listed (default 10, alias `limit`); a truncated set reports how many more matched. | |
| newLabelId | No | [rename] REQUIRED. New label ID — must be alphanumeric, no spaces. | |
| oldLabelId | No | [rename] REQUIRED. Current label ID (e.g. MyOldField). | |
| labelFileId | No | [search|info|create|update|rename] AxLabelFile ID (e.g. ContosoExt, SYS). For action=info with no labelId, returns the physical .label.txt path per language. For create/update/rename use the model's ORIGINAL label file, not an extension (…_Extension…). For a NEW label file this ID is the MODEL name, never the bare EXTENSION_PREFIX. | |
| translations | No | [create] REQUIRED for single-label create (omit when using labels[]). Translations for each language. Provide at least en-US. |