Skip to main content
Glama

d365fo_file

Destructive

Create, modify, or generate D365FO AOT objects (classes, tables, forms, extensions) for X++ development, handling file writes and project integration.

Instructions

Create, modify, or generate a D365FO AOT object. Choose an action: • create → write a NEW object file into PackagesLocalDirectory (UTF-8 BOM, auto-added to .rnrproj). THE WRITE STEP — incomplete until isError=false; ⚠️/❌ = failure. Extensions: objectName="Base.PrefixExtension". • modify → edit an EXISTING object. APPLIES IMMEDIATELY, no dry-run — confirm with the user first; revert with undo_last_modification. Needs operation. • generate → XML as TEXT only, no write (Azure/Linux fallback). Try create first. create/modify need Windows. 📖 Parameters are NOT inlined here: get_knowledge(kind="op-spec", topic=""|"") returns the contract for the one you picked — pass its values nested in params (modify) / properties (create), along with any packageName/packagePath/solutionPath/workspacePath override. Model + prefix auto-applied. Classes: member vars inside the class { }, methods after the closing }.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
actionYesOne of the three modes described above.
paramsNo[modify] Operation-specific parameters as ONE nested object, per get_knowledge(kind="op-spec", topic="<operation>"). A missing/wrong one returns that COMPLETE spec — follow it, do not guess.
filePathNo[modify] Absolute XML path — bypasses symbol-DB lookup. Use for objects just created.
modelNameNoTarget model — auto-detected. NEVER take it from search results (those are source models).
operationNo[modify] REQUIRED unless using operations[]. add-method also UPDATES in place; replace-code is the surgical oldCode→newCode path. Parameters: get_knowledge(kind="op-spec", topic="<operation>").
overwriteNoAllow overwriting — never rewrite via PowerShell.
objectNameNoBase name WITHOUT model prefix — the tool prepends it. Extension classes: "{Base}_Extension". NEVER hand-build the prefix.
objectTypeNoEach security/menu-item type is its own AOT folder — NEVER use security-privilege for duty or role. [modify]/[generate] cover the core families + their *-extension variants.
operationsNo[modify] PREFERRED for 2+ edits to the SAME object — ONE call, not one per edit. Entries are {operation, …op-spec params}; objectType/objectName/modelName stay top-level. Applied in order, stopped at the first failure, per-operation results back. 3 fields + their field groups + an index: 7 calls flat, 1 here.
propertiesNo[create] Per-objectType creation properties (label, fields[], extends, enumValues[], primaryTable, …) — NOT in this schema. Fetch yours: get_knowledge(kind="op-spec", topic="<objectType>").
sourceCodeNoX++ source. FOR CLASSES auto-split: <Declaration> = class line + member vars; <Methods> = each method after the closing }.
xmlContentNoComplete XML written verbatim (+overwrite=true rewrites an object).
projectPathNoPath to .rnrproj (auto-detected).
addToProjectNoAdd to the ACTIVE .rnrproj — keep the default.
createBackupNo[modify] Back up before modifying.
groundingTokenNoFrom prepare(change/create). Required for *-extension when GROUNDING_ENFORCE=true; object-bound.
Behavior5/5

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

Beyond annotations (readOnlyHint=false, destructiveHint=true), the description reveals immediate application of modify, lack of dry-run, revert via undo_last_modification, auto-prefixing of model names, Windows dependency, and the 'THE WRITE STEP' failure indicator. These are non-obvious behaviors not visible in annotations, with no contradictions.

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?

The description is long but well-structured with bullet points and a front-loaded purpose sentence. It packs in critical nuance (failures, backup, project additions) but uses emojis and somewhat verbose warnings that add slight noise. Still, every section carries necessary information for such a complex tool.

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 tool with 16 params, nested objects, no output schema, and high complexity, the description covers all three actions, failure indicators, environment constraints (Windows), project file integration, and points to get_knowledge for operation-specific contracts. It provides enough context to select and invoke the tool correctly, even without an output schema.

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 100%, so baseline is 3. The description adds value by explaining that params/properties are nested objects whose structure is defined by get_knowledge specs, and clarifies objectName/modelName semantics (e.g., 'NEVER hand-build the prefix', 'NEVER take it from search results'). This goes beyond the schema, though individual operation-specific details intentionally remain in get_knowledge.

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 opens with a clear, specific verb plus resource: 'Create, modify, or generate a D365FO AOT object.' It then distinguishes each action (write new object, edit existing object, output XML text) with distinct behavior, separating it from sibling tools like generate_object.

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?

The description gives explicit when-to-use guidance for each action: create for new objects, modify for existing objects (with a warning to confirm first), and generate for text-only fallback. It also states 'Try create first' and notes Windows requirements, plus directs users to get_knowledge for operation specs, effectively handling alternatives.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/dynamics365ninja/d365fo-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server