Skip to main content
Glama

validate_best_practices

Read-onlyIdempotent

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

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
methodNameNoOptional: specific method to validate. Validates all methods if not provided.
objectNameYesObject name to validate, e.g. 'SalesTable', 'CustInvoiceJour'
minSeverityNoMinimum severity: 'Info', 'Warning', 'Critical' (default: 'Warning')Warning

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.6/5.0
Behavior5/5

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

Annotations already mark it read-only, non-destructive, and idempotent. The description adds substantial behavioral context: it operates on the indexed source, runs pre-compile, does not invoke xppbp.exe, and returns a structured violation table. It also discloses the environment variable requirement for auto-fixing, which is beyond what the annotations provide.

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 front-loaded with the core purpose and avoids filler. It is denser than necessary, with rule categories and multiple alternatives packed in, but every sentence still contributes useful routing or behavioral information.

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

Completeness5/5

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

Given the tool has no output schema, the description explicitly describes the return format: severity, rule ID, code snippet, and fix instruction. It also covers prerequisites, constraints, and alternatives, giving an agent everything needed to select and invoke the tool correctly.

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?

The schema description coverage is 100%, so all three parameters are already documented in the schema. The description contributes scope and result details but does not add parameter-level semantics, so the baseline score of 3 is appropriate.

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

Purpose5/5

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

The description begins with a specific verb and resource: 'Run an in-house best-practice audit on any AOT object (custom or standard), from the indexed source.' It also explicitly distinguishes itself from the Microsoft BP checker, which makes the tool's purpose unambiguous.

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

Usage Guidelines5/5

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

The description provides clear usage context: it runs pre-compile, requires no D365 install, and is meant for catching issues during development. It explicitly states when not to use it and names alternatives for the Microsoft verdict and for deep performance profiling.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.