Skip to main content
Glama

fix_best_practice_violations

Read-onlyIdempotent

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.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
objectNameYesObject or method to fix, e.g. 'SalesLine' or 'SalesLine.insert'.
maxViolationsNoMax violations to process (1-20, default 10).
generatePatchesNoGenerate X++ code patches via Ollama (requires OLLAMA_HOST). Default false.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.4/5.0
Behavior5/5

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

Beyond the readOnly/idempotent/destructive hints, it discloses the optional external Ollama dependency, the OLLAMA_HOST requirement, the ALMXPP_SUMMARIZE_MODEL usage, and the fallback to built-in suggestions when Ollama is unavailable. This gives the agent an accurate model of runtime behavior and side effects.

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

Conciseness5/5

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

The description is compact and front-loaded with the key WHEN condition, then states the return value, then covers triggers and optional behavior. Every sentence adds practical information with no filler or redundancy.

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

Completeness4/5

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

With no output schema, the description usefully summarizes what the tool returns: built-in fix suggestions plus optional AI patches. It also covers the external prerequisite and fallback. It could be slightly more explicit about how maxViolations shapes the output, but the description is adequate for correct invocation.

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 description coverage is 100%, so the schema already documents all parameters. The description adds useful reinforcement that generatePatches=true triggers Ollama calls, but otherwise offers no new parameter-level semantics beyond the schema.

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 clearly states what the tool does: returns BP violations with built-in fix suggestions and optionally AI-generated X++ code patches. It explicitly ties itself to validate_best_practices, distinguishing its role as the follow-up fix suggestion step.

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

Usage Guidelines4/5

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

Provides an explicit WHEN: use it when validate_best_practices returned violations. Trigger phrases are included, and the Ollama prerequisite/fallback is described. However, it does not explicitly say when not to use it versus related tools like suggest_refactoring.

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.