analyze_al_code
Analyze AL code files to identify performance, quality, and security issues. Validate compliance and receive actionable fix suggestions for Business Central development.
Instructions
Analyze AL code files in a workspace or specific files. IMPORTANT: Use workspace_path or file_path parameters - the MCP reads files directly. Do NOT pass code content unless you have inline code that is not in a file.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| workspace_path | No | PREFERRED: Absolute path to workspace root (e.g., "C:/Projects/MyApp"). The MCP scans for all .al files automatically. | |
| file_path | No | Absolute path to a single .al file (e.g., "C:/Projects/MyApp/src/Codeunit.al"). The MCP reads the file directly. | |
| file_paths | No | Array of absolute .al file paths to analyze. | |
| code | No | DEPRECATED: Only use for inline code snippets not in files. Never pass "workspace" or file paths as code - use workspace_path or file_path instead. | |
| analysis_type | No | Type of analysis to perform | comprehensive |
| operation | No | Analysis operation mode: "analyze" (conversational), "validate" (compliance check + auto-fixes), "suggest_fixes" (code transformations) | analyze |
| bc_version | No | Business Central version for version-specific analysis | |
| suggest_workflows | No | Include workflow recommendations based on analysis |