Skip to main content
Glama
JeremyVyska
by JeremyVyska

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

TableJSON Schema
NameRequiredDescriptionDefault
workspace_pathNoPREFERRED: Absolute path to workspace root (e.g., "C:/Projects/MyApp"). The MCP scans for all .al files automatically.
file_pathNoAbsolute path to a single .al file (e.g., "C:/Projects/MyApp/src/Codeunit.al"). The MCP reads the file directly.
file_pathsNoArray of absolute .al file paths to analyze.
codeNoDEPRECATED: 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_typeNoType of analysis to performcomprehensive
operationNoAnalysis operation mode: "analyze" (conversational), "validate" (compliance check + auto-fixes), "suggest_fixes" (code transformations)analyze
bc_versionNoBusiness Central version for version-specific analysis
suggest_workflowsNoInclude workflow recommendations based on analysis
Behavior3/5

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

With no annotations, the description carries full burden. It discloses that the MCP reads files directly, which is a key behavioral trait. However, it does not discuss permissions, side effects, or return format, limiting transparency.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is concise with two sentences: one for purpose and one for critical usage warning. It is well-structured and front-loaded, though it could be slightly more compact.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Despite 100% schema coverage, the description is incomplete for a complex tool with 8 parameters and no output schema. It lacks guidance on choosing analysis_type, operation, or other options, leaving the agent underinformed.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so baseline is 3. The description adds general guidance on using workspace_path vs file_path but does not significantly elaborate on individual parameters beyond what the schema provides.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool analyzes AL code files, which is a specific verb and resource. It distinguishes from siblings by emphasizing file-reading capability, though it doesn't explicitly contrast with related tools like ask_bc_expert.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description includes usage guidance about using workspace_path or file_path and warns against passing code content, implying when to use this tool for local file analysis. However, it does not explicitly state when to prefer this over alternatives or provide exclusions.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

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

curl -X GET 'https://glama.ai/api/mcp/v1/servers/JeremyVyska/bc-code-intelligence-mcp'

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