{"name":"io.github.alimbenhelal-pro/alm-xpp-mcp","slug":"alimbenhelal-pro-alm-xpp-mcp","title":"ALM X++ MCP Server","description":"D365 F&O: 90 AI tools over 200K+ objects, 25M+ cross-refs, 24M+ label translations.","url":"https://mcp.market/server/alimbenhelal-pro-alm-xpp-mcp","rating":null,"grade":"B","score":81,"certified":false,"status":"active","category":"other","tags":[],"presence":{"score":33,"stars":3,"forks":0,"downloads_week":72,"last_push_at":"2026-09-04T08:23:52.000Z","license":"MIT"},"uptime":{"percent":100,"checks":28,"ok":28,"last_checked_at":"2026-11-04T05:40:41.167Z","last_ok_at":"2026-11-04T05:40:41.167Z","latency_ms":326},"claimed":false,"transport":"mixed","callable_via_gateway":true,"default_price_micros":0,"repository":"https://github.com/alimbenhelal-pro/ALM-XPP-MCP","website":"https://www.almxpp.com","version":"1.5.1","remotes":[{"type":"streamable-http","url":"https://api.almxpp.com/mcp","variables":{"apiKey":{"description":"Your ALM X++ license key -- request one at https://www.almxpp.com"}}}],"packages":[{"registryType":"npm","registryBaseUrl":"https://registry.npmjs.org","identifier":"almxppmcp","version":"1.5.1","transport":{"type":"stdio"},"environmentVariables":[{"description":"Your ALM X++ license key -- request one at https://www.almxpp.com","isRequired":true,"isSecret":true,"name":"ALMXPPMCP_API_KEY"}]}],"tools":[{"name":"ado_analyze_pr_impact","description":"[~] PRIORITY TRIGGER: Use this tool when the user says 'analyse PR', 'review PR', 'check PR', 'PR #', 'impact du PR', 'analyse la PR', 'what changed in PR', 'D365 impact of PR', 'code review PR', 'violations in PR', 'PR review'. NEVER call search_d365_code when 'PR' or 'Pull Request' + a number is mentioned. Analyse the full D365 F&O code impact of a Pull Request. Reads each changed file's CONTENT straight from the PR's source commit via the ADO REST API, so it reviews the PROPOSED (un-merged) code -- including brand-new files that do not yet exist on the target branch. DO NOT fall back to local `git show`/`git diff`: this tool already pulls the un-merged content over the API and analyses it against the indexed standard KB. When `includeSource` is true (the default), the FULL un-merged source of every analysed file is embedded in the output (one fenced block per file), so you have everything needed for a complete semantic review -- BP findings AND the actual code -- in a single call. NEVER run git to read the files. This matters for metadata-only PRs (tables/enums/menu items/reports): the BP engine is X++-centric and may report few violations on AOT XML, but the embedded source lets you review those changes properly. For every X++ class/table/form/extension modified in the PR: (1) Best Practice validation -- reports Critical and Warning violations. (2) Upgrade impact -- cross-references CoC targets, event handlers, and extensions against the D365 standard code. (3) Extension conflicts -- finds existing CoC/extensions that may conflict. (4) Produces a ready-to-post PR review comment addressed to the PR author. After reviewing, call `ado_post_pr_comment` to post the review (requires user confirmation). Requires DEVOPS_ORG_URL + DEVOPS_PAT (Code: Read).","write_action":false,"price_micros":0,"input_schema":{"type":"object","properties":{"repositoryId":{"description":"Git repository name or ID.","type":"string"},"prId":{"description":"Pull Request ID (integer), e.g. 42.","type":"integer"},"project":{"description":"Optional: Azure DevOps project name. Falls back to DEVOPS_PROJECT env var.","type":["string","null"],"default":null},"includeWarnings":{"description":"Include Warning-level violations in addition to Critical (default: true). Set false for Critical-only.","type":"boolean","default":true},"maxFilesDeep":{"description":"Max X++ files to fully analyse (default 10, max 20). Larger PRs get a summary for remaining files.","type":"integer","default":10},"includeSource":{"description":"Embed the un-merged SOURCE of each analysed file in the output so the reviewer can do a full semantic code review without a local git checkout. Default true.","type":"boolean","default":true},"sourceCharsPerFile":{"description":"Max characters of source to embed per file when includeSource is true (1000-40000, default 8000). Larger files are truncated with a note.","type":"integer","default":8000}},"required":["repositoryId","prId"]}},{"name":"ado_analyze_workitem","description":" AZURE DEVOPS ONLY -- Fetch a Work Item and assemble ALL technical context needed for D365 F&O expert analysis. [~] PRIORITY TRIGGER: 'analyse le workitem', 'analyse la tâche', 'analyse le FDD/RDD/CR/IDD', 'read the work item', 'check the bug', 'look at ticket', 'review task', '#1234', 'WI#', 'WI ', 'item #'.  NEVER for: labels (@SYS/@TRX/@FIN), X++ code lookup, AOT objects -- use search_labels / search_d365_code instead. \n\n## WHAT THIS TOOL RETURNS\nRaw structured context only -- NOT a finished analysis. The tool returns:\n  1. Work item metadata (title, description, repro steps, acceptance criteria, comments)\n  2. D365 standard KB object details: fields, methods, code snippets for every matched object\n  3. Custom code on disk (customer extension model): existing CoC methods, extension bodies\n  4. Chain of Command / relation graph for all impacted objects\n\n## YOUR JOB AS COPILOT AFTER CALLING THIS TOOL\nYou MUST synthesize the raw context into a precise developer-ready analysis IN FRENCH.\nWrite it in a professional tone, as if authored by a senior D365 consultant -- no emojis, no icons.\nThe analysis must contain these sections:\n  1. **Compréhension du besoin** -- résume ce que le client demande en 2-3 phrases claires\n  2. **Analyse technique** -- identifie la cause racine en croisant le besoin + les objets KB + le code custom\n  3. **Instructions de développement** -- liste ordonnée et précise : quel objet, quelle méthode, quoi modifier\n     - Si une extension custom existe sur disque -> pointer exactement quelle méthode à modifier\n     - Si pas d'extension -> indiquer quel CoC créer, sur quel objet standard, quelle méthode\n  4. **Estimation** -- chiffrage en heures/jours selon la complexité détectée\n  5. **Commentaire ADO** -- Texte markdown sans icônes, prêt à poster sur le WI analysé UNIQUEMENT.\n     IMPORTANT: never post (never call ado_post_comment) on any linked/related work item -- only on the analyzed WI.\n\nRequires DEVOPS_ORG_URL + DEVOPS_PAT env vars.","write_action":false,"price_micros":0,"input_schema":{"type":"object","properties":{"workItemId":{"description":"Work item ID (integer), e.g. 1234","type":"integer"},"project":{"description":"Optional: Azure DevOps project name. Falls back to DEVOPS_PROJECT env var.","type":["string","null"],"default":null},"includeImages":{"description":"Include image attachments as base64 data URIs for visual analysis by Copilot. Default: false. Set true only when screenshots are needed -- adds latency and token cost.","type":"boolean","default":false},"maxComments":{"description":"Number of recent comments to include (default 5, max 20). Use 3 for faster results.","type":"integer","default":5},"focusObjects":{"description":"Comma-separated D365 object names to force-include in KB analysis, e.g. 'SalesTable,CustTable'. Providing these speeds up analysis significantly.","type":["string","null"],"default":null},"sourceBranch":{"description":"Git branch to read custom code from when no PR or commit is linked to the work item. Default: 'main'. Use this to point at the integration branch (e.g. 'develop', 'release/2025').","type":"string","default":"main"}},"required":["workItemId"]}},{"name":"ado_create_bug_from_test","description":"WHEN: a test case failed and the failure must become a Bug in Azure DevOps. Triggers: 'open a bug for this failed test', 'crée le bug depuis le test', 'file the defect'. Builds the Bug from the test case: its steps become the reproduction steps, `observed` is what actually happened, and it is linked (Related) to the test case and to the requirement under test. `observed` must be what was really seen: no personal data. SAFE BY DEFAULT: confirm=false only shows the Bug. Call again with confirm=true after the user agreed. An open Bug with the same title is not duplicated. Needs a PAT with Work Items (Read & write).","write_action":true,"price_micros":0,"input_schema":{"type":"object","properties":{"testCaseId":{"description":"Id of the Test Case work item that failed.","type":"integer"},"observed":{"description":"What was observed when it failed: the message, the wrong value, the screen.","type":"string"},"expected":{"description":"Optional: what was expected, if the test case does not say it clearly.","type":["string","null"],"default":null},"severity":{"description":"Optional: 1-Critical, 2-High (default), 3-Medium, 4-Low.","type":["string","null"],"default":null},"title":{"description":"Optional: Bug title. Default: '[Test failed] ' and the test case title.","type":["string","null"],"default":null},"project":{"description":"Azure DevOps project. Falls back to DEVOPS_PROJECT.","type":["string","null"],"default":null},"confirm":{"description":"false (default): preview only. true: create. Only after the user agreed.","type":"boolean","default":false}},"required":["testCaseId","observed"]}},{"name":"ado_create_regression_suite","description":"WHEN: the test cases of some touched objects should be grouped in one suite of an existing test plan, to replay them. Triggers: 'create the regression suite', 'suite de non-régression pour la PR N', 'group the tests of these objects'. Creates a query-based (dynamic) suite that gathers by itself every test case tagged obj:<object>. SAFE BY DEFAULT: confirm=false only shows the suite and how many cases it would gather now. Call again with confirm=true after the user agreed. A suite with the same name in the plan is reused. Needs a PAT with Test Management (Read & write) and the Basic + Test Plans access level.","write_action":true,"price_micros":0,"input_schema":{"type":"object","properties":{"planId":{"description":"Id of the test plan that will hold the suite.","type":"integer"},"objects":{"description":"Comma-separated D365 objects whose test cases the suite gathers.","type":"string"},"name":{"description":"Suite name. Default: 'Regression - ' and the first objects.","type":["string","null"],"default":null},"project":{"description":"Azure DevOps project. Falls back to DEVOPS_PROJECT.","type":["string","null"],"default":null},"confirm":{"description":"false (default): preview only. true: create. Only after the user agreed.","type":"boolean","default":false}},"required":["planId","objects"]}},{"name":"ado_create_task","description":"WHEN: user asks to create a DevOps Task or start development on a Work Item. Triggers: 'create task', 'créer une tâche', 'start development on', 'commencer le dev sur', 'créer un task ADO', 'new development task for WI'. Create a D365 F&O development Task work item in Azure DevOps following the project naming convention. Rules applied automatically based on the parent work item: (A) Parent title starts with a project prefix + digits (FDD/RDD/IDD/CR/...) => Task named '{Prefix} - N - {Title}', Task is child of that WI, branch '{Prefix}_Task_{id}'. (B) Selected WI is related to a prefixed WI (e.g. a Bug linked to a CR) => Task is child of the prefixed WI, Bug is 'related' to the Task, same naming. (C) No prefixed relation => Task named '{3-letter-type}{wiId} - N - {Title}', child of selected WI, branch '{3-letter-type}{wiId}_Task_{id}'. The N counter increments automatically based on existing sibling tasks. A Git branch is created automatically in the repository. Assignee and CC list are embedded in the task description. LANGUAGE RULE: write the 'description' (Proposed Solution) in the same language the user used in their request. Default is English. If the user wrote in French, write the solution in French. Static section labels (headers, field names) remain in English. Requires DEVOPS_ORG_URL + DEVOPS_PAT (Work Items: Read & Write, Code: Read & Write).","write_action":true,"price_micros":0,"input_schema":{"type":"object","properties":{"workItemId":{"description":"ID of the selected Work Item (parent, bug, issue, etc.) to base the task on.","type":"integer"},"project":{"description":"Optional: Azure DevOps project name. Falls back to DEVOPS_PROJECT env var.","type":["string","null"],"default":null},"assignTo":{"description":"Optional: email address of the person to assign the task to, e.g. 'dev@company.com'.","type":["string","null"],"default":null},"notifyList":{"description":"Optional: comma-separated list of email addresses to notify (added to task description), e.g. 'lead@company.com,qa@company.com'.","type":["string","null"],"default":null},"repositoryId":{"description":"Optional: Git repository name to create the branch in. If omitted, uses the first repository found.","type":["string","null"],"default":null},"sourceBranch":{"description":"Optional: source branch to branch from (default: repo default branch, e.g. 'main').","type":["string","null"],"default":null},"areaPath":{"description":"Optional: area path for the new task, e.g. 'MyProject\\SER'. Inherits from parent if omitted.","type":["string","null"],"default":null},"iterationPath":{"description":"Optional: iteration path for the new task, e.g. 'MyProject\\Sprint 5'. Inherits from parent if omitted.","type":["string","null"],"default":null},"effortHours":{"description":"Optional: estimated effort in hours (Original Estimate).","type":["integer","null"],"default":null},"description":{"description":"Optional: additional description / acceptance criteria text to append to the task.","type":["string","null"],"default":null}},"required":["workItemId"]}},{"name":"ado_create_test_plan","description":"WHEN: the user wants the manual test cases of a feature (a User Story, Feature or Requirement work item) created in Azure DevOps Test Plans: a test plan, a suite tied to that work item, and one Test Case per scenario with its steps. Triggers: 'create the test plan for WI N', 'créer le plan de test', 'put these tests in Azure Test Plans', 'cas de test dans DevOps'. YOU write the test cases: read the work item (ado_analyze_workitem) and, when useful, the code, then pass them as testCasesJson, a JSON array [{\"title\":\"...\",\"priority\":1-4,\"tags\":[\"...\"],\"steps\":[{\"action\":\"...\",\"expected\":\"...\"}]}]. Each case needs a title and at least one step; every step needs an action, and an expected result for the steps that verify something. Without testCasesJson the tool falls back to one generic case per acceptance-criteria line, which is much weaker. SAFE BY DEFAULT: with confirm=false (default) nothing is written; it returns exactly what would be created and what already exists. Show that preview to the user, and only call again with confirm=true after they approved it. Test cases whose title already exists on the work item are skipped, so running it twice does not duplicate. Needs a PAT with Work Items (Read & write) and Test Management (Read & write); creating plans and suites also needs the Basic + Test Plans access level.","write_action":true,"price_micros":0,"input_schema":{"type":"object","properties":{"workItemId":{"description":"Work item the tests verify (User Story, Feature, Requirement...), e.g. 6587.","type":"integer"},"testCasesJson":{"description":"JSON array of test cases written from the acceptance criteria. Strongly recommended. See the tool description for the shape.","type":["string","null"],"default":null},"planName":{"description":"Name of the test plan. Default: 'Tests - WI {id} {title}'. An existing plan with this name is reused.","type":["string","null"],"default":null},"planId":{"description":"Use this existing test plan instead of looking one up by name.","type":["integer","null"],"default":null},"project":{"description":"Azure DevOps project. Falls back to DEVOPS_PROJECT.","type":["string","null"],"default":null},"confirm":{"description":"false (default): preview only, nothing is written. true: create. Only after the user approved the preview.","type":"boolean","default":false}},"required":["workItemId"]}},{"name":"ado_estimate_effort","description":"WHEN: user asks for an effort estimate, chiffrage, or development hours for a D365 Work Item. [~] PRIORITY TRIGGER: call AFTER `ado_analyze_workitem` when the user asks 'how long?', 'estimate this', 'chiffre ce WI'.\n\n[t] EFFORT ESTIMATOR -- Estimate D365 F&O development effort for a Work Item. Uses KB signals (object count, method complexity, existing extensions, relation depth) combined with ADO history (similar past tasks) to produce a structured hour estimate broken down by phase: Analysis / Dev / Test / Deploy.\n\nReturns:\n  * Per-phase hour breakdown (table)\n  * KB signals used (objects found, extensions, complexity flags)\n  * Confidence level and risk factors\n  * Ready-to-paste estimate for ADO task Original Estimate field\n\nTriggers: 'estimate WI #N', 'how long for WI #N', 'chiffrage WI #N', 'effort estimate', 'combien de jours pour', 'combien d\\'heures pour'.","write_action":false,"price_micros":0,"input_schema":{"type":"object","properties":{"workItemId":{"description":"Work Item ID to estimate, e.g. 6587.","type":"integer"},"project":{"description":"Optional: Azure DevOps project name. Falls back to DEVOPS_PROJECT env var.","type":["string","null"],"default":null},"focusObjects":{"description":"Optional: comma-separated D365 object names to force-include in analysis (speeds up estimation).","type":["string","null"],"default":null}},"required":["workItemId"]}},{"name":"ado_find_tests_for_objects","description":"WHEN: a change touched some D365 objects (a pull request, a hotfix) and you need the test cases to replay. Triggers: 'which tests cover SalesLine', 'quels tests rejouer', 'regression tests for PR N', 'couverture de test des objets'. Finds the Test Case work items tagged obj:<object> (the tag ado_create_test_plan adds from `objects`), per object, and lists the objects that no test case covers: those are coverage gaps, not proof that nothing can break. Only cases created with the obj: tags are found; older ones are not. Read only. At most 50 cases.","write_action":false,"price_micros":0,"input_schema":{"type":"object","properties":{"objects":{"description":"Comma-separated D365 objects, e.g. 'SalesLine, CustInvoiceJour'. Take them from the pull request or find_change_impact.","type":"string"},"project":{"description":"Azure DevOps project. Falls back to DEVOPS_PROJECT.","type":["string","null"],"default":null}},"required":["objects"]}},{"name":"ado_gap_fit_analysis","description":"WHEN: user asks whether a D365 requirement is standard, needs config, needs an extension, or is a full gap. Also triggered by gap analysis or fit/gap classification of a Work Item.\n\n GAP / FIT CLASSIFIER -- Analyse a D365 F&O requirement (from an ADO Work Item OR plain text) and classify it as one of four verdicts:\n  [OK] Standard Fit   -- D365 covers this out-of-the-box, no dev needed\n  [gear] Config Fit  -- D365 has it but requires parameter / profile setup\n   Extension Fit  -- Standard process exists; a CoC/event-handler is enough\n  [X] Gap            -- No standard coverage; custom development required\n\nFor each requirement block the tool returns:\n  -- Detected D365 domain (Settlement, PaymentJournal, DataImport, ...)\n  -- Standard objects found in KB and their process step\n  -- Existing extensions in the custom model (if D365_CUSTOM_MODEL_PATH is set)\n  -- Effort estimate (hours) and a one-paragraph reasoning\n\nTriggers: 'analyse the requirement', 'is this a gap or fit', 'gap analysis WI #N', 'standard or custom for WI #N', 'does D365 cover this'. [~] When a WI has already been analysed by `ado_analyze_workitem` in the same turn, pass the requirement text directly via `requirementText` -- do NOT re-fetch with `workItemId`.","write_action":false,"price_micros":0,"input_schema":{"type":"object","properties":{"workItemId":{"description":"Optional: Work Item ID to fetch the requirement from ADO (e.g. 6587). Leave empty to use requirementText.","type":["integer","null"],"default":null},"project":{"description":"Optional: Azure DevOps project name. Falls back to DEVOPS_PROJECT env var.","type":["string","null"],"default":null},"requirementText":{"description":"Optional: raw requirement text to analyse directly (when no WI ID is provided).","type":["string","null"],"default":null},"requirements":{"description":"Optional: comma-separated list of requirement sentences to analyse individually (overrides WI + requirementText).","type":["string","null"],"default":null}}}},{"name":"ado_list_prs","description":"[~] PRIORITY TRIGGER: Use this tool when user mentions 'PR', 'Pull Request', 'list PRs', 'show PRs', 'active PRs', 'mes PR', 'liste des PR', 'pull requests ouverts', 'what PRs are open', 'PRs by [author]', 'PRs targeting [branch]'. NEVER call search_d365_code for PR listing requests. List Pull Requests in an Azure DevOps Git repository. If `repositoryId` is unknown, omit it and all repositories will be listed first. Filters: status (Active/Completed/Abandoned/All), author display name, target branch. Returns: PR ID, title, author, source->target branch, review status, linked work items, creation date. Use `ado_analyze_pr_impact` with a PR ID to get full D365 code impact analysis. Requires DEVOPS_ORG_URL + DEVOPS_PAT (Code: Read scope).","write_action":false,"price_micros":0,"input_schema":{"type":"object","properties":{"repositoryId":{"description":"Git repository name or ID. If not known, leave empty to list all repos first.","type":["string","null"],"default":null},"project":{"description":"Optional: Azure DevOps project name. Falls back to DEVOPS_PROJECT env var.","type":["string","null"],"default":null},"status":{"description":"PR status filter: Active (default), Completed, Abandoned, All.","type":"string","default":"Active"},"author":{"description":"Optional: filter by author display name (partial match), e.g. 'Alim'.","type":["string","null"],"default":null},"targetBranch":{"description":"Optional: filter by target branch, e.g. 'main', 'develop'.","type":["string","null"],"default":null},"top":{"description":"Max results to return (1-100, default 25).","type":"integer","default":25}}}},{"name":"ado_post_comment","description":"WHEN: user explicitly asks to post, add, or save a comment to an ADO Work Item. [~] PRIORITY TRIGGER: call AFTER `ado_analyze_workitem` when user says 'post the analysis', 'save it to the ticket', 'ajoute en commentaire'.\nWARNING: ALWAYS ask for explicit user confirmation before calling this tool. Recommended workflow: (1) call `ado_analyze_workitem`, (2) show analysis to the user, (3) ask 'Shall I post this comment to Work Item #X?', (4) only then call this tool. Requires DEVOPS_ORG_URL + DEVOPS_PAT with Work Items: Write permission.","write_action":true,"price_micros":0,"input_schema":{"type":"object","properties":{"workItemId":{"description":"Work item ID (integer), e.g. 1234","type":"integer"},"commentText":{"description":"Markdown text to post. Use the ready-to-post block from `ado_analyze_workitem`.","type":"string"},"project":{"description":"Optional: Azure DevOps project name. Falls back to DEVOPS_PROJECT env var.","type":["string","null"],"default":null}},"required":["workItemId","commentText"]}},{"name":"ado_post_pr_comment","description":"WHEN: user explicitly asks to post, add, or save a review comment to an ADO Pull Request. [~] PRIORITY TRIGGER: call AFTER `ado_analyze_pr_impact` when user says 'post the review', 'add comment to PR', 'ajoute le commentaire sur la PR'.\nWARNING: ALWAYS ask for explicit user confirmation before calling this tool. Recommended workflow: (1) call `ado_analyze_pr_impact`, (2) show the result, (3) ask 'Shall I post this review comment to PR #X?', (4) only then call this tool. Requires DEVOPS_ORG_URL + DEVOPS_PAT (Pull Request Threads: Read & Write).","write_action":true,"price_micros":0,"input_schema":{"type":"object","properties":{"repositoryId":{"description":"Git repository name or ID.","type":"string"},"prId":{"description":"Pull Request ID (integer), e.g. 42.","type":"integer"},"commentText":{"description":"Markdown text to post. Use the ready-to-post block from `ado_analyze_pr_impact`.","type":"string"},"project":{"description":"Optional: Azure DevOps project name. Falls back to DEVOPS_PROJECT env var.","type":["string","null"],"default":null},"filePath":{"description":"Optional: file path for an inline comment. Leave empty for a top-level PR comment.","type":["string","null"],"default":null},"lineNumber":{"description":"Optional: line number for an inline comment (used with filePath).","type":["integer","null"],"default":null}},"required":["repositoryId","prId","commentText"]}},{"name":"ado_pr_dependency_map","description":"PR DEPENDENCY MAP -- Scan multiple Pull Requests and build a cross-PR dependency graph based on (a) shared X++/AOT objects and (b) branch chain relationships.\n\nFor each PR:\n  * Lists X++ / AOT objects changed (from diff)\n  * Detects OBJECT CONFLICTS: same object modified in multiple PRs => merge risk\n  * Detects BRANCH CHAIN: if PR_A.targetBranch == PR_B.sourceBranch => PR_A must merge first\n  * Computes RECOMMENDED MERGE ORDER (topological sort by branch dependencies)\n\nOutput:\n  * Per-PR object table\n  * Conflict matrix (object -> [PR list])\n  * Dependency graph summary\n  * Ordered merge sequence\n\nTriggers: 'PR dependencies', 'ordre de merge des PR', 'conflits entre PR', 'quelles PR touche le même objet', 'dependency map PRs', 'merge order PRs', 'list PRs with objects', 'objets par PR', 'cross-PR impact'. Requires DEVOPS_ORG_URL + DEVOPS_PAT (Code: Read scope).","write_action":false,"price_micros":0,"input_schema":{"type":"object","properties":{"repositoryId":{"description":"Git repository name or ID.","type":"string"},"project":{"description":"Optional: Azure DevOps project name. Falls back to DEVOPS_PROJECT env var.","type":["string","null"],"default":null},"status":{"description":"PR status filter: Active (default), Completed, Abandoned, All.","type":"string","default":"Active"},"targetBranch":{"description":"Optional: filter by target branch, e.g. 'develop'.","type":["string","null"],"default":null},"top":{"description":"Maximum PRs to analyse (default: 30, max: 60).","type":"integer","default":30}},"required":["repositoryId"]}},{"name":"ado_query_workitems","description":" AZURE DEVOPS ONLY -- Query Work Items (Bugs, Tasks, FDDs, User Stories, CRs) in Azure DevOps. [~] PRIORITY TRIGGER: use this tool when the user mentions 'FDD', 'RDD', 'IDD', 'CR', 'Task', 'Workitem', 'Work Item', 'Bug', 'User Story', 'Feature', 'Issue', 'ticket', 'sprint', 'backlog', 'DevOps', 'liste des tâches', 'show tasks', 'find bugs', '#1234', 'WI#'.  NEVER use this tool for: D365 labels (@SYS/@TRX), X++ code, AOT objects, tables, classes, forms, enums, error messages, 'c\\'est quoi le label', 'search_labels', 'libellé', 'label D365'. For labels -> use search_labels. For D365 code -> use search_d365_code or get_object_details. Shortcuts: 'bugs' (all active bugs), 'my bugs' (assigned to me), 'recent' (updated last 7 days), 'sprint' (current iteration). Or pass any WIQL SELECT statement or a free-text title search. Use '*' with filters only. Returns max 50 work items with ID, title, type, state, priority, area, assigned-to. Requires DEVOPS_ORG_URL + DEVOPS_PAT env vars.","write_action":false,"price_micros":0,"input_schema":{"type":"object","properties":{"query":{"description":"WIQL query, shortcut ('bugs', 'my bugs', 'recent', 'sprint'), title search, or '*' to use filters only.","type":"string"},"project":{"description":"Optional: Azure DevOps project name. Falls back to DEVOPS_PROJECT env var.","type":["string","null"],"default":null},"workItemType":{"description":"Optional: filter by work item type, e.g. 'Bug', 'Task', 'User Story', 'Feature'.","type":["string","null"],"default":null},"state":{"description":"Optional: filter by state, e.g. 'Active', 'New', 'Resolved', 'Closed'.","type":["string","null"],"default":null},"assignedTo":{"description":"Optional: filter by assignee display name or email (partial match), e.g. 'Alim' or 'alim@contoso.com'.","type":["string","null"],"default":null},"areaPath":{"description":"Optional: filter by area path (exact or under), e.g. 'MyProject\\SER'.","type":["string","null"],"default":null},"iterationPath":{"description":"Optional: filter by iteration/sprint path, e.g. 'MyProject\\Sprint 5'. Use 'current' for @CurrentIteration.","type":["string","null"],"default":null},"tag":{"description":"Optional: filter by tag (partial match), e.g. 'D365' or 'hotfix'.","type":["string","null"],"default":null},"priority":{"description":"Optional: filter by priority level: 1 (Critical), 2 (High), 3 (Medium), 4 (Low).","type":["integer","null"],"default":null},"changedSince":{"description":"Optional: only return items changed since this date, e.g. '2025-01-01' or '7' (days ago).","type":["string","null"],"default":null},"whereClause":{"description":"Optional: extra WHERE condition(s) for custom fields, appended with AND. Use the Field Reference Name, e.g. \"[Custom.Extensionlifecyclestatus]='010. Registered'\". Multiple conditions: separate with ' AND '.","type":["string","null"],"default":null}},"required":["query"]}},{"name":"ado_read_attachment","description":" AZURE DEVOPS ONLY -- Reads the ACTUAL CONTENT of a file attached to a work item (Excel spreadsheet, Word document, text/CSV/JSON/XML file, or image). WHEN: a work item (FDD/RDD/CR/Bug/Task/User Story) has an Excel/Word attachment with requirements, field mappings, mockups, or specs that need to be read to understand the ask. Triggers: 'read the attachment', 'open the excel file on the work item', 'what does the attached document say', 'lis le fichier joint', 'ouvre l'excel du ticket'. Call ado_analyze_workitem first (or ado_query_workitems) to discover attachment file names if you don't already know the exact fileName. Supported: .xlsx/.xlsm (returns sheet names + a markdown table of the requested/first sheet), .docx (returns extracted markdown text + tables), .txt/.csv/.json/.xml/.md/.log (returned as-is), images (.png/.jpg/.jpeg/.gif/.bmp/.webp, returned as a base64 data URI for visual analysis, max 4 MB). Other binary formats (PDF, .pptx, .zip, etc.) are NOT parsed -- returns metadata + a manual download link instead. Max attachment size read: 25 MB. Requires DEVOPS_ORG_URL + DEVOPS_PAT env vars.","write_action":false,"price_micros":0,"input_schema":{"type":"object","properties":{"workItemId":{"description":"Work item ID, e.g. 1234","type":"integer"},"fileName":{"description":"Exact attachment file name as shown by ado_analyze_workitem, e.g. 'Field Mapping.xlsx'. Case-insensitive.","type":"string"},"sheetName":{"description":"Optional: sheet name for .xlsx/.xlsm attachments. Defaults to the first sheet.","type":["string","null"],"default":null},"project":{"description":"Optional: Azure DevOps project name. Falls back to DEVOPS_PROJECT env var.","type":["string","null"],"default":null}},"required":["workItemId","fileName"]}},{"name":"ado_record_test_result","description":"WHEN: a manual test case of an Azure DevOps test plan has been run (by you through the ERP tools, or reported by the user) and its result must be recorded, so the plan shows what passed and what failed. Triggers: 'record the result', 'mark the test passed', 'enregistre le résultat du test', 'set the test outcome'. Needs the plan id and suite id (the ones ado_create_test_plan returned) and the test case id. outcome is Passed, Failed, Blocked or NotApplicable. Pass `evidence` (what was done and what was observed, no personal data): it is added as a comment on the test case, which is the audit trail. SAFE BY DEFAULT: confirm=false only shows what would be recorded. Call again with confirm=true after the user agreed. Never record Passed for something that was not verified. Needs a PAT with Test Management (Read & write) and Work Items (Read & write).","write_action":false,"price_micros":0,"input_schema":{"type":"object","properties":{"planId":{"description":"Test plan id.","type":"integer"},"suiteId":{"description":"Test suite id inside the plan.","type":"integer"},"testCaseId":{"description":"Id of the Test Case work item.","type":"integer"},"outcome":{"description":"Passed, Failed, Blocked or NotApplicable.","type":"string"},"evidence":{"description":"What was done and what was observed. Added as a comment on the test case.","type":["string","null"],"default":null},"project":{"description":"Azure DevOps project. Falls back to DEVOPS_PROJECT.","type":["string","null"],"default":null},"confirm":{"description":"false (default): preview only. true: record.","type":"boolean","default":false}},"required":["planId","suiteId","testCaseId","outcome"]}},{"name":"ado_review_xpp_pr","description":"WHEN: reviewing a PR that modifies X++ code or AOT objects and you need D365-specific insights. Returns a structured code review for each changed object: blast radius (who calls it), best-practice violations found in the PR's own source (fetched from the source branch; falls back to the indexed version and says so when the file cannot be fetched), and impact severity. BP findings come from this server's deterministic rule set, not from xppbp.exe -- a PR is uncompiled, so Microsoft's checker cannot run on it. Use find_error_patterns for Microsoft rule text. Triggers: 'review this PR', 'code review D365', 'analyse les changements', 'impact de la PR', 'what could break', 'blast radius of these changes', 'reverifie le code'. Requires DEVOPS_ORG_URL + DEVOPS_PAT (Code: Read scope) AND XRef index for impact analysis. Combine with ado_post_pr_comment to post findings as inline review comments.","write_action":false,"price_micros":0,"input_schema":{"type":"object","properties":{"prId":{"description":"Pull Request ID to review.","type":"integer"},"repositoryId":{"description":"Git repository name or ID.","type":["string","null"],"default":null},"project":{"description":"Azure DevOps project name. Falls back to DEVOPS_PROJECT env var.","type":["string","null"],"default":null},"maxDeepAnalysis":{"description":"Max AOT objects to deeply analyse (1-20, default 8). Objects beyond this limit are listed but not deeply analysed.","type":"integer","default":8}},"required":["prId"]}},{"name":"ado_test_status","description":"WHEN: the user asks whether a feature is tested and what the results are: 'is WI N tested', 'where are we on the tests', 'état des tests de la story', 'what failed'. Lists the test cases tied to a work item with their latest outcome in its test plan suite (Passed, Failed, Blocked, Not run) and a summary. Read only. Pass planId when you know it (ado_create_test_plan returns it); otherwise the plan named 'Tests - WI {id} ...' is looked for. A test case that is not in any suite of the plan shows as 'not in the plan'.","write_action":false,"price_micros":0,"input_schema":{"type":"object","properties":{"workItemId":{"description":"Work item the tests verify, e.g. 6587.","type":"integer"},"planId":{"description":"Optional: the test plan id.","type":["integer","null"],"default":null},"project":{"description":"Azure DevOps project. Falls back to DEVOPS_PROJECT.","type":["string","null"],"default":null}},"required":["workItemId"]}},{"name":"ado_update_workitem","description":"Update one or more fields on an existing Azure DevOps Work Item. Can update any standard field (System.Description, System.Title, System.State, System.AssignedTo, ...) or custom field (Custom.Extensionlifecyclestatus, ...) using its Field Reference Name. Triggers: 'mets à jour la description du workitem', 'change le state', 'update field', 'post ça en description'. Always show the user what will be changed and ask for confirmation before calling. Requires DEVOPS_PAT with Work Items: Write permission.","write_action":true,"price_micros":0,"input_schema":{"type":"object","properties":{"workItemId":{"description":"Work item ID to update.","type":"integer"},"fieldsJson":{"description":"JSON object mapping Field Reference Names to values. Examples: {\"System.Description\":\"<p>New desc</p>\"} or {\"System.State\":\"Active\",\"Custom.MyField\":\"value\"}. Use HTML for Description/ReproSteps. Standard field refs: System.Title, System.State, System.AssignedTo (email), System.AreaPath, System.Tags, System.Description, Microsoft.VSTS.Common.Priority, Microsoft.VSTS.TCM.ReproSteps.","type":"string"},"project":{"description":"Optional: Azure DevOps project name.","type":["string","null"],"default":null}},"required":["workItemId","fieldsJson"]}},{"name":"ado_wiki_create_or_update_page","description":"AZURE DEVOPS ONLY -- Create a new wiki page, or OVERWRITE an existing one with new markdown content. ALWAYS call ado_wiki_get_page first if you intend to edit (not replace) an existing page's content, since this tool replaces the ENTIRE page body -- it does not merge/append. Automatically handles the page's ETag for safe concurrent-edit detection. Requires DEVOPS_ORG_URL + DEVOPS_PAT env vars (PAT needs Wiki: Read & Write scope).","write_action":true,"price_micros":0,"input_schema":{"type":"object","properties":{"path":{"description":"Wiki page path, e.g. '/Home' or '/Architecture/Deployment'. Parent pages are created automatically if missing.","type":"string"},"content":{"description":"Full markdown content for the page (replaces any existing content).","type":"string"},"wikiIdentifier":{"description":"Wiki name or id. Omit to auto-resolve to the project's only/first wiki (call ado_wiki_list if there are several).","type":["string","null"],"default":null},"project":{"description":"Optional: Azure DevOps project name. Falls back to DEVOPS_PROJECT env var.","type":["string","null"],"default":null}},"required":["path","content"]}},{"name":"ado_wiki_delete_page","description":"AZURE DEVOPS ONLY -- Delete a wiki page. This also deletes its sub-pages if any exist under it. Requires DEVOPS_ORG_URL + DEVOPS_PAT env vars (PAT needs Wiki: Read & Write scope).","write_action":true,"price_micros":0,"input_schema":{"type":"object","properties":{"path":{"description":"Wiki page path to delete, e.g. '/Architecture/Old-Design'.","type":"string"},"wikiIdentifier":{"description":"Wiki name or id. Omit to auto-resolve to the project's only/first wiki (call ado_wiki_list if there are several).","type":["string","null"],"default":null},"project":{"description":"Optional: Azure DevOps project name. Falls back to DEVOPS_PROJECT env var.","type":["string","null"],"default":null}},"required":["path"]}},{"name":"ado_wiki_get_page","description":"AZURE DEVOPS ONLY -- Read the content of a wiki page (and its immediate sub-page paths). path uses wiki page-path syntax, e.g. '/Home' or '/Architecture/Deployment'. Requires DEVOPS_ORG_URL + DEVOPS_PAT env vars.","write_action":false,"price_micros":0,"input_schema":{"type":"object","properties":{"path":{"description":"Wiki page path, e.g. '/Home' or '/Architecture/Deployment'.","type":"string"},"wikiIdentifier":{"description":"Wiki name or id. Omit to auto-resolve to the project's only/first wiki (call ado_wiki_list if there are several).","type":["string","null"],"default":null},"includeSubPages":{"description":"Also list immediate sub-page paths under this page.","type":"boolean","default":false},"project":{"description":"Optional: Azure DevOps project name. Falls back to DEVOPS_PROJECT env var.","type":["string","null"],"default":null}},"required":["path"]}},{"name":"ado_wiki_list","description":"AZURE DEVOPS ONLY -- List all wikis in a project (the project wiki plus any published code-as-wiki repos). Use this FIRST when the user doesn't know the wiki's exact name/id, or to confirm which wiki to target before reading/writing a page. Requires DEVOPS_ORG_URL + DEVOPS_PAT env vars.","write_action":false,"price_micros":0,"input_schema":{"type":"object","properties":{"project":{"description":"Optional: Azure DevOps project name. Falls back to DEVOPS_PROJECT env var.","type":["string","null"],"default":null}}}},{"name":"analyze_upgrade_impact","description":"WHEN: upgrading D365 F&O to a new version or applying a Microsoft update -- check if your custom code will break. Triggers: 'upgrade D365', 'mise à niveau', 'will this break after upgrade', 'compatibilité après upgrade', 'impact de la mise à jour', 'check CoC targets after update'. Analyze upgrade risk for your custom D365 F&O model. Cross-references EVERY Chain of Command target, event handler hook, table/form/class extension, and hard-coded object reference in your custom model against the standard indexed codebase. Detects: removed objects, changed method signatures, deprecated APIs (RunBase, Dialog, WinAPI, COM), [Hookable(false)] and [Wrappable(false)] extensibility blocks, renamed fields, and internal methods. Returns a prioritized risk report with fix recommendations. Requires D365_CUSTOM_MODEL_PATH.","write_action":false,"price_micros":0,"input_schema":{"type":"object","properties":{}}},{"name":"appinsights_clear_connection","description":"Removes the Application Insights connection cached for the current session by appinsights_set_connection.","write_action":true,"price_micros":0,"input_schema":{"type":"object","properties":{}}},{"name":"appinsights_diagnose_slowness","description":"WHEN: user wants to understand/deduce why a D365 F&O environment feels slow, using the\nreal Application Insights telemetry the environment already emits -- no trace file\nupload needed. Runs a set of canned KQL queries and assembles one combined report:\n  1. X++ exception hotspots (exceptions table) -- top types/messages by count.\n  2. Hot custom telemetry events (customEvents table) -- top event names by frequency,\n     plus a duration breakdown for events that carry an ElapsedMilliseconds custom\n     property (covers ALMMonitoring-instrumented FDDs, and any out-of-box signal using\n     the same convention).\n  3. Slow web requests/dependencies (requests/dependencies tables) -- only rendered if\n     the workspace actually has data there (uncommon for FnO's own AOS tier, but present\n     for Commerce/Portal/custom web extensions sharing the same App Insights resource).\nRequires the connection to be configured first via appinsights_set_connection (or server\nenv vars).\n\nTriggers: 'déduire et comprendre les lenteurs', 'why is my environment slow', 'diagnose\nslowness from App Insights', 'analyse la lenteur avec App Insights', 'performance issue\nlive environment', 'slow environment telemetry'.","write_action":false,"price_micros":0,"input_schema":{"type":"object","properties":{"lookbackHours":{"description":"How far back to analyze, in hours (1-720). Default 24.","type":"integer","default":24},"minDurationMs":{"description":"Minimum average duration (ms) for a custom event to be flagged as 'slow'. Default 2000.","type":"integer","default":2000},"top":{"description":"Max rows per section (1-50). Default 15.","type":"integer","default":15}}}},{"name":"appinsights_query","description":"Run a raw KQL (Kusto) query against the D365FO environment's Application Insights /\nLog Analytics workspace (read-only -- the query language has no mutation operators).\nRequires the connection to be configured first via appinsights_set_connection (or server\nenv vars). Use the standard App Insights schema: requests, dependencies, exceptions,\ntraces, customEvents, pageViews, performanceCounters. Prefer appinsights_diagnose_slowness\nfor a ready-made \"why is it slow\" report -- use this tool for anything more specific/custom.\n\nTriggers: 'run this KQL', 'query app insights', 'requête KQL', 'log analytics query',\n'custom App Insights query for my environment'.","write_action":true,"price_micros":0,"input_schema":{"type":"object","properties":{"kql":{"description":"KQL query text, e.g. \"exceptions | where timestamp > ago(1h) | take 20\". Do NOT include an explicit 'ago()'/time-range filter for the primary time column -- use the lookbackHours parameter instead (applied as the query time range).","type":"string"},"lookbackHours":{"description":"How far back to query, in hours (1-720). Default 24.","type":"integer","default":24},"maxRows":{"description":"Max rows to return (1-500). Default 100.","type":"integer","default":100}},"required":["kql"]}},{"name":"appinsights_set_connection","description":"Securely register the D365 F&O environment's Application Insights / Log Analytics\nconnection for the CURRENT session. The client secret is encrypted in memory\n(AES-256-GCM), never written to disk and never echoed back. Once set, appinsights_query\nand appinsights_diagnose_slowness use it automatically until it expires or you call\nappinsights_clear_connection.\n\nHOW TO GET THE VALUES:\n  workspaceId  -- the Log Analytics WORKSPACE ID (GUID, not the App Insights app id) behind\n                  the Application Insights resource the environment is linked to (D365FO:\n                  System administration > Monitoring and Telemetry parameters > Application\n                  Insights Registry tab shows the connection string; the workspace id is on\n                  that Log Analytics workspace resource's Overview blade in the Azure Portal).\n  tenantId/clientId/clientSecret -- an Entra ID app registration granted the\n                  'Log Analytics Reader' (or 'Monitoring Reader') role on that workspace\n                  resource (Azure Portal > workspace > Access control (IAM) > Add role\n                  assignment). Read-only -- no write access is ever needed or used.\n\nIn a locked server deployment (APPINSIGHTS_LOCK_SERVER_CONFIG=true) this tool is disabled\nand the server's own environment credentials are used instead.","write_action":false,"price_micros":0,"input_schema":{"type":"object","properties":{"workspaceId":{"description":"Log Analytics workspace ID (GUID) behind the linked Application Insights resource.","type":"string"},"tenantId":{"description":"Entra (Azure AD) tenant id (GUID).","type":"string"},"clientId":{"description":"App registration (client) id (GUID), granted Log Analytics Reader on the workspace.","type":"string"},"clientSecret":{"description":"App registration client secret. Encrypted in memory; never logged or persisted.","type":"string"},"ttlMinutes":{"description":"Minutes the connection stays cached for this session (1-480). Default 60.","type":"integer","default":60}},"required":["workspaceId","tenantId","clientId","clientSecret"]}},{"name":"batch_search","description":"WHEN: you need context on multiple D365 objects or concepts simultaneously -- runs all queries in parallel. Use INSTEAD of multiple sequential search_d365_code calls -- each line becomes one parallel search. Maximum 6 queries per call. Results are equivalent to search_d365_code but returned together. When batch_search returns results, all matching objects are FULLY loaded (all chunks). Do NOT follow up with get_object_details on the same objects -- the complete source is already included.\n\nTriggers: 'find all of these', 'look up multiple', 'cherche plusieurs', 'SalesTable AND VendTable', 'several objects at once', 'lookup X and Y and Z', 'plusieurs objets en même temps', 'context on all of these'.","write_action":false,"price_micros":0,"input_schema":{"type":"object","properties":{"queries":{"description":"Newline-separated search queries (max 6). Example: \"SalesTable\\nVendTable\\nvendor invoice posting\"","type":"string"},"topK":{"description":"Results per query (default: 5, max: 15)","type":"integer","default":5},"topObjects":{"description":"Full-chunk objects per query (default: 3, max: 8)","type":"integer","default":3}},"required":["queries"]}},{"name":"compare_objects","description":"Compare two D365 F&O objects side-by-side (fields, methods, signatures). Handy when investigating differences between standard and a customisation, or between two similar tables.","write_action":false,"price_micros":0,"input_schema":{"type":"object","properties":{"objectNameA":{"description":"First object name, e.g. 'SalesTable'","type":"string"},"objectNameB":{"description":"Second object name, e.g. 'PurchTable'","type":"string"}},"required":["objectNameA","objectNameB"]}},{"name":"create_aot_object","description":"    Generate a complete, ready-to-deploy D365 F&O AOT XML scaffold for any object type.\n    Returns the XML + the correct file path inside the model -- the calling client (VS Extension,\n    Cursor, Copilot Chat) is responsible for writing the result to disk. This tool is fully\n    read-only on the server: it never writes to the filesystem, never mutates external state,\n    and is safe to expose from the cloud MCP.\n    When the knowledge base is available the scaffold is auto-enriched with real metadata\n    (existing field EDTs, related-table validation, auto-detected grid fields, etc.).\n\n      Supported aotType values ----------------------------------------------\n    AxTable       . AxClass     . AxForm       . AxEnum\n        AxEdt      . AxView            . AxQuery           . AxDataEntityView\n        AxMenuItemDisplay . AxMenuItemAction  . AxMenuItemOutput\n        AxSecurityPrivilege . AxSecurityDuty . AxSecurityRole . AxSecurityPolicy\n        AxReport          . AxFormExtension  . AxTableExtension  . AxClassExtension\n        AxEnumExtension   . AxEdtExtension   . AxQueryExtension  . AxWorkflow\n\n         Common options (all types) --------------------------------------------\n    label - human-readable label shown in the UI\ndeveloperDoc   - developer documentation string (tables/classes)\n\n         AxTable --------------------------------------------------------------------------\n        tableGroup     - Main | WorksheetHeader | WorksheetLine | Transaction | Parameter | Group\n        cacheLookup  - None | Found | FoundAndEmpty | NotInTTS | EntireTable\n      fields         - csv  \"Name:Type[:EDT[:Label[:mandatory]]]\"\n   Types: String Int Int64 Real Date DateTime Enum Container Guid\n        indexes     - csv  \"IndexName:field1+field2[:unique|:alternatekey]\"\n        relations      - csv  \"RelName:RelatedTable:Field:RelatedField\"\ntitleField1/2  - field names for the lookup title\n        createdBy / modifiedBy - true | false  (default true)\n        generateFind / generateExist / generateValidateWrite / generateInitValue - true | false\n\n  AxClass --------------------------------------------------------------------------\n      extends      - base class name\n    implements     - csv of interfaces\n        abstract / final - true | false\n        pattern     - SysOperation | RunBase | Service | EventHandler | none (default)\n    methods        - csv of additional method names to stub\n\n         AxForm ----------------------------------------------------------------------------\n        dataSourceTable - primary data-source table name\n        pattern  - SimpleList | DetailsTransaction | DetailsMaster | ListPage | Dialog\n        gridFields      - csv of field names for the grid (auto-detected from KB if omitted)\n        detailFields    - csv of field names for the detail group\n      methods      - csv of form method names to stub\n\n         AxEnum ----------------------------------------------------------------------------\n        style - Ordinary | ComboBox | Radio | CheckBox\n   values         - csv  \"Name[:Label[:intValue]]\"  e.g. \"Draft:Draft:0,Posted:Posted:1\"\n\n         AxEdt -----------------------------------------------------------------------------\n        extends        - base EDT (e.g. Name, Description, Amount)\n   stringSize     - integer\n     enumType       - base enum for enum EDTs\n        referenceTable - table that provides the lookup\n\n         AxView ----------------------------------------------------------------------------\n        dataSources    - csv  \"Table[:Alias]\"\n        fields    - csv  \"DataSource.Field[:Alias]\"\n\n         AxQuery -------------------------------------------------------------------------\n    dataSources    - csv  \"Table[:Alias[:JoinMode]]\"\n\n         AxDataEntityView -----------------------------------------------------------\n        primaryTable    - root table\n  joinTables          - csv of additional tables\n        publicEntityName    - OData collection name (pluralised entity name)\n      isPublic       - true | false  (default true)\n        fields            - csv  \"Table.Field[:PublicName]\"  (auto-detected from KB if omitted)\n\n         AxMenuItemDisplay / Action / Output ------------------------------------------\n        objectName     - target form / class / report name\n        runOn       - Server | Client | Called from  (default Server)\n   helpText       - tooltip string\n\n         AxSecurityPrivilege -----------------------------------------------------------\n        entryPoints    - csv  \"MenuItemName[:ObjectType[:Grant]]\"\n        ObjectType: MenuItemDisplay | MenuItemAction | MenuItemOutput\n Grant: NoAccess | Read | Update | Create | Delete\n\n   AxSecurityDuty ---------------------------------------------------------------------\n        privileges     - csv of privilege names to include\n\n   AxSecurityRole ----------------------------------------------------------------------\n        duties    - csv of duty names\n   privileges     - csv of privilege names (direct assignment -- avoid if possible)\n\n         AxReport -------------------------------------------------------------------------\n query- AxQuery name driving the dataset\n        dataSourceTable - alternative: direct table name (if no query)\n\n       AxFormExtension -----------------------------------------------------------------\n        baseForm   - name of the standard form to extend\n        fields  - csv  \"ControlName[:EDT]\"\n\n  AxTableExtension ---------------------------------------------------------------------\n        baseTable      - name of the standard table to extend\n        fields  - csv  \"Name:Type[:EDT[:Label[:mandatory]]]\"\n        indexes  - csv  \"IndexName:field1+field2[:unique|:alternatekey]\"\n\n   AxClassExtension  (Chain of Command) -------------------------------------------\n        baseClass      - name of the standard class/table/form to wrap\n        baseType       - class | table | form  (default class)\n        methods        - csv of method names to wrap with CoC\n\n         AxEnumExtension ---------------------------------------------------------------\n        baseEnum       - name of the standard enum to extend\n        values         - csv  \"Name[:Label[:intValue]]\"  IMPORTANT: start from value 10 or higher\n                         to avoid conflicts with standard values (D365 extension contract)\n\n         AxEdtExtension ----------------------------------------------------------------\n        baseEdt        - name of the standard EDT to extend\n        stringSize     - new StringSize (must be <= base EDT limit; omit to inherit)\n        label          - override label for this extension\n\n         AxQueryExtension --------------------------------------------------------------\n        baseQuery      - name of the standard query to extend\n        dataSources    - csv  \"Table[:Alias[:JoinMode]]\"  (add extra data sources)\n        ranges         - csv  \"DataSource.Field:value\"  (add filter ranges)\n\n         AxSecurityPolicy  (Row Level Security) ----------------------------------------\n        constrainedTable - primary table this policy restricts\n        query           - AxQuery name that defines the allowed rows\n        operation       - Select | Update | Create | Delete | Insert (default Select)\n        enabled         - true | false  (default true)\n\n         AxWorkflow ---------------------------------------------------------------------\n        category       - category name (links to a module/table)\n        documentTable  - table the workflow operates on\n        documentMenuItem - menu item that opens the record","write_action":true,"price_micros":0,"input_schema":{"type":"object","properties":{"aotType":{"description":"AOT type, e.g. 'AxTable', 'AxClass', 'AxForm', 'AxEnum', 'AxEdt', 'AxSecurityPrivilege', etc.","type":"string"},"name":{"description":"Object name -- must start with the ISV prefix, e.g. 'ALMMyTable', 'ABCSalesService'.","type":"string"},"options":{"description":"Key-value options dict. Provide only the keys relevant to your aotType.\nExample for AxTable:\n{\n  \"label\":      \"My Table\",\n  \"tableGroup\":     \"Main\",\n  \"fields\":         \"MyId:String:MyIdEdt:My ID:mandatory,Description:String::Description\",\n  \"indexes\":      \"MyIdIdx:MyId:alternatekey\",\n  \"relations\": \"CustTable:CustTable:CustAccount:AccountNum\",\n  \"titleField1\":    \"MyId\",\n  \"generateFind\":   \"true\",\n  \"generateExist\":  \"true\",\n  \"generateValidateWrite\": \"true\"\n}","type":["object","null"],"additionalProperties":{"type":["string","null"]},"default":null}},"required":["aotType","name"]}},{"name":"d365fo_clear_connection","description":"Removes the D365 F&O connection cached for the current session by d365fo_set_connection.","write_action":true,"price_micros":0,"input_schema":{"type":"object","properties":{}}},{"name":"d365fo_set_connection","description":"Securely register the D365 F&O connection (URL + Entra app-registration credentials)\nfor the CURRENT session. The client secret is encrypted in memory (AES-256-GCM),\nnever written to disk and never echoed back. Once set, all odata_* and dmf_* tools\nuse it automatically until it expires or you call d365fo_clear_connection.\n\nUse this instead of resending the secret on every call. In a locked server\ndeployment (D365FO_LOCK_SERVER_CONFIG=true) this tool is disabled and the server's\nown environment credentials are used instead.","write_action":false,"price_micros":0,"input_schema":{"type":"object","properties":{"baseUrl":{"description":"F&O environment base URL, e.g. https://yourenv.cloudax.dynamics.com (https only).","type":"string"},"tenantId":{"description":"Entra (Azure AD) tenant id (GUID).","type":"string"},"clientId":{"description":"App registration (client) id (GUID).","type":"string"},"clientSecret":{"description":"App registration client secret. Encrypted in memory; never logged or persisted.","type":"string"},"ttlMinutes":{"description":"Minutes the connection stays cached for this session (1-480). Default 60.","type":"integer","default":60}},"required":["baseUrl","tenantId","clientId","clientSecret"]}},{"name":"detect_performance_issues","description":"Profile an X++ object for N+1 queries, queries in loops, missing field lists, row-by-row inserts/updates, missing firstOnly. Returns compact issue table with line + fix. Only call when performance is explicitly the concern — for general quality use validate_best_practices. [!] Auto-fixing requires D365_CUSTOM_MODEL_PATH (custom code only).","write_action":false,"price_micros":0,"input_schema":{"type":"object","properties":{"objectName":{"description":"Object name to analyze, e.g. 'SalesTable', 'CustInvoiceJour'","type":"string"},"methodName":{"description":"Optional: specific method to analyze. Analyzes all methods if not provided.","type":["string","null"],"default":null}},"required":["objectName"]}},{"name":"diff_model_versions","description":"Compare two D365 F&O KB snapshots to produce a changelog (added/removed/modified objects). Use action 'save_baseline' once, then 'compare' between two snapshots.","write_action":false,"price_micros":0,"input_schema":{"type":"object","properties":{"action":{"description":"Action: 'compare' (current vs baseline), 'compare_caches' (two cache files), or 'save_baseline' (save current state)","type":"string"},"path1":{"description":"For 'compare': path to baseline cache file. For 'compare_caches': path to first cache. For 'save_baseline': output path for the baseline file.","type":"string"},"path2OrLabel":{"description":"Optional: For 'compare_caches': path to second cache file. For 'compare'/'save_baseline': label for the baseline.","type":["string","null"],"default":null},"filterModel":{"description":"Optional: filter to a specific model name","type":["string","null"],"default":null}},"required":["action","path1"]}},{"name":"dmf","description":"Consolidated Data Management Framework tool — one entry point for all 5 DMF operations,\nselected via `action`. Each action forwards to the exact same implementation as its\ndedicated tool (dmf_import_file / dmf_create_data_project / dmf_apply_entity_filter /\ndmf_export_package / dmf_get_job_status) — identical behavior and validation, just one\ntool schema instead of five. The dedicated tools remain available unchanged.\n\naction=\"import\" (= dmf_import_file): entityName, legalEntity, filePath OR csvContent,\n  definitionGroupId?, execute?, overwrite?, pollTimeoutSeconds?\naction=\"create_project\" (= dmf_create_data_project): projectName, entities, sourceName,\n  operationType? ('Export' default or 'Import')\naction=\"apply_filter\" (= dmf_apply_entity_filter): projectName, entityRowName,\n  aotEntityName, fieldName, filterValue\naction=\"export\" (= dmf_export_package): definitionGroupId, legalEntity, packageName?,\n  reExecute?, pollTimeoutSeconds?\naction=\"status\" (= dmf_get_job_status): executionId","write_action":false,"price_micros":0,"input_schema":{"type":"object","properties":{"action":{"description":"import | create_project | apply_filter | export | status","type":"string"},"entityName":{"description":"import: target DMF entity name, e.g. 'Customers V3'.","type":["string","null"],"default":null},"legalEntity":{"description":"import/export: legal entity / company id, e.g. 'USMF'.","type":["string","null"],"default":null},"filePath":{"description":"import: path to a .csv file on disk (or use csvContent).","type":["string","null"],"default":null},"csvContent":{"description":"import: inline CSV content (or use filePath).","type":["string","null"],"default":null},"definitionGroupId":{"description":"import/export: definitionGroupId (DMF project id).","type":["string","null"],"default":null},"execute":{"description":"import: execute after staging. Default true.","type":"boolean","default":true},"overwrite":{"description":"import: overwrite existing project definition. Default true.","type":"boolean","default":true},"pollTimeoutSeconds":{"description":"import/export: max seconds to poll for completion. Default 300.","type":"integer","default":300},"projectName":{"description":"create_project/apply_filter: DMF project name.","type":["string","null"],"default":null},"entities":{"description":"create_project: comma-separated DMF entity names.","type":["string","null"],"default":null},"sourceName":{"description":"create_project: existing DMF source data format name.","type":["string","null"],"default":null},"operationType":{"description":"create_project: 'Export' (default) or 'Import'.","type":["string","null"],"default":null},"entityRowName":{"description":"apply_filter: entity row label, e.g. 'Vendors V2'.","type":["string","null"],"default":null},"aotEntityName":{"description":"apply_filter: AOT entity name, e.g. 'VendVendorV2Entity'.","type":["string","null"],"default":null},"fieldName":{"description":"apply_filter: field to filter on, e.g. 'VendorAccountNumber'.","type":["string","null"],"default":null},"filterValue":{"description":"apply_filter: value or wildcard to match.","type":["string","null"],"default":null},"packageName":{"description":"export: optional package name.","type":["string","null"],"default":null},"reExecute":{"description":"export: re-execute the project. Default true.","type":"boolean","default":true},"executionId":{"description":"status: the executionId returned by an import or export action.","type":["string","null"],"default":null}},"required":["action"]}},{"name":"dmf_apply_entity_filter","description":"Apply a single-field value filter to ONE entity row of an existing DMF project, so the\nexport only contains the matching records. The kernel builds the packed query (custom\n'GenerateQueryData' action), the container envelope is stripped on the QueryRun.pack()\nsignature, and the inner blob is PATCHed onto DataManagementDefinitionGroupDetails.QueryData\n(the exact format the standard table DMFDefinitionGroupEntity stores). Works for ANY entity\nand ANY field, but only a single field = single value per call (call once per entity row).\nWildcards are passed through (e.g. value '1001*'). NOTE: filtering a parent (e.g. 'Vendors\nV2' on VendorAccountNumber) does NOT auto-filter child rows -- apply the same filter to\nrelated rows (e.g. 'Vendor bank accounts', 'Vendor postal addresses') for a single-record\nexport. Requires the custom 'GenerateQueryData' action in the environment.","write_action":false,"price_micros":0,"input_schema":{"type":"object","properties":{"projectName":{"description":"Existing DMF project (definitionGroupId) in FO.","type":"string"},"entityRowName":{"description":"Entity row label as shown on the project line, e.g. 'Vendors V2'.","type":"string"},"aotEntityName":{"description":"AOT entity name the kernel resolves, e.g. 'VendVendorV2Entity'.","type":"string"},"fieldName":{"description":"Entity field to filter on, e.g. 'VendorAccountNumber'.","type":"string"},"filterValue":{"description":"Value or wildcard to match, e.g. '1001' or '1001*'.","type":"string"}},"required":["projectName","entityRowName","aotEntityName","fieldName","filterValue"]}},{"name":"dmf_create_data_project","description":"Create (or extend) a DMF data project -- EXPORT or IMPORT -- entirely through standard\npublic OData entities, with NO X++ customization required. It POSTs the header to\nDataManagementDefinitionGroups and one row per entity to DataManagementDefinitionGroupDetails\nwith AutoGenerateMapping=Yes, so FO generates each entity's source<->staging mapping\nautomatically. Idempotent: an existing project is reused and entities already present are\nskipped. For EXPORT, the project can then be run with dmf_export_package. Provide an EXISTING\nDMF 'source data format' name for sourceName (e.g. a comma-delimited format).","write_action":true,"price_micros":0,"input_schema":{"type":"object","properties":{"projectName":{"description":"Name of the data project (definitionGroupId) to create or extend.","type":"string"},"entities":{"description":"Comma-separated DMF entity names, e.g. 'Customers V3,Released products V2'.","type":"string"},"sourceName":{"description":"Existing DMF source data format name that defines the file format.","type":"string"},"operationType":{"description":"Operation type: 'Export' (default) or 'Import'.","type":"string","default":"Export"}},"required":["projectName","entities","sourceName"]}},{"name":"dmf_export_package","description":"Trigger a bulk export through the Data Management package REST API and return\nthe download URL when complete. NOTE: the DMF EXPORT project (definitionGroupId)\nmust already exist in FO with its entities + mapping configured -- create it with\ndmf_create_data_project if needed. For ad-hoc exports without a project, use\nodata_export_entity instead.","write_action":false,"price_micros":0,"input_schema":{"type":"object","properties":{"definitionGroupId":{"description":"Existing DMF export project (definitionGroupId) in FO.","type":"string"},"legalEntity":{"description":"Legal entity / company id to export from, e.g. 'USMF'.","type":"string"},"packageName":{"description":"Optional package name. Default derived from the project id.","type":["string","null"],"default":null},"reExecute":{"description":"Re-execute the project (true) or reuse last staging (false). Default true.","type":"boolean","default":true},"pollTimeoutSeconds":{"description":"Max seconds to poll for completion. Default 300.","type":"integer","default":300}},"required":["definitionGroupId","legalEntity"]}},{"name":"dmf_get_job_status","description":"Poll the status of a DMF import/export execution by its executionId\n(e.g. NotRun, Executing, Succeeded, PartiallySucceeded, Failed). For a\ncompleted export, also returns the download URL.","write_action":false,"price_micros":0,"input_schema":{"type":"object","properties":{"executionId":{"description":"The executionId returned by dmf_import_file or dmf_export_package.","type":"string"}},"required":["executionId"]}},{"name":"dmf_import_file","description":"Bulk-import a CSV file into a D365 F&O entity through the Data Management\npackage REST API. Builds the package (Manifest + header + CSV) in memory,\nuploads it to Azure blob, then calls ImportFromPackage which AUTO-CREATES the\ndata project from the manifest. Runs in batch; the tool polls until completion\nand returns the final status plus an error-keys file URL when rows fail.\nProvide either filePath (a .csv on disk) or inline csvContent. Resolve the\nentity name from the KB (find_entity_for_table) -- do not invent it.","write_action":false,"price_micros":0,"input_schema":{"type":"object","properties":{"entityName":{"description":"Target entity name as known to DMF (the entity, not the OData set), e.g. 'Customers V3'.","type":"string"},"legalEntity":{"description":"Legal entity / company id to import into, e.g. 'USMF'.","type":"string"},"filePath":{"description":"Path to a .csv file on disk. Provide this OR csvContent.","type":["string","null"],"default":null},"csvContent":{"description":"Inline CSV content (header row + data). Provide this OR filePath.","type":["string","null"],"default":null},"definitionGroupId":{"description":"DMF definition group (data project) id. Default: auto-generated from entity + timestamp.","type":["string","null"],"default":null},"execute":{"description":"Execute the import after staging (true) or stage only (false). Default true.","type":"boolean","default":true},"overwrite":{"description":"Overwrite an existing project definition with the same id. Default true.","type":"boolean","default":true},"pollTimeoutSeconds":{"description":"Max seconds to poll for completion before returning the executionId. Default 300.","type":"integer","default":300}},"required":["entityName","legalEntity"]}},{"name":"dmf_transform_excel","description":"Transform a multi-sheet Excel (.xlsx) into DMF-ready rows using a data-driven JSON\nmapping -- equivalent to FO_TransformExcelForDMF. NO FO credentials required (offline\ntransform). Provide the workbook via ONE of: sourceUrl (Blob/SharePoint SAS URL or\nGraph downloadUrl), filePath (local .xlsx) or fileContentBase64 (inline upload, small\nfiles only). The mappingJson spec supports: sourceSheet, targetSheet, columnMappings\n{source->target}, conditionalValues [{sourceColumn,matches[],values{}}], staticValues{},\ndeduplicateOn[] and autoGeneratedFields (array OR object keyed by sheet, e.g.\n{\"Products V2\":[\"PRODUCTNUMBER\"]}) which are removed so FO generates them.\nReturns CSV (default, feed to dmf_import_file) or JSON (feed to odata_upsert_rows).\nSet listSheetsOnly=true to just inspect the workbook's sheet names.","write_action":false,"price_micros":0,"input_schema":{"type":"object","properties":{"mappingJson":{"description":"Mapping spec JSON (columnMappings, conditionalValues, staticValues, deduplicateOn, autoGeneratedFields, sourceSheet). Optional when listSheetsOnly=true.","type":["string","null"],"default":null},"sourceUrl":{"description":"URL to the .xlsx (Blob/SharePoint SAS or Graph downloadUrl). Provide one of sourceUrl/filePath/fileContentBase64.","type":["string","null"],"default":null},"filePath":{"description":"Local path to a .xlsx file. Provide one of sourceUrl/filePath/fileContentBase64.","type":["string","null"],"default":null},"fileContentBase64":{"description":"Base64-encoded .xlsx content (inline upload, small files). Provide one of sourceUrl/filePath/fileContentBase64.","type":["string","null"],"default":null},"sheetName":{"description":"Override the source sheet name. Empty = use mappingJson.sourceSheet, else the first sheet.","type":["string","null"],"default":null},"format":{"description":"Output format: 'csv' (default) or 'json'.","type":"string","default":"csv"},"outputPath":{"description":"Optional file path to also write the full transformed result to.","type":["string","null"],"default":null},"listSheetsOnly":{"description":"If true, only list the workbook's sheet names (diagnostic). mappingJson not required.","type":"boolean","default":false}}}},{"name":"erp_call","description":"WHEN: to run one ERP MCP tool on ONE Dynamics 365 F&O instance, as the signed-in user (their own F&O roles and legal entities apply). Get the tool name and argument schema from erp_list_tools first. On protected instances (PROD) any tool that is not flagged read-only needs confirm=true, and you must only set it after the user explicitly approved the exact action. On a readOnly instance every tool that can change data is refused and confirm does not override it. To compare two instances, call erp_call once per instance with the same read-only tool and diff the results.","write_action":false,"price_micros":0,"input_schema":{"type":"object","properties":{"instance":{"description":"Instance alias from erp_list_instances.","type":"string"},"tool":{"description":"Exact tool name from erp_list_tools.","type":"string"},"arguments":{"description":"JSON object with the tool arguments, as a string. Omit or \"{}\" when none.","type":["string","null"],"default":null},"confirm":{"description":"Required true to run a non read-only tool on a protected instance.","type":"boolean","default":false}},"required":["instance","tool"]}},{"name":"erp_call_session","description":"WHEN: to run several ERP tools in ONE ERP session, in order, when the steps depend on each other: open a form, click New, set field values, save, close. Each separate erp_call starts a new ERP session, so a form opened by one call is gone at the next; this tool keeps them together. The user's own F&O roles apply; a read-only instance refuses every step that could change data. ON EVERY INSTANCE, steps that can change data run only with confirm=true: without it nothing runs and you get the exact steps back, to show to the user. Set confirm=true only after the user agreed to those exact steps. All steps are checked BEFORE the first one runs, and the run stops at the first step that fails, so nothing is written after a failure. stepsJson: [{\"tool\":\"form_open_menu_item\",\"arguments\":{...}}, ...], at most 15 steps. Close the forms you open.","write_action":false,"price_micros":0,"input_schema":{"type":"object","properties":{"instance":{"description":"Instance alias from erp_list_instances.","type":"string"},"stepsJson":{"description":"JSON array of steps: [{\"tool\":\"<name from erp_list_tools>\",\"arguments\":{...}}].","type":"string"},"confirm":{"description":"Required true to run steps that can change data, on any instance, and only after the user agreed to those exact steps.","type":"boolean","default":false}},"required":["instance","stepsJson"]}},{"name":"erp_list_instances","description":"WHEN: first step whenever the user wants to read from or act on a Dynamics 365 F&O (ERP) environment through this server. Lists the F&O instances you may use (alias, label, whether it is protected like PROD, whether it is readOnly, and whether the user has already connected it). Use the alias as the 'instance' argument of erp_list_tools and erp_call. If connected=false, tell the user to open the connectUrl in a browser, then retry.","write_action":false,"price_micros":0,"input_schema":{"type":"object","properties":{}}},{"name":"erp_list_tools","description":"WHEN: after erp_list_instances, to discover which tools the ERP MCP server of ONE instance exposes (name, description, input schema, read-only hint) before calling erp_call. Results are cached for 5 minutes.","write_action":false,"price_micros":0,"input_schema":{"type":"object","properties":{"instance":{"description":"Instance alias from erp_list_instances, e.g. \"uat\".","type":"string"}},"required":["instance"]}},{"name":"erp_read","description":"WHEN: to READ from ONE Dynamics 365 F&O instance, as the signed-in user (their own F&O roles and legal entities apply): look up entities, query data, open a form to read it. Same arguments as erp_call, but it refuses every tool that could change data, on every instance, so it never needs the user's approval. Get the tool name and argument schema from erp_list_tools first. Use erp_call only for a change the user asked for.","write_action":false,"price_micros":0,"input_schema":{"type":"object","properties":{"instance":{"description":"Instance alias from erp_list_instances.","type":"string"},"tool":{"description":"Exact tool name from erp_list_tools.","type":"string"},"arguments":{"description":"JSON object with the tool arguments, as a string. Omit or \"{}\" when none.","type":["string","null"],"default":null}},"required":["instance","tool"]}},{"name":"erp_read_session","description":"WHEN: to READ from the ERP through form tools, where several calls must share ONE ERP session: open a form, filter its grid, read its values. Each separate erp_read / erp_call starts a new ERP session, so a form opened by one call is gone at the next; this tool runs the steps in order in a single session. Every step must be a read-only tool (opening, filtering, selecting, reading); it refuses the whole call, before running anything, if one step could change data. It stops at the first step that fails. stepsJson: [{\"tool\":\"form_open_menu_item\",\"arguments\":{...}}, ...], at most 15 steps. Close the forms you open as the last step.","write_action":false,"price_micros":0,"input_schema":{"type":"object","properties":{"instance":{"description":"Instance alias from erp_list_instances.","type":"string"},"stepsJson":{"description":"JSON array of steps: [{\"tool\":\"<name from erp_list_tools>\",\"arguments\":{...}}].","type":"string"}},"required":["instance","stepsJson"]}},{"name":"explain_workflow","description":"WHEN: user asks how an approval workflow works, who approves a document, what states it goes through, or what happens on submission/rejection. NOT for technical workflow class details -- use `get_object_details`.\n\n WORKFLOW EXPLAINER (Business Language) -- Explains a D365 approval workflow: who approves, what states exist, and what happens on approval or rejection. Output is plain business language -- no X++ or workflow engine jargon.\n\nTriggers: 'explain the workflow for', 'how does the approval work', 'qui approuve', 'workflow states for', 'étapes du workflow', 'approval process for', 'circuit d\\'approbation', 'what happens when a user submits'.","write_action":false,"price_micros":0,"input_schema":{"type":"object","properties":{"objectName":{"description":"D365 object or workflow name, e.g. 'SalesTable', 'PurchTable', 'ALMDemandeAchatWorkflow'","type":"string"}},"required":["objectName"]}},{"name":"federated_search","description":"Fan-out search across multiple ALM XPP MCP server instances in parallel and merge results using Reciprocal Rank Fusion (RRF). Useful when D365 code is split across multiple organisations or knowledge bases (e.g. one per client, one standard KB). Peer servers are configured via D365_FEDERATION_PEERS env var (comma-separated list of base URLs, e.g. https://org2.almxpp.com). The local server is always included as the primary source.","write_action":false,"price_micros":0,"input_schema":{"type":"object","properties":{"query":{"description":"Natural language search query","type":"string"},"topK":{"description":"Number of results to return per server (default 5)","type":"integer","default":5},"peerApiKeys":{"description":"Optional MCP API keys for peer servers, comma-separated (same order as D365_FEDERATION_PEERS)","type":["string","null"],"default":null}},"required":["query"]}},{"name":"find_callers","description":"Full cross-reference profile for a class or method: callers, callees, inheritance chain, interface implementations, overrides, attributes. Requires xref_index.json.gz (generated from DYNAMICSXREFDB via GenerateCache --xref-conn). Falls back to vector-search when XRef not loaded.","write_action":false,"price_micros":0,"input_schema":{"type":"object","properties":{"methodKey":{"description":"Object or method key. Format: 'ClassName.methodName' for methods, 'ClassName' for class-level queries.","type":"string"},"maxResults":{"description":"Maximum results per category (default: 20, max: 50)","type":"integer","default":20},"depth":{"description":"Depth of caller chain to trace upward (default: 2, max: 4)","type":"integer","default":2},"categories":{"description":"Categories to include: 'all' (default), or comma-separated subset: 'calls,inheritance,usage,interfaces,overrides,attributes'","type":"string","default":"all"}},"required":["methodKey"]}},{"name":"find_change_impact","description":"WHEN: about to modify an X++ object or method and need to understand what could break. Returns a blast-radius report: direct callers, transitive dependents (BFS up to 3 hops), custom model extensions, interface propagation, and severity classification (Critical/High/Medium/Low). Requires the XRef index (loaded from xref_index.json.gz). Triggers: 'what breaks if I change X', 'impact of modifying SalesLine', 'blast radius', 'refactoring risk', 'quel impact si je modifie', 'qu\\'est-ce qui dépend de'. Pass objectName='SalesLine' for table/class-level impact, or objectName='SalesLine.insert' for method-level impact. Combine with validate_best_practices / detect_performance_issues to get both impact AND current code quality before committing a change.","write_action":false,"price_micros":0,"input_schema":{"type":"object","properties":{"objectName":{"description":"Object or method to analyse, e.g. 'SalesLine' or 'SalesLine.insert'.","type":"string"},"maxDepth":{"description":"Max BFS depth (1-5). Default 3.","type":"integer","default":3}},"required":["objectName"]}},{"name":"find_entity_for_table","description":"WHEN: developer needs to integrate via OData and wants to find the entity name for a given table. Also generates a new entity template when none exists and generateIfMissing=true. Triggers: 'which entity exposes', 'OData entity for', 'find entity for', 'quelle entité expose', 'DMF entity for', 'create data entity', 'expose via OData', 'generate entity', 'entité de données'. Find D365 F&O data entities that expose a given table for OData/DMF integrations. Answers: 'Which entity exposes SalesTable for OData?' Scans all indexed AxDataEntityView objects to find entities with matching data sources. Returns entity name, public entity name (for OData URL), IsPublic status, key fields, and all data sources. Essential for integration development. Set generateIfMissing=true to auto-generate an AxDataEntityView XML template when no public entity is found.","write_action":false,"price_micros":0,"input_schema":{"type":"object","properties":{"tableName":{"description":"Table name to find entities for, e.g. 'SalesTable', 'CustTable', 'VendInvoiceJour'","type":"string"},"maxResults":{"description":"Maximum results (default: 15, max: 30)","type":"integer","default":15},"generateIfMissing":{"description":"When true and no public entity is found, generates a new AxDataEntityView XML template for the table. Default: false.","type":"boolean","default":false}},"required":["tableName"]}},{"name":"find_error_patterns","description":"WHEN: a user encounters an error message, infolog error, or runtime exception in D365. Also handles business-language error explanation when audienceType='business'. Triggers (developer): 'fix this error', 'what causes', 'exception thrown', 'infolog error', 'update conflict', 'outside tts', 'number sequence'. Triggers (business): 'what does this error mean', 'explain this error to me', 'user gets error X', 'que signifie cette erreur', 'message d\\'erreur', 'what should the user do when they see this error'. Find known D365 F&O error patterns matching an error message or symptoms description. Matches against a built-in database of common errors (transaction conflicts, security issues, number sequences, posting errors, batch problems, etc.), resolves D365 label IDs from error text (e.g. user sees 'Number sequence not set up' -> finds @SYS70535 -> finds the throwing code), and searches the indexed codebase. Returns root causes, step-by-step resolution, label matches, and source code locations. [~] When the error text contains a D365 label ID (e.g. '@SYS12345'), call `search_labels` first to resolve the label text, then call this tool with the resolved text. [~] Also explains a Microsoft best-practice moniker: pass 'BPErrorFieldCurrencyDateTableEmpty' (or a symptom like 'strong name') to get the rule text from Microsoft's own catalogue, read out of the indexed D365 build. That is the rule TEXT -- `run_best_practices_check_scoped` is what decides whether an object breaks it. Set audienceType='business' for a plain-language explanation targeted at end users instead of developers.","write_action":false,"price_micros":0,"input_schema":{"type":"object","properties":{"errorOrSymptom":{"description":"Error message text or symptom description, e.g. 'update conflict', 'number sequence not set up', 'cannot create record outside tts'","type":"string"},"audienceType":{"description":"Audience type: 'developer' (default) for root-cause analysis, or 'business' for a plain-language explanation targeted at end users.","type":"string","default":"developer"}},"required":["errorOrSymptom"]}},{"name":"find_event_handlers","description":"Find all event handlers that subscribe to events on a D365 table or class. Searches the knowledge base for [SubscribesTo(classStr(objectName), ...)] / [SubscribesTo(tableStr(objectName), ...)] attribute patterns. Use eventName to narrow results to a specific event (e.g. 'OnInserted'). WHEN: 'who handles X', 'what subscribes to Y', 'event handlers for Z', 'qui écoute l'événement', 'abonnés à l'événement', 'SubscribesTo', 'data events for'.","write_action":false,"price_micros":0,"input_schema":{"type":"object","properties":{"objectName":{"description":"Table or class name to find event handlers for, e.g. 'SalesTable', 'PurchTable'.","type":"string"},"eventName":{"description":"Optional: filter to a specific event name, e.g. 'OnInserted', 'OnUpdated', 'OnDeleted', 'OnValidatingWrite'.","type":["string","null"],"default":null},"handlerType":{"description":"Optional: filter by handler type — 'DataEventHandler' or 'PrePostEventHandler'.","type":["string","null"],"default":null}},"required":["objectName"]}},{"name":"find_extensions","description":"Find all extension objects (AxClassExtension, AxTableExtension, AxFormExtension, AxEnumExtension), CoC classes ([ExtensionOf]), and event handlers for a base object. Also queries Azure DevOps Code Search in real-time for custom extensions not yet in the KB. ALWAYS call before creating a new extension — avoid parallel customizations.","write_action":false,"price_micros":0,"input_schema":{"type":"object","properties":{"baseObjectName":{"description":"The base object name, e.g. 'SalesTable', 'SalesFormLetter', 'VendTable'","type":"string"}},"required":["baseObjectName"]}},{"name":"find_references","description":"Full index scan for all usages of an object, method, field, or label ID. Use for impact analysis before changing or deleting an object. EXPENSIVE — O(1M+ chunks). Prefer find_callers when XRef index is loaded (O(1)). Label IDs: automatically searches both `@SYS124480` and `@SYS:124480` forms. NOT for extensions only — use find_extensions for CoC/event handlers.","write_action":false,"price_micros":0,"input_schema":{"type":"object","properties":{"name":{"description":"The object or method name to find references to, e.g. 'SalesTable', 'validateWrite'","type":"string"},"maxResults":{"description":"Maximum referencing objects to return (default: 500, max: 2000)","type":"integer","default":500},"locationsPerObject":{"description":"Maximum number of call sites (methods/fields) to display per referencing object (default: 6, max: 20). Increase to see more usage locations.","type":"integer","default":6}},"required":["name"]}},{"name":"find_related_objects","description":"Returns ALL FK/DeleteAction/DataSource relations (outgoing) AND back-references (incoming). Call BEFORE generating multi-object code to understand the full dependency graph. When the relation index is loaded, delegates to get_relation_graph (O(1)) internally — do NOT call both tools for the same object.","write_action":false,"price_micros":0,"input_schema":{"type":"object","properties":{"objectName":{"description":"The object name to find relationships for, e.g. 'SalesTable', 'VendInvoiceJour'","type":"string"}},"required":["objectName"]}},{"name":"find_relation_path","description":"WHEN: you need to know HOW two AOT objects are connected -- the chain of relations linking them. Triggers: 'how is X related to Y', 'comment X est lié à Y', 'path between', 'chemin entre', 'lien entre deux tables', 'connection between', 'is X reachable from Y'. Walks the pre-computed relation graph (FK, DeleteAction, DataSource, Extension, Security edges -- both directions) and returns the SHORTEST navigation path(s) as a chain of object names + edge kinds. Token-light: returns ONLY names and relation kinds, never full object source. O(1)-per-node BFS, no vector scan. Use `get_relation_graph` for the full neighbourhood of a single object; use this to traverse multiple hops between two known objects.","write_action":false,"price_micros":0,"input_schema":{"type":"object","properties":{"source":{"description":"Start object name, e.g. 'SalesTable'","type":"string"},"target":{"description":"Destination object name, e.g. 'CustTable'","type":"string"},"maxDepth":{"description":"Maximum hops to traverse (default: 4, max: 8). Higher = slower, more paths.","type":"integer","default":4},"maxPaths":{"description":"Maximum number of distinct paths to return (default: 5, max: 20).","type":"integer","default":5}},"required":["source","target"]}},{"name":"find_similar_implementations","description":"Find D365 objects structurally similar to the one you supply (same kind, similar method set, similar field set). Useful when you need a working reference implementation to copy from.","write_action":false,"price_micros":0,"input_schema":{"type":"object","properties":{"objectName":{"description":"Object name to find similar objects for, e.g. 'ALMERSftpConnectionTable', 'SalesTable'","type":"string"},"maxResults":{"description":"Maximum results (default: 15, max: 30)","type":"integer","default":15},"filterAotType":{"description":"Optional: filter to a specific AOT type, e.g. 'AxTable', 'AxClass'. If not set, uses the same type as the source object.","type":["string","null"],"default":null}},"required":["objectName"]}},{"name":"fix_best_practice_violations","description":"WHEN: validate_best_practices returned violations and you want concrete X++ fix suggestions. Returns each BP violation with its built-in fix suggestion AND (when Ollama is available) an AI-generated X++ code patch using the source from the knowledge base. Triggers: 'fix best practice', 'corriger les violations', 'generate fix', 'patch BP'. Set generatePatches=true to call Ollama (ALMXPP_SUMMARIZE_MODEL) for code patches -- requires Ollama running at OLLAMA_HOST. Falls back to built-in fix suggestions if unavailable.","write_action":false,"price_micros":0,"input_schema":{"type":"object","properties":{"objectName":{"description":"Object or method to fix, e.g. 'SalesLine' or 'SalesLine.insert'.","type":"string"},"generatePatches":{"description":"Generate X++ code patches via Ollama (requires OLLAMA_HOST). Default false.","type":"boolean","default":false},"maxViolations":{"description":"Max violations to process (1-20, default 10).","type":"integer","default":10}},"required":["objectName"]}},{"name":"generate_data_entity","description":"WHEN: developer needs to CREATE a data entity (AxDataEntityView) AOT XML from a table for OData/DMF/data migration. Triggers: 'create data entity', 'generate entity', 'créer une data entity', 'exposer table via OData', 'DMF entity', 'entity for OData', 'entité de données', 'générer entity XML', 'AxDataEntityView pour', 'data entity from table'. Produces complete AxDataEntityView AOT XML with data sources, field mappings, entity key, IsPublic/PublicEntityName for OData, staging table template. Uses real field names and relations from the local custom model. ALWAYS call find_entity_for_table first to verify a standard entity doesn't already exist.","write_action":false,"price_micros":0,"input_schema":{"type":"object","properties":{"tableName":{"description":"Primary table name, e.g. 'SalesTable', 'CustTable'","type":"string"},"entityName":{"description":"Desired entity name, e.g. 'ALMSalesOrderEntity'","type":"string"},"isPublic":{"description":"Whether the entity should be available via OData (default: true)","type":"boolean","default":true},"publicEntityName":{"description":"Optional: OData collection name (e.g. 'SalesOrders'). Auto-generated if not provided.","type":["string","null"],"default":null},"joinTables":{"description":"Optional: additional tables to join (comma-separated), e.g. 'CustTable,InventDim'","type":["string","null"],"default":null},"fields":{"description":"Optional: specific fields to include (comma-separated). All fields if not specified.","type":["string","null"],"default":null}},"required":["tableName","entityName"]}},{"name":"generate_diagram","description":"WHEN: generating a visual diagram of D365 table relationships or security chains. Triggers: 'generate diagram', 'diagramme', 'visualize', 'schéma', 'ER diagram', 'entity-relationship', 'relation diagram', 'security diagram', 'show connections'. Generate visual Mermaid diagrams from D365 F&O knowledge base data. Diagrams render directly in Copilot Chat, Cursor, Claude, and markdown viewers. Types: 'er' (entity-relationship diagram for a table and its relations), 'security' (security chain: Role->Duty->Privilege->EntryPoints -- use when you need a VISUAL Mermaid diagram; for the structured text chain with tables of duties/privileges/entry-points use `trace_security_chain` instead). Note: 'flow' (execution flowchart) is disabled -- static call trees are misleading in D365 due to CoC and event handlers.","write_action":false,"price_micros":0,"input_schema":{"type":"object","properties":{"diagramType":{"description":"Diagram type: 'er' (entity-relationship) or 'security' (security chain). 'flow' is disabled.","type":"string"},"objectName":{"description":"Object name to diagram, e.g. 'SalesTable', 'SystemAdministrator'","type":"string"},"methodName":{"description":"Not used -- flow diagrams are disabled.","type":["string","null"],"default":null},"maxRelated":{"description":"Optional: maximum related entities to show (default: 12, max: 20)","type":"integer","default":12}},"required":["diagramType","objectName"]}},{"name":"generate_fdd","description":"WHEN: user asks to write or generate a Functional Design Document, FDD, functional spec, CdC, or cahier des charges. NOT for developer technical docs -- use `get_object_details` for that.\n\n FUNCTIONAL DESIGN DOCUMENT GENERATOR -- Produces a structured FDD ready for review and sign-off.\n\nSections generated: Purpose, Business Context, Data Fields (with resolved labels), Business Rules, Related Objects, Security, and Open Questions.\n\nTriggers: 'write FDD for', 'generate FDD', 'functional spec for', 'document this process', 'write functional design', 'rédiger le cahier des charges', 'CdC pour', 'fiche de conception'.","write_action":false,"price_micros":0,"input_schema":{"type":"object","properties":{"objectName":{"description":"D365 object or business process name, e.g. 'SalesTable', 'VendInvoiceInfoTable', 'ALMDemandeAchat'","type":"string"},"context":{"description":"Optional: additional business context, requirements, or audience note to include in the header","type":["string","null"],"default":null},"language":{"description":"Optional: output language ('en', 'fr', 'nl', 'de'). Default: en","type":"string","default":"en"}},"required":["objectName"]}},{"name":"generate_query","description":"WHEN: developer needs correct X++ select or T-SQL for D365 tables with proper joins. Triggers: 'X++ select', 'generate a query', 'SQL for', 'join with', 'how to query', 'générer une requête', 'write a select statement', 'select from', 'X++ query for', 'requête X++', 'écrire une select'. Generate both X++ select statements and equivalent T-SQL queries for D365 F&O tables. Uses real field names, relations, and indexes from the knowledge base to produce correct joins. Supports: field selection, multi-table joins (auto-detects relations), WHERE filters, ORDER BY, TOP/firstonly, cross-company. Also accepts natural language descriptions like 'find all open sales orders for customer 1001 with CustTable join'. [!] For multi-table joins, call find_related_objects (or get_relation_graph if the relation index is loaded) FIRST to get the correct FK relations -- this tool will then produce accurate join conditions. [!] The generated X++ is a template -- adapt it to your custom code context before using in production. Returns side-by-side X++ and SQL with explanations.","write_action":false,"price_micros":0,"input_schema":{"type":"object","properties":{"tableName":{"description":"Primary table name, e.g. 'SalesTable', 'CustTable'","type":"string"},"description":{"description":"Optional: natural language description of the query. If provided, fields/joins/filters are auto-detected.","type":["string","null"],"default":null},"fields":{"description":"Optional: specific fields to select (comma-separated). All fields if not specified.","type":["string","null"],"default":null},"joinTables":{"description":"Optional: tables to join (comma-separated), e.g. 'CustTable,SalesLine'","type":["string","null"],"default":null},"filters":{"description":"Optional: WHERE filter expressions (comma-separated), e.g. 'CustAccount == 1001, SalesStatus == SalesStatus::Open'","type":["string","null"],"default":null},"orderBy":{"description":"Optional: field to ORDER BY","type":["string","null"],"default":null},"top":{"description":"Optional: limit rows (1 = firstonly, N = top N)","type":["integer","null"],"default":null},"crossCompany":{"description":"Whether to add crosscompany clause (default: false)","type":"boolean","default":false}},"required":["tableName"]}},{"name":"generate_release_note_document","description":"WHEN: you have already called prepare_release_note_context and analyzed its 'objects' array yourself, producing a findings JSON array per the 'instructions' field it returned. This tool renders that findings array into a downloadable Word (.docx, detailed appendix) and PowerPoint (.pptx, executive summary) release note and returns their download URLs. Does NOT call any LLM itself -- the reasoning must already be done by you.","write_action":false,"price_micros":0,"input_schema":{"type":"object","properties":{"v1":{"description":"Older D365FO version (same value passed to prepare_release_note_context).","type":"string"},"v2":{"description":"Newer D365FO version (same value passed to prepare_release_note_context).","type":"string"},"customModelLabel":{"description":"Custom model label(s) -- use the customModelLabel field returned by prepare_release_note_context.","type":"string"},"findingsJson":{"description":"JSON array of your findings, one per object from prepare_release_note_context's 'objects' array. Schema: [{\"aotType\":\"...\",\"objectName\":\"...\",\"changeType\":\"Added|Removed|Modified\",\"riskLevel\":\"Critical|Warning|Info|None\",\"whatChanged\":\"...\",\"documentedInMsLearn\":true|false,\"msLearnReference\":\"...\",\"undocumentedReason\":\"...\",\"regressionRisk\":\"...\",\"opportunity\":\"...\",\"recommendation\":\"...\"}]","type":"string"},"touchedAdded":{"description":"touchedAdded count returned by prepare_release_note_context.","type":"integer"},"touchedRemoved":{"description":"touchedRemoved count returned by prepare_release_note_context.","type":"integer"},"touchedModified":{"description":"touchedModified count returned by prepare_release_note_context.","type":"integer"},"businessContext":{"description":"Optional business/functional context (same value passed to prepare_release_note_context), included in the Word document.","type":["string","null"],"default":null}},"required":["v1","v2","customModelLabel","findingsJson","touchedAdded","touchedRemoved","touchedModified"]}},{"name":"generate_security_report","description":"Generate a security & licensing governance report for the indexed model(s). For each role, lists duties, privileges, entry points and the inferred user-license tier (Activity, Operations, Finance, etc.). Surfaces orphan duties/privileges that grant no real access.","write_action":false,"price_micros":0,"input_schema":{"type":"object","properties":{"filterModel":{"description":"Optional: restrict the report to a single model name (e.g. 'ApplicationSuite', 'ContosoCustom'). Empty = all indexed models.","type":["string","null"],"default":null},"maxRolesDetail":{"description":"Maximum number of roles to expand in detail (default 50, max 200).","type":"integer","default":50}}}},{"name":"generate_unit_test","description":"WHEN: developer needs to write or scaffold unit tests for a custom D365 object. Triggers: 'generate tests', 'unit test', 'SysTest', 'write test for', 'scénarios de test', 'test this class'. Generate X++ SysTest unit test code for a CUSTOM D365 F&O object based on functional test scenarios. [!] Only meaningful on custom/extension code (D365_CUSTOM_MODEL_PATH). SysTest tests in D365 are highly context-specific -- a generic template rarely compiles without adaptation. REQUIRED: provide test scenarios in the 'testScenarios' parameter (supplied by the functional consultant). Each scenario becomes a concrete test method with arrange/act/assert. For tables: generates tests for find(), exist(), validateWrite(), initValue(). For classes: generates stubs for each public method listed in scenarios. Uses REAL field names and method signatures from the knowledge base.","write_action":false,"price_micros":0,"input_schema":{"type":"object","properties":{"objectName":{"description":"Object name to generate tests for, e.g. 'ALMERSftpConnectionTable', 'ALMMyClass'","type":"string"},"methodName":{"description":"Optional: specific method to test. If not provided, generates tests for all testable methods.","type":["string","null"],"default":null},"testScenarios":{"description":"Test scenarios provided by the functional consultant, e.g. 'Create a connection with valid SFTP host; Validate that empty host fails; Delete cleans up related records'. Separate scenarios with semicolons.","type":["string","null"],"default":null},"sampleValues":{"description":"Optional: JSON object mapping field name to sample value used in each ARRANGE block, e.g. '{\"AccountNum\":\"C0001\",\"Amount\":1500.50}'. Replaces the 'TODO: set up test data' placeholders with concrete assignments.","type":["string","null"],"default":null}},"required":["objectName"]}},{"name":"generate_xpp_form","description":"Generate a complete, compilable AxForm AOT XML with the CORRECT control serialization (<AxFormControl xmlns=\"\" i:type=\"...\">) for the requested pattern. Patterns: SimpleList, DetailsMaster, DetailsTransaction, ListPage, Dialog, DropDialog, Workspace, Extension. After generation, call validate_form_pattern on the result before write_aot_object.","write_action":false,"price_micros":0,"input_schema":{"type":"object","properties":{"formPattern":{"description":"Form pattern: 'SimpleList', 'DetailsMaster', 'DetailsTransaction', 'ListPage', 'Dialog', 'DropDialog', 'Workspace', 'Extension'","type":"string"},"formName":{"description":"PascalCase form name, e.g. 'ALMCustomerForm'","type":"string"},"primaryTable":{"description":"Primary/header table name, e.g. 'ALMCustomerTable'","type":["string","null"],"default":null},"secondaryTable":{"description":"Secondary/joined table name (DetailsTransaction: lines table; ListPage: InnerJoin lookup table), e.g. 'SalesTable'","type":["string","null"],"default":null},"fields":{"description":"Comma-separated field names to include in the grid/header, e.g. 'AccountNum,Name,Status'","type":["string","null"],"default":null},"fieldTypes":{"description":"Optional: comma-separated control type per field (aligned 1:1 with fields). Values: String, Int, Real, Date, DateTime, Enum, CheckBox, Reference. If omitted, all fields default to AxFormStringControl (current behavior).","type":["string","null"],"default":null},"modelName":{"description":"Model name for label prefix, e.g. 'ALMMyModel'","type":["string","null"],"default":null}},"required":["formPattern","formName"]}},{"name":"generate_xpp_template","description":"WHEN: writing an extension or customization -- generates ready-to-use X++ code. Triggers: 'génère un CoC', 'crée une extension', 'generate extension', 'write a CoC class', 'event handler pour', 'template pour'. Uses REAL metadata from the KB (actual field names, method signatures). 'coc' = Chain of Command class, 'table_extension' = extend table with fields/methods, 'event_handler' = pre/post event handler, 'job' = runnable class, 'find_method' = find/exist pattern. ALWAYS call get_object_details first to verify the object exists.","write_action":false,"price_micros":0,"input_schema":{"type":"object","properties":{"templateType":{"description":"Template type: 'coc', 'table_extension', 'event_handler', 'job', 'find_method'","type":"string"},"objectName":{"description":"The base object, e.g. 'SalesTable', 'VendInvoiceJour'","type":"string"},"methodName":{"description":"Optional: specific method name for CoC or event handler templates","type":["string","null"],"default":null}},"required":["templateType","objectName"]}},{"name":"get_data_entity_info","description":"WHEN: developer building an OData / DMF integration needs a quick rundown of a specific data entity: its public OData name, datasources, key fields, and IsPublic status. Triggers: 'data entity info', 'OData entity details', 'is X a public entity', 'entity datasources'. Cloud-safe: pure metadata read from the KB.","write_action":false,"price_micros":0,"input_schema":{"type":"object","properties":{"entityName":{"description":"Data entity name (AxDataEntityView), e.g. 'CustCustomerV3Entity', 'SalesOrderHeaderV2Entity'.","type":"string"}},"required":["entityName"]}},{"name":"get_menu_item_info","description":"WHEN: developer needs to resolve a menu item -- find its target object (form / action / output), linked security privilege, label, and parameters. Triggers: 'menu item info', 'what does menu item X open', 'menu item target', 'security privilege for menu item'. Cloud-safe: parses the AxMenuItem XML already loaded in the KB. Returns the resolved object name, menu item type (Display/Action/Output), linked privilege, and the form/class/report it points to.","write_action":false,"price_micros":0,"input_schema":{"type":"object","properties":{"menuItemName":{"description":"Menu item name (without prefix), e.g. 'CustTable', 'SalesTableListPage', 'ALMMyMenuItem'.","type":"string"},"menuItemType":{"description":"Optional: menu item type to disambiguate when multiple exist with the same name. 'Display', 'Action', or 'Output'. Default: try all.","type":["string","null"],"default":null}},"required":["menuItemName"]}},{"name":"get_object_context","description":"WHEN: you need a COMPLETE picture of a D365 object in ONE call. Returns in a single response: full structure (fields, method signatures, relation summary) AND all CoC extensions / event handlers -- equivalent to calling get_object_details THEN find_extensions. Use this INSTEAD of those two separate calls to reduce round-trips. Optionally includes best-practice violations (set includeValidation=true). Pass `methodName` to also include the full body of a specific method. Pass `aotType` to disambiguate when several AOT objects share the same name.","write_action":false,"price_micros":0,"input_schema":{"type":"object","properties":{"objectName":{"description":"Exact object name, e.g. 'SalesTable', 'CustTable', 'VendInvoiceJour'","type":"string"},"methodName":{"description":"Optional: specific method name to include full body for.","type":["string","null"],"default":null},"aotType":{"description":"Optional: AOT type to disambiguate, e.g. 'AxTable', 'AxClass', 'AxForm'.","type":["string","null"],"default":null},"includeValidation":{"description":"Include best-practice violations (default false -- adds latency for large objects).","type":"boolean","default":false}},"required":["objectName"]}},{"name":"get_object_details","description":"WHEN: you know the EXACT object name. Triggers: user gives an exact name like 'SalesTable', 'CustTable', 'VendInvoiceJour', any PascalCase D365 object name. Get complete details: all fields, methods, relations, indexes, source code, and metadata. COST NOTE: this returns the FULL object and can be very large (100KB+ for big tables/forms like SalesLine). If you ONLY need relations / FK / DeleteActions / data sources / who-references, call get_relation_graph instead -- it is O(1) and roughly 6x lighter (no source code). Reserve get_object_details for when you genuinely need field details, method bodies, or source code. Also merges live disk source when a custom model path is configured (disk takes priority). Pass `methodName` to get the FULL body of a specific method -- without it, only signatures are returned. Calling twice -- first without methodName to get the full structure and method table, then again with a specific methodName for its full body -- is the CORRECT and INTENDED two-step pattern. Do NOT call a third time for the same object. DISAMBIGUATION: when a name exists as several AOT types (e.g. a Table AND a Form both named 'SalesLine'), this returns the PRIMARY type (Table/Class/Entity before the much heavier Form) and notes the others -- pass `aotType` (e.g. 'AxTable', 'AxForm', or shorthand 'table'/'form'/'class') to pick a specific one. This prevents dumping the heaviest object and truncating the rest. NOT for searching -- use search_d365_code when the name is uncertain. NOT for listing a model's objects -- use list_objects for that.","write_action":false,"price_micros":0,"input_schema":{"type":"object","properties":{"objectName":{"description":"The exact object name, e.g. 'SalesTable', 'VendInvoiceApprovalConfig', 'ALMAlternativeItemsTable'","type":"string"},"methodName":{"description":"Optional: specific method name to return full body for, e.g. 'send', 'run', 'validate'. When provided, returns the complete method source instead of the signature table.","type":["string","null"],"default":null},"aotType":{"description":"Optional: AOT type to disambiguate when several objects share the name, e.g. 'AxTable', 'AxForm', 'AxClass' (shorthand 'table'/'form'/'class'/'enum'/'edt'/'view'/'entity' also accepted). When omitted and the name is ambiguous, the primary type (Table/Class/Entity before Form) is returned with a note listing the others.","type":["string","null"],"default":null}},"required":["objectName"]}},{"name":"get_output_page","description":"Retrieve the NEXT page of a previously PAGINATED tool output. When a tool result is too large for a single response, it is split losslessly into ordered pages — the footer of each page gives you a `token` and the next `page` number. Call this tool with that token to read the continuation; nothing is dropped, so you can walk every page in order and reconstruct the full result. Pages are cached only briefly (the last few large results). If the token is unknown or expired, re-run the original tool to regenerate it.","write_action":false,"price_micros":0,"input_schema":{"type":"object","properties":{"token":{"description":"The pagination token from a paginated tool's footer, e.g. 'op_a1b2c3d4e5'.","type":"string"},"page":{"description":"The page number to retrieve (the previous page footer tells you the next one). Defaults to 2.","type":"integer","default":2}},"required":["token"]}},{"name":"get_relation_graph","description":"WHEN: you need the COMPLETE bidirectional relation graph for an object in ONE call. Triggers: 'relations of', 'FK of', 'what tables link to', 'quelles tables liées à', 'avant de générer du code', 'before generating code', 'foreign keys', 'delete actions', 'who references', 'qui référence', 'graph de relations'. Returns ALL outgoing edges (FK relations, DeleteActions, DataSources, Extensions, Security...) AND all incoming back-references (forms, entities, CoC classes, privileges... that reference it). Backed by the pre-computed relation index -- O(1) lookup, no vector scan. Much faster and more complete than find_related_objects for known object names. ALWAYS call this before generating code that touches multiple objects or requires join logic. Use find_related_objects when the relation index is not yet built (fallback to vector scan).","write_action":false,"price_micros":0,"input_schema":{"type":"object","properties":{"objectName":{"description":"The exact object name, e.g. 'SalesTable', 'CustTable', 'SalesFormLetter'","type":"string"},"maxEdges":{"description":"Maximum edges to show per direction (default: 200, max: 500)","type":"integer","default":200},"aotTypeFilter":{"description":"Optional: filter edges by relation kind to reduce noise. Comma-separated. Examples: 'TableFK', 'DeleteAction', 'Extension', 'DataSource', 'Security'. Leave empty for all kinds.","type":["string","null"],"default":null}},"required":["objectName"]}},{"name":"get_security_coverage_for_object","description":"WHEN: developer/security architect needs to know WHICH ROLES can access a specific form, table, menu item or service operation. Triggers: 'who can access', 'which roles see', 'security coverage for', 'quels roles ont accès à', 'find roles with access'. Walks the security graph backwards (EntryPoint -> Privilege -> Duty -> Role) and returns all roles that grant any level of access (Read / Update / Create / Delete / Correct) on the given object. Read-only: scans the in-memory KB, never writes.","write_action":false,"price_micros":0,"input_schema":{"type":"object","properties":{"objectName":{"description":"Object name to audit (form, table, menu item, service operation). Example: 'CustTable', 'SalesTableListPage', 'CustCustomerServiceMenu'.","type":"string"},"minGrant":{"description":"Optional: minimum grant level to include in results. Values: 'Read', 'Update', 'Create', 'Delete', 'Correct', 'Any'. Default: 'Any'.","type":"string","default":"Any"},"maxRoles":{"description":"Maximum roles to expand (default 30, max 100).","type":"integer","default":30}},"required":["objectName"]}},{"name":"healthcheck","description":"WHEN: checking server status, loaded D365 version, or custom model path. Triggers: 'status', 'statut', 'is the server ready', 'how many chunks', 'index loaded'. Returns JSON with: status, indexed chunk count, loaded version, custom model path.","write_action":false,"price_micros":0,"input_schema":{"type":"object","properties":{}}},{"name":"lesson_save","description":"WHEN: a problem has just been solved, or a convention or procedure was agreed, and it should not need explaining again. Triggers: 'keep this', 'retiens ça', 'save this lesson', 'note this for next time', 'capitalise'. Propose it to the user first and save only with their agreement. Write it so a stranger could apply it: the problem as it showed up (the symptom and message), the cause, the solution step by step, and the D365 objects involved. The lesson is saved for the caller's client as UNVALIDATED; an administrator reviews it before it is trusted. Never put secrets, passwords, tokens or personal data in a lesson.","write_action":false,"price_micros":0,"input_schema":{"type":"object","properties":{"title":{"description":"Short title that says what it is about, e.g. 'Sales invoice posting fails when the tax group is empty'.","type":"string"},"problem":{"description":"The problem as it appeared: symptom, error message, where.","type":"string"},"solution":{"description":"What fixed it, in steps.","type":"string"},"cause":{"description":"Why it happened, when known.","type":["string","null"],"default":null},"kind":{"description":"'lesson' (default), 'convention' (how this client does things) or 'procedure' (a repeatable how-to).","type":"string","default":"lesson"},"objects":{"description":"Optional: comma-separated D365 objects involved.","type":["string","null"],"default":null},"tags":{"description":"Optional: comma-separated keywords.","type":["string","null"],"default":null},"sourceRef":{"description":"Optional: where it came from, e.g. 'WI 6587' or 'PR 142'.","type":["string","null"],"default":null}},"required":["title","problem","solution"]}},{"name":"lesson_search","description":"WHEN: BEFORE investigating a problem, designing a change or answering a question about how a client's D365 F&O works: check whether it was already solved. Returns the lessons learned that best match, with their problem, cause and solution. Triggers: 'did we already see this', 'a-t-on déjà eu ce problème', 'known issue', 'leçons apprises', 'how did we fix'. Pass the D365 objects involved in `objects` when you know them: they weigh most. A result marked UNVALIDATED has not been reviewed by an administrator: use it as a lead and verify it. A lesson records a past case: confirm the cause is the same before applying its solution, and say which lesson you used.","write_action":false,"price_micros":0,"input_schema":{"type":"object","properties":{"query":{"description":"The symptom, error message or question, in plain words.","type":"string"},"objects":{"description":"Optional: comma-separated D365 objects involved, e.g. 'SalesLine, CustInvoiceJour'.","type":["string","null"],"default":null},"maxResults":{"description":"Maximum lessons to return (1-10, default 5).","type":"integer","default":5}},"required":["query"]}},{"name":"list_custom_model_objects","description":"WHEN: developer wants to see what custom/extension objects exist in their model. Triggers: 'list my custom objects', 'what have we customized', 'show ISV objects', 'list custom model', 'what objects are in our model'. List all D365 F&O objects in the custom/extension model directory on disk. Reads the file system directly -- always reflects the latest uncommitted state. Pass `customModelPath` to specify a model directory; or set it once via the `D365-Custom-Model-Path` header in your .mcp.json (applies to all tool calls automatically).","write_action":false,"price_micros":0,"input_schema":{"type":"object","properties":{"customModelPath":{"description":"Optional: path to the custom model directory (e.g. 'C:\\\\AOTExport\\\\MyModel'). Overrides the header and server-configured path.","type":["string","null"],"default":null}}}},{"name":"list_objects","description":"WHEN: you need ALL objects of a given type or in a given model. Triggers: 'list all tables in ALM', 'show all classes', 'quels objets dans le modèle', 'give me all forms'. Full index scan -- returns EVERY matching object, not just top search results. Use to discover what tables, classes, forms, enums, etc. exist in a specific model. When no filters are given and a custom model is configured, defaults to listing that model. NOT for a single object -- use get_object_details. NOT for natural language search -- use search_d365_code.","write_action":false,"price_micros":0,"input_schema":{"type":"object","properties":{"aotType":{"description":"Filter by AOT type: AxClass, AxTable, AxForm, AxView, AxEnum, AxEdt, AxDataEntityView, AxSecurityPrivilege, AxSecurityDuty, AxSecurityRole, AxQuery, AxReport, Documentation. Leave empty for all types.","type":["string","null"],"default":null},"modelName":{"description":"Filter: matches BOTH package/module name (partial) AND object name (substring). Examples: 'ALM' (package), 'Cust' (any object containing 'Cust'), 'SalesTable'. Leave empty for all.","type":["string","null"],"default":null}}}},{"name":"list_release_note_inputs","description":"WHEN: ALWAYS call this FIRST, before prepare_release_note_context -- it discovers the exact D365FO version strings and custom model ids actually indexed on THIS server, which you cannot guess. Triggers: 'release note', 'compare D365 versions', 'upgrade impact for a client', 'what changed for this client', 'regression risk', 'note de version'. Returns every indexed version (exact 'version' string to use as v1/v2, e.g. 10.0.2527.109) and every ready-to-use custom model (exact 'id' to use as customModelIds, plus its name and optional clientGroup tag -- models sharing the same clientGroup belong to the same client and should usually ALL be passed together, e.g. the client's own extensions AND a separate ISV vendor model). IMPORTANT: this server holds the ACTUAL indexed code diff and the client's ACTUAL custom code -- generic Microsoft Learn / Azure Updates / documentation-search tools do NOT have this data and must NOT be used for D365 F&O release-note or upgrade-impact questions about a specific client; those tools only know public, generic release notes, not this client's real regression/opportunity picture.","write_action":false,"price_micros":0,"input_schema":{"type":"object","properties":{}}},{"name":"map_business_process","description":"WHEN: mapping the technical D365 objects behind a business process, or understanding which tables/forms implement a flow. Triggers: 'processus métier', 'Order-to-Cash', 'Procure-to-Pay', 'Record-to-Report', 'business process flow', 'qui est impliqué dans', 'map the process', 'flux du processus', 'quels objets dans le flux'. Map a D365 F&O business process to its complete object chain. For known processes (Order-to-Cash, Procure-to-Pay, Record-to-Report, Plan-to-Produce, Inventory-Management, Hire-to-Retire, Project-Accounting, Asset-Lifecycle): shows every step with forms, tables, classes, entities, reports, and security roles involved. For any other object name: traces all dependencies (tables, classes, forms, entities) from that entry point. Produces a Mermaid process flow diagram. Use 'list' to see all known process mappings. NOT for a single object's FK relations only -- use `find_related_objects` for that (faster and more precise).","write_action":false,"price_micros":0,"input_schema":{"type":"object","properties":{"processName":{"description":"Business process name (e.g. 'Order-to-Cash', 'Procure-to-Pay', 'sales', 'purchasing') or an object name to trace from. Use 'list' to see all known processes.","type":"string"}},"required":["processName"]}},{"name":"odata_export_entity","description":"Export any D365 F&O data entity via OData (transactional, no DMF project required).\nUniversal: works for ANY public entity. Supports $select, $filter, $orderby and\nfollows server paging automatically. Returns CSV (default) or JSON.\nUse for live/ad-hoc exports and small-to-medium volumes. For very large bulk\nexports prefer dmf_export_package. Resolve the entity set name from the KB first\n(find_entity_for_table / get_data_entity_info) -- do not invent entity names.","write_action":false,"price_micros":0,"input_schema":{"type":"object","properties":{"entitySet":{"description":"OData public entity set name, e.g. 'CustomersV3', 'ReleasedProductsV2'.","type":"string"},"select":{"description":"Optional $select (comma-separated fields). Empty = all fields.","type":["string","null"],"default":null},"filter":{"description":"Optional OData $filter expression.","type":["string","null"],"default":null},"orderBy":{"description":"Optional $orderby expression.","type":["string","null"],"default":null},"maxRows":{"description":"Max rows to return (0/empty = no cap, follows all pages). Default 1000.","type":"integer","default":1000},"crossCompany":{"description":"Set true to query across all legal entities (adds cross-company=true).","type":"boolean","default":false},"format":{"description":"Output format: 'csv' (default) or 'json'.","type":"string","default":"csv"},"outputPath":{"description":"Optional file path to also write the full result to (e.g. C:\\temp\\export.csv).","type":["string","null"],"default":null}},"required":["entitySet"]}},{"name":"odata_upsert_rows","description":"Idempotent import of rows into any entity via OData: PATCH when the record\nexists (matched by keyFields), otherwise POST. Safe to re-run -- duplicates\nare updated, not re-created. Best for small-to-medium transactional loads\n(e.g. <= a few thousand rows). For bulk loads use dmf_import_file.\nProvide rows as a JSON array of objects; resolve key fields from the KB\n(get_data_entity_info) -- do not guess them.","write_action":false,"price_micros":0,"input_schema":{"type":"object","properties":{"entitySet":{"description":"OData public entity set name, e.g. 'CustomersV3'.","type":"string"},"rowsJson":{"description":"JSON array of row objects, e.g. [{\"CustomerAccount\":\"C0001\",\"Name\":\"Acme\"}].","type":"string"},"keyFields":{"description":"Comma-separated business key fields used to detect existing records, e.g. 'CustomerAccount' or 'dataAreaId,ItemNumber'.","type":"string"},"legalEntity":{"description":"Optional legal entity (dataAreaId) injected into each row when absent.","type":["string","null"],"default":null},"crossCompany":{"description":"Set true to allow cross-company writes.","type":"boolean","default":true}},"required":["entitySet","rowsJson","keyFields"]}},{"name":"plan_and_execute","description":" CHAIN-OF-TOOLS PLANNER -- Execute a multi-step JSON plan in ONE call by chaining tools. Pass an EXPLICIT JSON array of steps (NL parsing disabled to prevent ambiguity). Maximum 5 steps per plan. The chain stops on any critical failure (ado_analyze_workitem, get_object_details).\n\n## Required Format (JSON array)\n`[{\"tool\":\"get_object_details\",\"args\":{\"objectName\":\"SalesTable\"}},{\"tool\":\"validate_best_practices\",\"args\":{\"objectName\":\"SalesTable\"}}]`\n\n## When to use\n- You already know the exact sequence of 2-5 tool calls needed\n- The output of step N is independent of step N+1 (or matches the carried context: analysis_output)\n- You want SSE progress events between steps\n\n## When NOT to use\n- Single tool call (use the tool directly)\n- Plan depends on the user's intermediate decision (call tools one at a time)\n- More than 5 steps (split into separate calls)\n\n## Cost: $0 -- pure in-process execution.","write_action":true,"price_micros":0,"input_schema":{"type":"object","properties":{"goal":{"description":"Natural language goal OR a JSON array of explicit steps. Examples: 'analyse WI #6587 and create a task', 'check best practices for ALMMyClass'.","type":"string"},"workItemId":{"description":"Optional: work item ID to use when goal references 'WI #N' (overrides ID parsed from goal text).","type":["integer","null"],"default":null},"objectName":{"description":"Optional: object name to use when goal references a D365 object (overrides name parsed from goal).","type":["string","null"],"default":null},"project":{"description":"Optional: Azure DevOps project name. Falls back to DEVOPS_PROJECT env var.","type":["string","null"],"default":null},"assignTo":{"description":"Optional: assignee email for task creation step, e.g. 'dev@company.com'.","type":["string","null"],"default":null},"description":{"description":"Optional: additional description text to pass to task creation step.","type":["string","null"],"default":null}},"required":["goal"]}},{"name":"prepare_release_note_context","description":"WHEN: building an AI-assisted D365 F&O upgrade release note (regressions + opportunities) for a specific client, and you (the calling assistant) want to do the reasoning yourself instead of the server calling its own LLM. Call resolve_client_profile FIRST -- if it finds a profile, OMIT v1/v2/customModelIds here and they will be auto-filled from it. If no profile exists, call list_release_note_inputs to get real values and pass them explicitly -- never guess them. Triggers: 'release note', 'upgrade impact for this client', 'what breaks for a client between these versions', 'regression risk', 'note de version'. Diffs two indexed D365FO versions (v1=older, v2=newer) and cross-references EVERY changed standard object against ALL the given custom models (a client can have several -- their own extensions AND a separate ISV vendor model, in which case pass both ids comma-separated) -- returning ONLY the subset of changes actually touched by the client's code (capped at 60, Removed > Modified > Added priority), each with old/new content and which custom object references it. Returns a JSON payload with an 'instructions' field telling you the EXACT schema to produce -- analyze the 'objects' array yourself, then call generate_release_note_document with your findings JSON to get the downloadable Word/PowerPoint.","write_action":false,"price_micros":0,"input_schema":{"type":"object","properties":{"v1":{"description":"Older/baseline D365FO version to compare FROM, e.g. \"10.0.2527.109\". Omit to auto-fill from the caller's resolved client profile (see resolve_client_profile).","type":["string","null"],"default":null},"v2":{"description":"Newer D365FO version to compare TO, e.g. \"10.0.2645.32\". Omit to auto-fill from the caller's resolved client profile.","type":["string","null"],"default":null},"customModelIds":{"description":"Comma-separated custom model id(s) from the Admin > Custom Models tab. Omit to auto-fill from the caller's resolved client profile. Pass several when a client combines their own extensions with a separate ISV vendor model.","type":["string","null"],"default":null},"businessContext":{"description":"Optional free-text business/functional context about the client (modules used, key customizations, priorities) to sharpen the opportunity/regression assessment.","type":["string","null"],"default":null}}}},{"name":"recommend_extension_strategy","description":"WHEN: developer about to customise a standard D365 object asks 'should I use AxTableExtension, Chain of Command, EventHandler, or Delegate?'. Triggers: 'how to extend', 'best way to customise', 'extension strategy for', 'CoC ou event handler', 'comment etendre X'. Returns a ranked recommendation based on the target AOT type and the intent, with citations to the Microsoft Learn extensibility guide. Cloud-safe: pure KB lookup, no writes.","write_action":false,"price_micros":0,"input_schema":{"type":"object","properties":{"objectName":{"description":"Target standard D365 object name, e.g. 'SalesTable', 'CustTable', 'SalesLineType', 'PurchFormLetter_Confirmation'.","type":"string"},"intent":{"description":"Plain-language goal of the customisation. Examples: 'add a status field', 'change validateWrite logic', 'react to record insert', 'replace the posting logic', 'override the find method', 'extend the enum'.","type":"string"}},"required":["objectName","intent"]}},{"name":"resolve_client_profile","description":"WHEN: at the START of any release-note / upgrade-impact conversation -- call this BEFORE list_release_note_inputs to check whether a Client Profile already exists for the CURRENT caller's Azure DevOps org/project (auto-detected from DEVOPS_ORG_URL/DEVOPS_PROJECT MCP headers -- you don't pass anything). If found, it gives you the client's currentVersionTag, targetVersionTag, customModelIds (their own extensions AND any attached ISV/vendor models) and the latest diff snapshot in one call -- use those directly as v1/v2/customModelIds for prepare_release_note_context, no further discovery needed. If not found, fall back to list_release_note_inputs and/or save_client_profile.","write_action":false,"price_micros":0,"input_schema":{"type":"object","properties":{}}},{"name":"resolve_workspace_roots","description":"WHEN: you need to know which folder(s) are configured as the workspace/project root for the current caller. Reads D365-Custom-Model-Path and D365-Standard-Model-Path from the request headers or environment variables. Use before any tool that accepts a customModelPath/standardModelPath parameter.","write_action":false,"price_micros":0,"input_schema":{"type":"object","properties":{}}},{"name":"resync_devops_index","description":"WHEN: the user wants to force a full re-download and re-index of their Azure DevOps custom model. Triggers: 'resync', 'reindex', 'force sync', 'rebuild index', 'my model is stale', 'update index', 'mon index est vieux', 'rafraîchir l\\'index', 'relancer l\\'indexation'. Useful when the server's built-in PAT does not have access to the target DevOps organisation (e.g. a different Azure DevOps org or tenant). Pass a `pat` parameter to override the server PAT for this resync. The eviction + download runs in the background; returns status immediately. After calling, wait ~60 s then call `healthcheck` or any search tool to confirm the index is ready.","write_action":false,"price_micros":0,"input_schema":{"type":"object","properties":{"pat":{"description":"Optional: Personal Access Token with Code (Read) permission for the target Azure DevOps org. Provide this when the server's built-in PAT lacks access (e.g. a different tenant, cross-org). Leave blank to reuse the session PAT or server env-var default.","type":["string","null"],"default":null}}}},{"name":"save_client_profile","description":"WHEN: no profile was found by resolve_client_profile and the user wants one created (or updated) for their client, so future release-note requests never need v1/v2/customModelIds again. Creates or updates a Client Profile keyed by the CURRENT caller's ADO org/project (auto-detected from MCP headers -- not a parameter). Only the fields you pass are changed; omit a field to leave it untouched on an existing profile.","write_action":false,"price_micros":0,"input_schema":{"type":"object","properties":{"name":{"description":"Friendly client name, e.g. \"Acme Corp\".","type":"string"},"currentVersionTag":{"description":"The client's current live D365FO version tag, e.g. \"10.0.2527.109\".","type":["string","null"],"default":null},"targetVersionTag":{"description":"The version being evaluated for upgrade, e.g. \"10.0.2645.32\".","type":["string","null"],"default":null},"customModelIds":{"description":"Comma-separated custom model id(s) from the Custom Models tab -- the client's own extensions AND any separate ISV vendor models.","type":["string","null"],"default":null}},"required":["name"]}},{"name":"search_context_docs","description":"WHEN: the user asks about business/functional context that lives OUTSIDE the D365 code KB -- specs, functional design docs, mapping sheets, contracts, meeting notes, screenshots' captions -- anything an admin uploaded via the admin portal's 'Context Documents' library (PDF, Word .docx, Excel .xlsx/.xlsm, CSV, plain text/Markdown/JSON). Does NOT search X++ code or AOT objects -- use search_d365_code / get_object_details for that. Triggers: 'what does the spec say about...', 'check the mapping document for...', 'cherche dans les documents de contexte', 'according to the functional design'. An excerpt containing a 'Image N' marker has a picture the text cannot convey (a diagram, a screenshot): call again with includeImages=true to receive those pictures inline.","write_action":false,"price_micros":0,"input_schema":{"type":"object","properties":{"query":{"description":"Natural-language search query.","type":"string"},"maxResults":{"description":"Max distinct documents to return (1-20). Default 8.","type":"integer","default":8},"includeImages":{"description":"Attach the images embedded in the matched documents (Word only). Off by default because each picture is inlined as base64 and is far larger than the text around it.","type":"boolean","default":false}},"required":["query"]}},{"name":"search_d365_code","description":"WHEN: object name is unknown, partial, or you need to find by concept/keyword. Search the D365 F&O knowledge base for X++ code, tables, classes, forms, views, enums, EDTs, security objects using natural language or partial names. Returns ALL chunks (metadata, Declaration, methods) for the top-scoring objects so the LLM has complete context on the first call. Lower-scoring results return a short preview. No follow-up get_object_details call is needed for top results. NOT for listing all objects in a model -- use list_objects for that. NOT when the exact name is known -- use get_object_details for that. NEVER call search_d365_code twice in the same conversation turn. If one search did not find the object, answer from what you have -- do not repeat the search. When you need context on MORE THAN ONE concept simultaneously, use batch_search instead -- it runs all queries in parallel and is faster. NEVER call for ADO items (FDD, RDD, IDD, Bug, Task, PR, WorkItem, sprint, #1234) -- use ado_* tools instead.","write_action":false,"price_micros":0,"input_schema":{"type":"object","properties":{"query":{"description":"Natural language search query. Examples: 'vendor invoice approval', 'tables in ALM', 'SalesTable fields', 'security privileges for purchasing'","type":"string"},"topK":{"description":"Maximum number of results to return (default: 10, max: 50)","type":"integer","default":10},"topObjects":{"description":"Number of top-scoring objects whose ALL chunks are returned (default: 5, max: 20). Increase to broaden coverage, decrease for tighter focus.","type":"integer","default":5},"domain":{"description":"Optional: filter results to a specific AOT type. Examples: 'AxTable', 'AxClass', 'AxForm', 'AxEnum'. Leave empty for all types.","type":["string","null"],"default":null},"scope":{"description":"Optional routing override: 'auto' (default — session/custom first, standard fallback), 'custom' (session only — fails over to standard if nothing found), 'standard' (skip session entirely), 'both' (federated, no priority).","type":["string","null"],"default":null}},"required":["query"]}},{"name":"search_labels","description":"Search D365 F&O labels across all indexed languages. Given text (e.g. 'Sales order'), finds the matching label ID (@SYS12345). Given a label ID (e.g. '@SYS12345' or '@SYS:12345'), finds the text in all languages. Accepts both D365 short form (@SYS124480) and colon form (@SYS:124480) -- both are normalized automatically. Searches across 392K+ label entries. WORKFLOW: call search_labels first to resolve the label text, then call find_references with the same label ID to find ALL X++ objects (forms, tables, classes, reports) that use it in their code or metadata. Languages: en-US and fr are loaded at startup. Other languages (de, nl, ar, es, zh...) are loaded on-demand -- first call ~15s, then instant.","write_action":false,"price_micros":0,"input_schema":{"type":"object","properties":{"query":{"description":"Text to search for (e.g. 'Sales order', 'Invoice amount') or a label ID (e.g. '@SYS12345', '@AccountsReceivable:CustInvoice')","type":"string"},"language":{"description":"Optional: filter by language code (e.g. 'en-US', 'fr', 'de', 'nl'). Leave empty for all languages.","type":["string","null"],"default":null},"maxResults":{"description":"Maximum results (default: 20, max: 50)","type":"integer","default":20}},"required":["query"]}},{"name":"suggest_edt","description":"WHEN: adding a new field to a table -- find the best existing D365 EDT to extend instead of using raw primitives (str, int64, real, date). Triggers: 'what EDT for', 'which EDT should I extend', 'quel EDT pour', 'quel type étendu', 'EDT for a field'. D365 best practice mandates EDT reuse over raw primitive types. Call BEFORE declaring any field with a primitive type. Returns ranked candidate EDTs with their base type, label, and model.","write_action":false,"price_micros":0,"input_schema":{"type":"object","properties":{"fieldName":{"description":"Field name or concept, e.g. 'AccountNum', 'vendorId', 'itemCode', 'approvalStatus'","type":"string"},"purpose":{"description":"Purpose of the field in plain language, e.g. 'customer account number', 'approval status enum', 'invoice amount in transaction currency'","type":"string"},"baseType":{"description":"Optional: D365 primitive base type to filter by, e.g. 'str', 'int64', 'real', 'date', 'enum'. Leave empty to search all types.","type":["string","null"],"default":null},"topK":{"description":"Number of EDT candidates to return (default: 8, max: 20)","type":"integer","default":8}},"required":["fieldName","purpose"]}},{"name":"suggest_refactoring","description":"WHEN: developer wants to improve code quality before a PR merge or code review. Triggers: 'refactor', 'clean up', 'simplify', 'too long method', 'nested ifs', 'code smells', 'améliorer le code'. Suggest concrete refactoring actions for YOUR custom D365 F&O X++ code. [!] Only runs on custom/extension code (D365_CUSTOM_MODEL_PATH). Refactoring standard Microsoft code is not actionable. Analyzes: long methods (extract method), deep nesting (guard clauses), row-by-row operations (set-based), large switch statements (strategy pattern), hardcoded strings (constants), unprotected CLR calls (error handling), wide transactions (narrow scope). Returns before/after code examples.","write_action":false,"price_micros":0,"input_schema":{"type":"object","properties":{"objectName":{"description":"Object name to analyze, e.g. 'ALMMyClass', 'ALMMyTable'","type":"string"},"methodName":{"description":"Optional: specific method to analyze.","type":["string","null"],"default":null}},"required":["objectName"]}},{"name":"summarize_for_stakeholder","description":"WHEN: you have a large technical tool output (get_object_details, validate_best_practices, ado_analyze_workitem, detect_performance_issues...) and need it reframed for a non-technical audience. Calls the local Ollama instance (OLLAMA_HOST env var, default localhost:11434) to produce the summary. Model is configurable via ALMXPP_SUMMARIZE_MODEL (default: llama3.2).","write_action":false,"price_micros":0,"input_schema":{"type":"object","properties":{"text":{"description":"The technical text to summarize/explain -- typically the raw output of another tool call.","type":"string"},"audience":{"description":"Target audience: 'executive', 'business-analyst', or 'developer'. Default 'business-analyst'.","type":"string","default":"business-analyst"}},"required":["text"]}},{"name":"trace_field_lineage","description":"WHEN: you need to understand the full data lifecycle of a D365 F&O table field: who writes it, who reads it, which forms display it, which reports use it, and which tables have FK relationships to its parent table. Triggers: 'where is field X set', 'qui écrit ce champ', 'data lineage', 'GDPR field audit', 'origin of field', 'what touches this field'. Requires XRef index for writer/reader analysis. Relation graph for forms and FKs. Examples: trace_field_lineage('CustTable','CreditMax') or trace_field_lineage('LedgerJournalTrans','AmountCurDebit').","write_action":false,"price_micros":0,"input_schema":{"type":"object","properties":{"tableName":{"description":"Table or class name, e.g. 'CustTable'.","type":"string"},"fieldName":{"description":"Field or property name, e.g. 'CreditMax'.","type":"string"},"maxPerCategory":{"description":"Max results per category (default 15).","type":"integer","default":15}},"required":["tableName","fieldName"]}},{"name":"trace_role_license_tree","description":"WHEN: security design, licence audit, or 'what licence does this role require?'. Triggers: 'arborescence du rôle', 'licence nécessaire pour', 'what licence for role', 'role tree', 'droits du rôle', 'entry points of role', 'privilege tree for'. Builds the COMPLETE tree for ONE role: Role -> Duties -> Privileges -> Entry Points. For each entry point, classifies the required D365 licence per the March 2026 Licensing Guide: Team Members (~$8/user/mo, read-only + named tasks), Operations-Activity (~$50, warehouse mobile & production floor), Finance (~$180), Supply Chain Mgmt (~$180), Human Resources (~$22), Project Operations (~$120), Commerce (~$180). Grant-level aware: NoAccess/Read/View -> Team Members; Activity writes -> Operations-Activity; transactional writes -> full product licence based on functional area. Confidence:  High (known module prefix) .  Medium (keyword) .  Low (fallback). Ends with a  Optimization section: Team Members / Activity eligibility, role-split opportunities, per-user/month cost estimates (March 2026 MSRP). Always validate against the [Microsoft D365 Licensing Guide](https://go.microsoft.com/fwlink/?LinkId=866544). For a full multi-role scan, call `trace_role_license_tree` multiple times -- once per role. NOT for the pure technical duty/privilege/entry-point chain without licence inference -- use `trace_security_chain` for that.","write_action":false,"price_micros":0,"input_schema":{"type":"object","properties":{"roleName":{"description":"The exact security role name, e.g. 'SystemAdministrator', 'AccountsPayablePaymentsClerk', 'ALMMyCustomRole'","type":"string"},"maxEntryPoints":{"description":"Maximum entry points to show per privilege (default: 20, max: 100)","type":"integer","default":20}},"required":["roleName"]}},{"name":"trace_security_chain","description":"WHEN: security audit -- need the TECHNICAL chain from Role/Duty/Privilege to Entry Points and Table/Form permissions. Also handles BUSINESS-LANGUAGE role explanation when businessLanguage=true. Triggers (technical): 'sécurité de', 'who can access', 'security for', 'role duty privilege', 'droits sur', 'technical security chain', 'trace le rôle', 'what privileges does', 'what duties are assigned', 'which role allows', 'accès au formulaire', 'what roles have access', 'quel rôle donne accès'. Triggers (business language): 'what can a user with role X do', 'explain this role', 'what does this role give access to', 'quel accès donne ce rôle', 'droits du rôle', 'what licence does this role need', 'droits requis pour'. Traverses: Role -> Duties -> Privileges -> Entry Points -> Table/Form Permissions. Set businessLanguage=true for plain-language capability list (no Duty/Privilege IDs). NOT for licence cost inference per entry point -- use trace_role_license_tree for that.","write_action":false,"price_micros":0,"input_schema":{"type":"object","properties":{"securityObjectName":{"description":"Security object name, e.g. 'SystemAdministrator', 'VendInvoiceApprovalConfig'","type":"string"},"businessLanguage":{"description":"When true, explains the role in plain business language (capabilities list) instead of the technical Role->Duty->Privilege chain. Default: false.","type":"boolean","default":false}},"required":["securityObjectName"]}},{"name":"validate_best_practices","description":"Run an in-house best-practice audit on any AOT object (custom or standard), from the indexed source -- NOT the Microsoft BP checker. Rules are this server's own: SEC (security chain), PERF (firstOnly, set-based, N+1), TXN (ttsbegin/ttscommit pairing), ERR (error handling), COC (next() vs super()), QUAL, DATA (EDT on fields), CONV (naming, ISV prefix) and CLOUD. It runs pre-compile and needs no D365 install, so it catches things while the code is being written -- but it does not replace xppbp.exe, whose rule set and monikers are different. For the authoritative Microsoft verdict run run_best_practices_check (xppc.exe -BestPractices, whole model) or run_best_practices_check_scoped (xppbp.exe, one object). Returns violation table: severity (Critical/Warning), rule ID, code snippet, fix instruction. For deep N+1 / row-by-row performance profiling use detect_performance_issues instead. [!] Auto-fixing Critical violations requires D365_CUSTOM_MODEL_PATH (custom code only).","write_action":true,"price_micros":0,"input_schema":{"type":"object","properties":{"objectName":{"description":"Object name to validate, e.g. 'SalesTable', 'CustInvoiceJour'","type":"string"},"methodName":{"description":"Optional: specific method to validate. Validates all methods if not provided.","type":["string","null"],"default":null},"minSeverity":{"description":"Minimum severity: 'Info', 'Warning', 'Critical' (default: 'Warning')","type":"string","default":"Warning"}},"required":["objectName"]}},{"name":"validate_object_naming","description":"WHEN: developer needs to check that a proposed object name follows D365 + ISV naming conventions, is unique against the indexed KB, and does not collide with a reserved or standard prefix. Triggers: 'is this a valid name', 'check naming', 'name conflict', 'valider le nommage'. Cloud-safe: KB read only, no writes.","write_action":false,"price_micros":0,"input_schema":{"type":"object","properties":{"proposedName":{"description":"Proposed name, e.g. 'ALMSalesLine.Extension', 'ALMCustomerTable', 'SalesLineALM_Extension'.","type":"string"},"aotType":{"description":"AOT type the name will live in: AxClass, AxTable, AxForm, AxEdt, AxEnum, AxTableExtension, AxFormExtension, AxClassExtension, etc.","type":"string"},"isvPrefix":{"description":"ISV prefix you must use, e.g. 'ALM'. Required for all custom objects.","type":"string"}},"required":["proposedName","aotType","isvPrefix"]}}],"scan":{"score":81,"grade":"B","scanned_at":"2026-11-01T22:10:57.094Z","report":{"scannerVersion":"0.1.10","scannedAt":"2026-11-01T22:10:57.525Z","components":{"code":{"score":25,"max":25,"notes":["3 source files scanned"]},"reliability":{"score":20,"max":20,"notes":["remote reachable in 1118ms"]},"poisoning":{"score":13,"max":15,"notes":["104 tool descriptions checked"]},"auth":{"score":3,"max":15,"notes":["open endpoint exposes 16 write-action tools with no auth"]},"maintenance":{"score":12,"max":15,"notes":["last push 59 days ago"]},"identity":{"score":8,"max":10,"notes":["registry namespace matches repository owner","GitHub account older than a year"]}},"findings":[{"id":"auth.open-write","severity":"high","component":"auth","title":"Write-action tools reachable without authentication"},{"id":"poison.long-description","severity":"low","component":"poisoning","title":"Unusually long tool description (over 2,000 characters)","evidence":"tool create_aot_object: … Generate a complete, ready-to-deploy D365 F&O AOT XML scaffold for any object type. Returns the XML + the correct file path inside the model -- the calling client (VS Extension, Cursor, Copilot Chat) is responsible for writing the result to disk. This tool is fully read-only on the server: it never writes to the filesystem, never mutates external state, and is safe to expose from the cloud MCP. When the knowledge base is available the scaffold is auto-enriched with real metadata (existing field EDTs, related-table validation, auto-detected grid fields, etc.). Supported aotType values ---------------------------------------------- AxTable . AxClass . AxForm . AxEnum AxEdt . AxView . AxQuery . AxDataEntityView AxMenuItemDisplay . AxMenuItemAction . AxMenuItemOutput AxSecurityPrivilege . AxSecurityDuty . AxSecurityRole . AxSecurityPolicy AxReport . AxFormExtension . AxTableExtension . AxClassExtension AxEnumExtension . AxEdtExtension . AxQueryExtension . AxWorkflow Common options (all types) -------------------------------------------- label - human-readable label shown in the UI developerDoc - developer documentation string (tables/classes) AxTable -------------------------------------------------------------------------- tableGroup - Main | WorksheetHeader | WorksheetLine | Transaction | Parameter | Group cacheLookup - None | Found | FoundAndEmpty | NotInTTS | EntireTable fields - csv \"Name:Type[:EDT[:Label[:mandatory]]]\" Types: String Int Int64 Real Date DateTime Enum Container Guid indexes - csv \"IndexName:field1+field2[:unique|:alternatekey]\" relations - csv \"RelName:RelatedTable:Field:RelatedField\" titleField1/2 - field names for the lookup title createdBy / modifiedBy - true | false (default true) generateFind / generateExist / generateValidateWrite / generateInitValue - true | false AxClass -------------------------------------------------------------------------- extends - base class name implements - csv of interfaces abstract / final - true | false pattern - SysOperation | RunBase | Service | EventHandler | none (default) methods - csv of additional method names to stub AxForm ---------------------------------------------------------------------------- dataSourceTable - primary data-source table name pattern - SimpleList | DetailsTransaction | DetailsMaster | ListPage | Dialog gridFields - csv of field names for the grid (auto-detected from KB if omitted) detailFields - csv of field names for the detail group methods - csv of form method names to stub AxEnum ---------------------------------------------------------------------------- style - Ordinary | ComboBox | Radio | CheckBox values - csv \"Name[:Label[:intValue]]\" e.g. \"Draft:Draft:0,Posted:Posted:1\" AxEdt ----------------------------------------------------------------------------- extends - base EDT (e.g. Name, Description, Amount) stringSize - integer enumType - base enum for enum EDTs referenceTable - table that provides the lookup AxView ---------------------------------------------------------------------------- dataSources - csv \"Table[:Alias]\" fields - csv \"DataSource.Field[:Alias]\" AxQuery ------------------------------------------------------------------------- dataSources - csv \"Table[:Alias[:JoinMode]]\" AxDataEntityView ----------------------------------------------------------- primaryTable - root table joinTables - csv of additional tables publicEntityName - OData collection name (pluralised entity name) isPublic - true | false (default true) fields - csv \"Table.Field[:PublicName]\" (auto-detected from KB if omitted) AxMenuItemDisplay / Action / Output ------------------------------------------ objectName - target form / class / report name runOn - Server | Client | Called from (default Server) helpText - tooltip string AxSecurityPrivilege ----------------------------------------------------------- entryPoints - csv \"MenuItemName[:ObjectType[:Grant]]\" ObjectType: MenuItemDisplay | MenuItemAction | MenuItemOutput Grant: NoAccess | Read | Update | Create | Delete AxSecurityDuty --------------------------------------------------------------------- privileges - csv of privilege names to include AxSecurityRole ---------------------------------------------------------------------- duties - csv of duty names privileges - csv of privilege names (direct assignment -- avoid if possible) AxReport ------------------------------------------------------------------------- query- AxQuery name driving the dataset dataSourceTable - alternative: direct table name (if no query) AxFormExtension ----------------------------------------------------------------- baseForm - name of the standard form to extend fields - csv \"ControlName[:EDT]\" AxTableExtension --------------------------------------------------------------------- baseTable - name of the standard table to extend fields - csv \"Name:Type[:EDT[:Label[:mandatory]]]\" indexes - csv \"IndexName:field1+field2[:unique|:alternatekey]\" AxClassExtension (Chain of Command) ------------------------------------------- baseClass - name of the standard class/table/form to wrap baseType - class | table | form (default class) methods - csv of method names to wrap with CoC AxEnumExtension --------------------------------------------------------------- baseEnum - name of the standard enum to extend values - csv \"Name[:Label[:intValue]]\" IMPORTANT: start from value 10 or higher to avoid conflicts with standard values (D365 extension contract) AxEdtExtension ---------------------------------------------------------------- baseEdt - name of the standard EDT to extend stringSize - new StringSize (must be <= base EDT limit; omit to inherit) label - override label for this extension AxQueryExtension -------------------------------------------------------------- baseQuery - name of the standard query to extend dataSources - csv \"Table[:Alias[:JoinMode]]\" (add extra data sources) ranges - csv \"DataSource.Field:value\" (add filter ranges) AxSecurityPolicy (Row Level Security) ---------------------------------------- constrainedTable - primary table this policy restricts query - AxQuery name that defines the allowed rows operation - Select | Update | Create | Delete | Insert (default Select) enabled - true | false (default true) AxWorkflow --------------------------------------------------------------------- category - category name (links to a module/table) documentTable - table the workflow operates on documentMenuItem - menu item that opens the record…"}],"inputs":{"probes":[{"url":"https://api.almxpp.com/mcp","reachable":true,"authRequired":false,"latencyMs":1118,"serverInfo":{"name":"ALMXPPMCP","version":"1.6.548"}}],"packages":[{"registryType":"npm","identifier":"almxppmcp","version":"1.5.1","found":true,"license":"MIT","hasInstallScripts":false,"dependencyCount":0,"publishedAt":"2026-08-21T13:00:41.801Z","repositoryUrl":"git+https://github.com/alimbenhelal-pro/ALM-XPP-MCP.git","weeklyDownloads":72}],"repo":{"found":true,"owner":"alimbenhelal-pro","repo":"ALM-XPP-MCP","archived":false,"pushedAt":"2026-09-04T08:23:52Z","stars":3,"forks":0,"openIssues":0,"ownerType":"User","ownerAvatarUrl":"https://avatars.githubusercontent.com/u/237858669?v=4","ownerCreatedAt":"2025-10-13T19:50:06Z","license":"MIT"},"icon":{"url":"https://www.almxpp.com/img/logo.png","source":"registry","width":64,"height":64},"presence":{"stars":3,"forks":0,"downloadsWeek":72,"license":"MIT","lastPushAt":"2026-09-04T08:23:52.000Z","score":33}}}},"grade_history":[],"reviews":[]}