Skip to content

AL MCP: warnings from code cops missing #8243

@matthiasrabus

Description

@matthiasrabus

1. Describe the bug
I'm working with Claude and the AL language MCP. When building the project and fetching the diagnostics, I only get the output of the compiler warnings (AL), not the output of the configured code cops.

2. To Reproduce
Install claude, AL MCP and open a project with multiple warnings.

Claude called the al_compile tool like that:
{ "options": { "enableCodeAnalysis": true, "codeAnalyzers": ["${CodeCop}", "${PerTenantExtensionCop}", "${UICop}"], "maxDiagnosticsPerCompilation": 2500 } }

Then it called al_getdiagnostics:
{ "projectPath": "c:\\pathtomyproject\\app", "limit": 500 }
The behavior is somewhat similar to VS Code. If I build the project, in the output view, I see all warnings from the compiler and all code analyzer tools, but in the problems view, I only see the warnings from the compiler.

3. Expected behavior
I expect the MCP to include the diagnostics from the code cops as well as the problems view in VS code to include the warnings from the code cops.

4. Actual behavior
asking claude for the number of warnings grouped by code, shows only AL warnings

Image

Doing the same in VS code, I get more warnings regarding code cops that are not shown in the MCP.

5. Versions:

  • AL Language: 18.0.2293710
  • Visual Studio Code: current insider build
  • Business Central: current BC28
  • List of Visual Studio Code extensions that you have installed: does not apply for the question
  • Operating System:
    • Windows
    • Linux
    • MacOS

Final Checklist

Please remember to do the following:

  • Search the issue repository to ensure you are reporting a new issue
  • Reproduce the issue after disabling all extensions except the AL Language extension
  • Simplify your code around the issue to better isolate the problem

Metadata

Metadata

Assignees

No one assigned

    Labels

    investigateThe issue requires further investigation to determine if this is a product bug

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions