Skip to main content
Glama

labels

Destructive

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

NameRequiredDescriptionDefault
modelNo[search|info|list|create|update|rename] Model owning the label file.
queryNo[search] REQUIRED. Search text — matches label ID, text and developer comment. ARRAY = try several phrasings in ONE call.
actionYes
dryRunNo[rename] Preview changes without writing anything.
labelsNo[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.
paramsNoOptional overrides / list filters (see op-spec).
labelIdNo[info|delete] Label ID, any spelling: SYS67433, @SYS67433, @ContosoExt:MyLabel (paste search output). labelFileId/model optional. Omit to list label files.
verboseNo[search|list] true = full block (list: all languages).
languageNo[search|list] Language/locale (default en-US), e.g. cs, de, sk, fi.
maxResultsNo[search|list] Page size (search 10, list 50); reports how many more matched.
newLabelIdNo[rename] REQUIRED. New label ID.
oldLabelIdNo[rename] REQUIRED. Current label ID (e.g. MyOldField).
labelFileIdNo[search|info|list|create|update|rename] AxLabelFile ID (e.g. ContosoExt, SYS). New file: ID = MODEL name, never EXTENSION_PREFIX.
translationsNo[create] REQUIRED for single-label create (omit with labels[]). Translations for each language. Provide at least en-US.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed7 schema fields changedv1.25.1
    • changedInput schema / properties / action / enum
      Previous value: -[
      -  "search",
      -  "info",
      -  "create",
      -  "update",
      -  "rename",
      -  "delete"
      -]New value: +[
      +  "search",
      +  "info",
      +  "list",
      +  "create",
      +  "update",
      +  "rename",
      +  "delete"
      +]
    • changedInput schema / properties / labelFileId / description
      Previous value: -"[search|info|create|update|rename] AxLabelFile ID (e.g. ContosoExt, SYS). For a NEW label file this ID is the MODEL name, never the bare EXTENSION_PREFIX."New value: +"[search|info|list|create|update|rename] AxLabelFile ID (e.g. ContosoExt, SYS). New file: ID = MODEL name, never EXTENSION_PREFIX."
    • changedInput schema / properties / language / description
      Previous value: -"[search] Language/locale (default: en-US). Examples: cs, de, sk."New value: +"[search|list] Language/locale (default en-US), e.g. cs, de, sk, fi."
    • changedInput schema / properties / maxResults / description
      Previous value: -"[search] Max labels listed (default 10); a truncated set reports how many more matched."New value: +"[search|list] Page size (search 10, list 50); reports how many more matched."
    • changedInput schema / properties / model / description
      Previous value: -"[search|info|create|update|rename] Model that owns the label file (e.g. ContosoExt)."New value: +"[search|info|list|create|update|rename] Model owning the label file."
    • changedInput schema / properties / params / description
      Previous value: -"Optional write plumbing — the auto-resolved overrides named at the end of the description above."New value: +"Optional overrides / list filters (see op-spec)."
    • changedInput schema / properties / verbose / description
      Previous value: -"[search] Default one line per label; true = full multi-line block."New value: +"[search|list] true = full block (list: all languages)."
  2. Changed2 schema fields changedv1.25.0
    • changedInput schema / properties / action / enum
      Previous value: -[
      -  "search",
      -  "info",
      -  "create",
      -  "update",
      -  "rename"
      -]New value: +[
      +  "search",
      +  "info",
      +  "create",
      +  "update",
      +  "rename",
      +  "delete"
      +]
    • changedInput schema / properties / labelId / description
      Previous value: -"[info] Label ID, any spelling: SYS67433, @SYS67433, @ContosoExt:MyLabel (paste search output). labelFileId/model optional. Omit to list label files."New value: +"[info|delete] Label ID, any spelling: SYS67433, @SYS67433, @ContosoExt:MyLabel (paste search output). labelFileId/model optional. Omit to list label files."
  3. Changed1 schema field changedv1.24.0
    • changedInput schema / properties / labels / description
      Previous value: -"[create] Bulk mode — shared fields stay at the top level (top-level labelId/translations are then ignored); a failed entry does not abort the batch."New value: +"[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."
  4. Changed1 schema field changedv1.21.0
    • changedInput schema / properties / translations / description
      Previous value: -"[create] REQUIRED for single-label create (omit when using labels[]). Translations for each language. Provide at least en-US."New value: +"[create] REQUIRED for single-label create (omit with labels[]). Translations for each language. Provide at least en-US."
  5. Changed8 schema fields changedv1.16.2
    • removedInput schema / properties / action / description
      Removed value: -"Label operation to perform."
    • changedInput schema / properties / labels / description
      Previous value: -"[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."New value: +"[create] Bulk mode — shared fields stay at the top level (top-level labelId/translations are then ignored); a failed entry does not abort the batch."
    • removedInput schema / properties / labels / items / properties / labelId / description
      Removed value: -"Label ID for this entry — alphanumeric, no model prefix."
    • removedInput schema / properties / labels / items / properties / translations / description
      Removed value: -"Same entries as the top-level translations[]."
    • changedInput schema / properties / newLabelId / description
      Previous value: -"[rename] REQUIRED. New label ID — must be alphanumeric, no spaces."New value: +"[rename] REQUIRED. New label ID."
    • changedInput schema / properties / params / description
      Previous value: -"Optional write plumbing (packagePath, projectPath, languages, sortLabels, allowExtensionLabelFile, …) — all auto-resolved when omitted. Contract: get_knowledge(kind=\"op-spec\", topic=\"labels\")."New value: +"Optional write plumbing — the auto-resolved overrides named at the end of the description above."
    • removedInput schema / properties / translations / items / properties / comment / description
      Removed value: -"Developer comment (optional)"
    • removedInput schema / properties / translations / items / properties / text / description
      Removed value: -"Label text"
  6. Changed9 schema fields changedv1.14.0
    • changedInput schema / properties / action / description
      Previous value: -"Label operation to perform. \"list\"/\"list-files\" are aliases of \"info\" (lists label files)."New value: +"Label operation to perform."
    • changedInput schema / properties / action / enum
      Previous value: -[
      -  "search",
      -  "info",
      -  "create",
      -  "update",
      -  "rename",
      -  "list",
      -  "list-files"
      -]New value: +[
      +  "search",
      +  "info",
      +  "create",
      +  "update",
      +  "rename"
      +]
    • changedInput schema / properties / dryRun / description
      Previous value: -"[rename] Preview changes without writing anything (default: false). Use this first!"New value: +"[rename] Preview changes without writing anything."
    • changedInput schema / properties / labelFileId / description
      Previous value: -"[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."New value: +"[search|info|create|update|rename] AxLabelFile ID (e.g. ContosoExt, SYS). For a NEW label file this ID is the MODEL name, never the bare EXTENSION_PREFIX."
    • addedInput schema / properties / labels / items / properties / translations / description
      Added value: +"Same entries as the top-level translations[]."
    • removedInput schema / properties / labels / items / properties / translations / items / properties
      Removed value: -{
      -  "comment": {
      -    "description": "Developer comment (optional)",
      -    "type": "string"
      -  },
      -  "language": {
      -    "description": "Locale code, e.g. en-US, cs, de, sk",
      -    "type": "string"
      -  },
      -  "text": {
      -    "description": "Label text",
      -    "type": "string"
      -  }
      -}
    • removedInput schema / properties / labels / items / properties / translations / items / required
      Removed value: -[
      -  "language",
      -  "text"
      -]
    • removedInput schema / properties / limit
      Removed value: -{
      -  "description": "[search] Alias of maxResults.",
      -  "type": "number"
      -}
    • changedInput schema / properties / maxResults / description
      Previous value: -"[search] Max labels listed (default 10, alias `limit`); a truncated set reports how many more matched."New value: +"[search] Max labels listed (default 10); a truncated set reports how many more matched."
  7. Changed1 schema field changedv1.12.0
    • changedInput schema / properties / labelId / description
      Previous value: -"[info] Exact label ID. Omit for action=info to list available label files for the model."New value: +"[info] Label ID, any spelling: SYS67433, @SYS67433, @ContosoExt:MyLabel (paste search output). labelFileId/model optional. Omit to list label files."
  8. Changed3 schema fields changedv1.10.0
    • changedInput schema / properties / query / description
      Previous value: -"[search] REQUIRED. Search text — matches label ID, text and developer comment."New value: +"[search] REQUIRED. Search text — matches label ID, text and developer comment. ARRAY = try several phrasings in ONE call."
    • addedInput schema / properties / query / items
      Added value: +{
      +  "type": "string"
      +}
    • changedInput schema / properties / query / type
      Previous value: -"string"New value: +[
      +  "string",
      +  "array"
      +]
  9. Changed17 schema fields changedv1.9.0
    • removedInput schema / properties / addToProject
      Removed value: -{
      -  "description": "[create] Add label file XML descriptors to the VS project (default: true).",
      -  "type": "boolean"
      -}
    • removedInput schema / properties / allowExtensionLabelFile
      Removed value: -{
      -  "description": "[create|rename] Allow writing to a label file EXTENSION (\"_Extension\" marker). Default false — new labels belong in the model's ORIGINAL label file.",
      -  "type": "boolean"
      -}
    • removedInput schema / properties / createLabelFileIfMissing
      Removed value: -{
      -  "description": "[create] Create the AxLabelFile structure if missing (default: true). A wrong-path guard still fails loudly when the model directory is not found, so no phantom file is produced. Set false to fail fast instead.",
      -  "type": "boolean"
      -}
    • removedInput schema / properties / defaultComment
      Removed value: -{
      -  "description": "[create] Developer comment for languages without explicit comment.",
      -  "type": "string"
      -}
    • removedInput schema / properties / description
      Removed value: -{
      -  "description": "[create] Label description (comment line in .label.txt). Defaults to VS project name from .rnrproj when omitted, then falls back to labelFileId. Per-translation comment and defaultComment take priority.",
      -  "type": "string"
      -}
    • removedInput schema / properties / languages
      Removed value: -{
      -  "description": "[create] Restrict which language .label.txt files are written (e.g. [\"en-US\"]). Omitted = every language folder present in the model.",
      -  "items": {
      -    "type": "string"
      -  },
      -  "type": "array"
      -}
    • changedInput schema / properties / limit / description
      Previous value: -"[search] Maximum number of results (default 30)."New value: +"[search] Alias of maxResults."
    • addedInput schema / properties / maxResults
      Added value: +{
      +  "description": "[search] Max labels listed (default 10, alias `limit`); a truncated set reports how many more matched.",
      +  "type": "number"
      +}
    • removedInput schema / properties / packageName
      Removed value: -{
      -  "description": "[create|rename] Package name for the model. Auto-resolved if omitted.",
      -  "type": "string"
      -}
    • removedInput schema / properties / packagePath
      Removed value: -{
      -  "description": "[create|rename] Root packages path. Auto-detected from environment config if omitted.",
      -  "type": "string"
      -}
    • addedInput schema / properties / params
      Added value: +{
      +  "additionalProperties": true,
      +  "description": "Optional write plumbing (packagePath, projectPath, languages, sortLabels, allowExtensionLabelFile, …) — all auto-resolved when omitted. Contract: get_knowledge(kind=\"op-spec\", topic=\"labels\").",
      +  "type": "object"
      +}
    • removedInput schema / properties / projectPath
      Removed value: -{
      -  "description": "[create] Path to the .rnrproj project file. Auto-detected from .mcp.json if omitted.",
      -  "type": "string"
      -}
    • removedInput schema / properties / searchPaths
      Removed value: -{
      -  "description": "[rename] Additional absolute directory paths to scan for X++ / XML references.",
      -  "items": {
      -    "type": "string"
      -  },
      -  "type": "array"
      -}
    • removedInput schema / properties / solutionPath
      Removed value: -{
      -  "description": "[create] Path to the .sln solution directory. Fallback to find .rnrproj if projectPath is not set.",
      -  "type": "string"
      -}
    • removedInput schema / properties / sortLabels
      Removed value: -{
      -  "description": "[create] Sort labels alphabetically in .label.txt (default true, from LABEL_SORT_ORDER env; false = append at end).",
      -  "type": "boolean"
      -}
    • removedInput schema / properties / updateIndex
      Removed value: -{
      -  "description": "[create|rename] Update the MCP label index after writing (default: true).",
      -  "type": "boolean"
      -}
    • addedInput schema / properties / verbose
      Added value: +{
      +  "description": "[search] Default one line per label; true = full multi-line block.",
      +  "type": "boolean"
      +}
  10. First observedv1.8.0

TDQS

A4.5/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations only declare destructiveHint=true and openWorldHint=false; the description goes further by marking which actions write (create/update/rename), disclosing that bulk labels[] failures do not abort the batch, and that update overwrites existing text. Gap: the action enum includes 'delete' which the prose never describes, so the most destructive path is undocumented, and createIfMissing is referenced but not present as a schema property.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Front-loaded with the read/write framing and organized as a per-action bullet list, so it is scannable despite running long for a tool description. Density is high and most sentences carry actionable constraints, though the repeated warnings about model prefixes and createIfMissing add some bulk.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a 14-parameter, nested-object, multi-action tool with no output schema, the definition covers the decision logic, bulk semantics, and safety previews well, and hints at return behavior via maxResults reporting remaining matches. The omission of 'delete' from the action prose is the main completeness gap for a tool flagged destructive.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is already 93%, yet the description still adds decision-level meaning: bulk mode puts shared fields at the top level and causes top-level labelId/translations to be ignored, labelId accepts any spelling including @ContosoExt:MyLabel, and label IDs must describe meaning rather than carry a model prefix. It also steers labelFileId to the model's original file, never an _Extension one — guidance absent from the schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

States the resource and its dual nature immediately ("Unified label operations — read and write"), then enumerates each action with a concrete verb and object: search is a full-text query, info returns all translations for a labelId, list pages one label file's labels, create adds across every language file. An agent can distinguish the six documented actions without opening the schema.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Explicit routing guidance: writing an object needs no call here because d365fo_file already produces @Refs, search is "never needed before a create", createIfMissing=true makes one call replace search-then-create, and rename should be previewed with dryRun=true first. It also redirects detailed plumbing to get_knowledge(op-spec, labels) rather than leaving the agent to guess.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.