Skip to main content
Glama

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
MCP_SERVER_MODENoServer mode: 'read-write', 'write-only', or 'read-only'. Defaults to 'read-write'.read-write
D365FO_SOLUTIONS_PATHYesPath to the Visual Studio solution directory for D365FO projects.
D365FO_WORKSPACE_PATHYesPath to the D365FO workspace (e.g., AosService\PackagesLocalDirectory\YourPackageName\YourModelName).

Instructions

Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.

This server publishes no instructions, or was last inspected before Glama recorded them.

Capabilities

Features and capabilities supported by this server

Protocol revision2025-11-25

CapabilityDetails
tools
{}
logging
{}
prompts
{}
resources
{}

Tools

Functions exposed to the LLM to take actions

NameDescription
searchA

Search pre-indexed D365FO objects by name or keyword. Three modes in ONE tool: • single (default) → pass query; returns name, type, model. • batch → pass queries[] (max 10) to run searches in parallel (3× faster, with dedup + cross-reference). • extensions → set scope:"extensions" to restrict to custom/ISV models only (filters out Microsoft standard code). Model names in those results are SOURCE models — never use them as create/modify targets. Use get_object_info(objectType, name) when you already know the exact name and need full details.

generate_objectA

Generate X++/AOT code. Choose a mode: • pattern → a named X++ skeleton from the pattern enum (text only, no write). Call analyze_code(mode="patterns") first, then generate_object(mode="pattern"), then d365fo_file(action="create"). • scaffold → pattern-aware whole-object generation (table/form/report) with intelligent field/index/relation or form-pattern suggestions; set objectType. • find-methods → find()/findRecId()/exists() for a table (text), keyed on its primary/unique index. • relation-xpp → a table's relation(s) → X++ select + QueryBuildRange (text). • fields → field names → AxTableField XML with auto-resolved EDTs + optional field group. • table-relation → EDT-referencing fields → AxTableRelation XML (inverse of relation-xpp). 📖 Mode parameters are NOT inlined here: get_knowledge(kind="op-spec", topic="") — "scaffold:table"/"scaffold:form"/"scaffold:report" for the scaffolds — returns the contract; pass its values nested in params. For a single existing object definition's XML use d365fo_file(action="generate") instead.

analyze_codeA

Learn from the existing codebase. Choose a mode: • patterns → common classes/methods/dependencies for a scenario (call BEFORE generate_object(mode="pattern")). • implementations → real implementation examples of a similar method (actual code). • completeness → missing standard methods on a class (find/exist/validate gaps). • api-usage → how an API/class is initialized and called in practice.

d365fo_fileA

Create, modify, delete, undo, 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 action="undo". Needs operation. • delete → remove an object's XML from disk AND un-register it from every .rnrproj of the model that lists it. IRREVERSIBLE — confirm with the user first. • undo → roll back filePath: git-tracked → git checkout HEAD, which discards ALL uncommitted changes to that file, not just the last edit; untracked → deleted. • generate → XML as TEXT only, no write (Azure/Linux fallback). Try create first. create/modify/delete/undo 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.

find_referencesA

Find all references (where-used) to a class, method, field, table, enum, EDT, or LABEL. Essential for impact analysis before refactoring. For a method, SCOPE it to its declaring type — pass "Owner.method" (e.g. "SalesTable.initFromSalesQuotationTable"), set ownerName alongside a bare method name, or pass an AOT path ("/Tables/SalesTable/Methods/initFromSalesQuotationTable"). A bare method name (no owner) matches that name on every type and over-reports. For a label, pass the label id as targetName (e.g. "@WAX2194" or "@MyLabelFile:MyLabel"); results span every referencing object type (tables, forms, EDTs, enums, reports, menu items, …), not just code, and require the xref database (DYNAMICSXREFDB, full server mode).

get_object_infoA

Read D365FO object metadata. For 2+ objects pass objects:[{objectType,objectName},…] (max 10) — ONE call, run in parallel, per-object sections back; never loop single calls. One object: {objectType, name}. Pick the kind via objectType: class, table, form, query, view, enum, edt, report, data-entity, menu-item, service, map, config-key, security-policy, macro. Extension types (table-extension, form-extension, enum-extension, edt-extension, data-entity-extension) list all extensions of a base object — pass the base object name or a full extension name (the dot suffix is stripped automatically). Type-specific flags go in options. For CLASSES, {"members":"names"} (optional {"prefix":...}) returns a fast IntelliSense-style member-name list instead of full metadata.

labelsA

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

object_patternsA

Pattern toolkit. Choose a domain: • table → field/index/relation patterns for D365FO tables. Filter by tableGroup or similarTo a given table. • form → form-pattern toolkit; pick an action:

  • analyze → pattern advisor + usage analysis. For a NEW form pass recommend (preferred): the Microsoft decision tree picks the pattern and names reference forms to clone. Or filter by formPattern / dataSource / similarTo.

  • spec → structure spec of a pattern/sub-pattern: hierarchy, ordering, allowed children, reference forms, lifecycle.

  • validate → AxForm XML validator (hierarchy/order, sub-patterns, PatternVersion) → FP001-FP010. Call before d365fo_file action=create. • report → SSRS implementation recipes: object roster, scaffold call, checks. Optional pattern=. • mobile-app → warehouse-app screen recipes, led by the choice between the two frameworks that build them (ProcessGuide vs WHSWorkExecuteDisplay): create a flow, add or replace one screen, step icon/title, GS1 scan input. Optional pattern=.

security_infoA

D365FO security lookup. Choose a mode: • artifact → details + full hierarchy of a named privilege/duty/role (Role → Duties → Privileges → Entry Points). • coverage → reverse chain for an object: which privileges/duties/roles grant access (object → menu items → privileges → duties → roles).

extension_infoA

D365FO extensibility analyzer. Choose a mode: • coc → Chain of Command extensions + event subscriptions for a class/table. Use before writing a CoC extension to check for conflicts. • events → event handler subscriptions (SubscribesTo, delegate +=) for a class/table. Use before adding handlers to check for duplicates. • table-merge → all extensions of a table across models + effective merged schema (base + extension fields/indexes/methods). • points → available extension points (CoC-eligible/replaceable methods, delegates, blocked methods) and which are already extended. • strategy → recommends the best extensibility mechanism for a goal (CoC, event handler, business event, data entity, …) with reasoning, risks, alternatives, next steps.

validate_object_namingA

Validate a proposed D365FO object name against naming conventions: extension naming, ISV prefix, type-specific suffixes, and conflict detection against the symbol index.

get_workspace_infoA

ALWAYS call FIRST at session start. Returns model name, package path, framework directory, project path, environment type, and EXTENSION_PREFIX. Flags placeholder model names and missing prefix. Pass projectName/projectPath when you have the project's name or path. Authoritative source for target model — not search results.

verify_d365fo_projectA

Verify that D365FO objects exist on disk at the correct AOT path and are referenced in the .rnrproj project file. Use instead of PowerShell. Runs AFTER a build, not after a write: d365fo_file already verifies its own write inline (on disk + .rnrproj reference) and says so in its response. Omit objects to verify the ENTIRE project: every object referenced in the .rnrproj is checked on disk (requires projectPath, or an auto-detected/configured project).

update_symbol_indexA

Index D365FO XML file(s) changed OUTSIDE this server (hand edit, Visual Studio, git checkout). Do NOT call after d365fo_file create/modify — those refresh the index themselves, so it is a wasted round trip. Omit filePath for a bridge/cache refresh only.

build_d365fo_projectA

Build a D365FO model with xppc.exe (compiles the ENTIRE model, not one project). Blocks until done — call ONCE per build, do NOT poll (wait:false = legacy polling mode). fullBuild:true fixes "not been successfully compiled since it was last changed" stale-symbol errors.

run_bp_checkA

Run Microsoft Best Practices checker (xppbp.exe) on a D365FO project. Returns BP warnings and errors with rule codes (e.g. BPErrorLabelIsText, BPXmlDocNoDocumentationComments). Runs AFTER a build, not after a write — and build_d365fo_project(bpCheck:true) already folds this check into the build, so a separate call is rarely needed.

run_systest_classA

Execute a D365FO unit test class via SysTestConsole.exe (/unattended), returning per-method results.

get_knowledgeA

X++ knowledge lookup. Choose a kind: • knowledge → queryable X++ rulebook: verified patterns, BP rules, AX2012→D365FO migration. Use BEFORE generating code. Topics incl.: select-statement, coc-authoring, bp-rules, sysoperation, event-handlers, workflow, number-sequences, security, sysda, form patterns. • error → diagnose a D365FO/X++ compiler or runtime error: structured root cause + step-by-step fix + corrected X++ example (TTS mismatch, UpdateConflict, CSUV1, SYS10028 missing next, overlayering, BP errors, …). Call this instead of guessing — X++ error semantics differ from C#/.NET. • op-spec → the parameter contract for ONE d365fo_file operation/objectType or ONE generate_object mode (topic = "add-index", "table", "scaffold:form", …). Those two tools deliberately do not ship their parameters inline; call this after picking the operation, before the call. Omit topic for the index of available topics. • bp-moniker → validate an exact BP-check moniker, search by scenario when you have no moniker yet, or render a _BPSuppressions.xml block. Backed by names/text extracted from a real D365FO install — never invents a moniker.

validate_codeA

Static validator for generated X++/XML (paste the text). Choose a mode: • syntax → offline best-practice/BP validator (no xppbp.exe). Structured violations {rule, severity, line, excerpt, fix}. Covers select, CoC, BP and table-XML rules mined from standard models. • references → semantic reference resolver (index-only): verifies every type, field, method (incl. arity), enum, label and intrinsic (tableStr/fieldStr/…) EXISTS in the indexed codebase. codeType="xml-table" checks XML refs instead: EDT/enum/relation/extends/label. Call mode="both" AFTER generating, BEFORE writes; fix errors in the same turn. Write tools run references internally when GROUNDING_ENFORCE=true.

prepareA

ONE-call context aggregator + groundingToken (30-min TTL, required for extension/new-object writes when GROUNDING_ENFORCE=true). Choose a mode: • change → extending/modifying an EXISTING object: exact signature, existing CoC wrappers, eligibility, recommended strategy, naming, patterns. Replaces the analyze→search→info→generate loop. • create → a NEW object: collision check, naming with auto-prefix, similar objects, EDT suggestions, reusable labels, mined property defaults. • test → writing a SysTest for an existing class: methods worth covering, tests that already exist, whether the model references TestEssentials, and the red-first cycle.

Prompts

Interactive templates invoked by user choice

NameDescription
xpp_system_instructionsSystem instructions for AI assistants (GitHub Copilot, Claude Code) when working with D365 Finance & Operations X++ development
xpp_create_file🔥 USE THIS WHEN CREATING D365FO FILES: Mandatory workflow for creating D365FO classes, tables, forms, enums. ALWAYS use d365fo_file(action="create") tool FIRST.
xpp_code_reviewReview X++ code for best practices and potential issues
xpp_explain_classGet a detailed explanation of an X++ class
xpp_extension_guideComplete guide for CoC (Chain of Command) extensions and event handlers in D365FO
xpp_security_guideD365FO security model creation guide: privilege, duty, role, and menu item workflow
xpp_sysoperation_guideSysOperation framework reference: DataContract + Controller + Service pattern for batch operations
xpp_data_entity_guideData entity development guide: OData, DMF, staging tables, computed columns

Resources

Contextual data attached and managed by the client

NameDescription
Workspace Context SnapshotCurated snapshot of the current work: active model/project, recently edited objects, uncommitted X++ changes and index freshness. Read this first to ground a session.
Active ObjectThe object the developer is most likely working on (most recently modified X++ file) enriched with its indexed metadata. Proxy for editor focus — MCP exposes roots, not the cursor.
Workspace StatisticsSymbol-index totals by type, indexed models and workspace file counts.
Workspace FilesList of X++ metadata files detected in the workspace (most recent first).
Recent Workspace ChangesUncommitted X++ object files (vs HEAD + untracked). Empty when not a git repo.

TDQS

A4.3/5.0

Scored across 20 tools

Disambiguation5/5

Each tool has a clearly distinct purpose, even though some have multiple modes/actions. The modes are well-differentiated (e.g., 'create' vs 'modify' vs 'delete' for d365fo_file; 'search' vs 'info' for labels). No two tools seem to do the same thing.

Naming Consistency4/5

Most tools use consistent snake_case with verb_noun pattern (e.g., find_references, get_object_info, update_symbol_index). 'd365fo_file' and 'prepare' deviate slightly, but the pattern is broadly consistent.

Tool Count4/5

20 tools for a comprehensive D365FO development MCP is reasonable and covers a wide domain. It's slightly above the typical sweet spot but each tool is justified given the complexity of D365FO development.

Completeness5/5

The tool surface is remarkably complete: context preparation, searching, analysis, code generation, file I/O, validation, security, extensibility, naming, workspace info, building, testing, and knowledge lookup. Hard to imagine obvious gaps for the stated purpose of D365FO development.

Maintenance

ActivityActive
ResponsivenessResponsive