Skip to main content
Glama

labels

Destructive

Search label files, inspect translations, and create, update, or rename D365 F&O label texts across languages. Bulk-write missing entries with createIfMissing, removing search-then-create.

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").

Input Schema

TableJSON 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 when using labels[]). Translations for each language. Provide at least en-US.

Schema Changelog

Changes observed during successful MCP inspections.

  1. 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"
  2. 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."
  3. 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."
  4. 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"
      +]
  5. 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"
      +}
  6. First observedv1.8.0

TDQS

A5/5.0
Behavior5/5

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

Annotations already mark destructiveHint=true, and the description adds meaningful behavioral detail: update overwrites existing text, rename affects .label.txt + X++ + XML + index, createIfMissing creates or reuses, and write plumbing is auto-resolved. This goes well beyond the annotation surface and gives the agent an accurate mental model of side effects.

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

Conciseness5/5

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

The description is long but appropriately structured: an opening one-line summary, an early sibling distinction, and a bulleted action list where every sentence carries operational meaning. It is front-loaded with the most important routing guidance and remains readable despite covering five modes.

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?

For a 14-parameter tool with no output schema, the description covers action selection, required arguments, bulk behavior, destructive effects, and how to resolve deeper plumbing questions via get_knowledge. It also describes search result verbosity and truncation behavior, making the tool adequately complete for correct invocation.

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

Parameters5/5

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

Schema coverage is high at 93%, and the description still adds real semantic value: labelId accepts any spelling, query arrays try multiple phrasings, bulk mode shares top-level fields, and label file targeting must use the model's original label file. It also clarifies action-specific parameter roles such as oldLabelId/newLabelId for rename and dryRun for preview.

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?

The description states a clear purpose: unified label operations covering read (search/info) and write (create/update/rename) actions, and lists each action explicitly. It also distinguishes itself from d365fo_file by explaining when the label tool is not needed, so an agent can tell it apart from a key sibling.

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?

Usage guidance is explicit and actionable: search is 'never needed before a create', create with createIfMissing=true replaces search-then-create, rename should use dryRun=true first, and d365fo_file already handles raw-text labels so no label call is needed. This clearly routes the agent to the right tool and mode.

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