Skip to main content
Glama

labels

Destructive

Manage D365 F&O label files by searching, reading, creating, updating, or renaming translations across languages.

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). • 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, allowExtensionLabelFile…) is auto-resolved; override it via 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|create|update|rename] Model that owns the label file (e.g. ContosoExt).
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] 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 write plumbing — the auto-resolved overrides named at the end of the description above.
labelIdNo[info] Label ID, any spelling: SYS67433, @SYS67433, @ContosoExt:MyLabel (paste search output). labelFileId/model optional. Omit to list label files.
verboseNo[search] Default one line per label; true = full multi-line block.
languageNo[search] Language/locale (default: en-US). Examples: cs, de, sk.
maxResultsNo[search] Max labels listed (default 10); a truncated set reports how many more matched.
newLabelIdNo[rename] REQUIRED. New label ID.
oldLabelIdNo[rename] REQUIRED. Current label ID (e.g. MyOldField).
labelFileIdNo[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.
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. 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."
  2. 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"
  3. 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."
  4. 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."
  5. 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"
      +]
  6. 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"
      +}
  7. First observedv1.8.0

TDQS

A4.8/5.0
Behavior5/5

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

Beyond the destructiveHint=true annotation, the description enumerates exactly what each write touches: create writes across every language .label.txt, rename touches '.label.txt + X++ + XML + index', and a failed bulk entry does not abort the batch. It also flags that write plumbing is auto-resolved and overridable via get_knowledge, all of which meaningfully amplifies the structured annotation without contradicting it.

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 key routing rule (no call needed before create) and organized as a scannable per-action list, so it reads well for a 5-action/14-param tool. It is dense and slightly repetitive ('no call here is needed', the createIfMissing caveat) but every element is load-bearing.

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

Completeness5/5

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

Covers all five actions, distinguishes bulk from single create, notes that top-level fields are ignored in bulk mode, and points to get_knowledge for the overridable plumbing. With no output schema, the description does not need to explain returns, and what remains (permissions/auth) is not central to invoking the tool correctly.

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%, so the bar is largely met by structured fields, but the description adds real semantics: label IDs 'describe MEANING — never a model prefix', target the original label file not an _Extension one, and for a new label file labelFileId is the MODEL name, not the EXTENSION_PREFIX. Those are non-obvious rules the schema does not encode.

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 'Unified label operations — read and write' and then defines each of the five actions with a specific verb and target (search→full-text query, info→translations for a labelId, create→add a label to an AxLabelFile, update→overwrite existing text, rename→rename across files). It also distinguishes itself from the sibling d365fo_file, which an agent might otherwise use for labels.

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?

Explicitly tells the agent when NOT to call it ('Writing an object? d365fo_file create/modify already turn a raw-text label/fieldLabel into a real @Ref ... no call here is needed') and when it is redundant ('Never needed before a create'). It also prescribes sequencing within the tool: 'ALWAYS pass createIfMissing=true' to replace search-then-create, and 'Use dryRun=true first' for rename.

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