Skip to main content
Glama

module_risk

Scan a Magento project's custom code for coding-standard violations and static-analysis issues using its own phpcs and phpstan configuration, reporting when scans cannot run.

Instructions

Scans the given Magento project's custom code for coding-standard violations and static-analysis issues by shelling out to the project's own vendor/bin/phpcs and vendor/bin/phpstan. phpcs: if the project has its own phpcs.xml(.dist), that configuration is used as-is; otherwise falls back to the Magento2 standard on app/code. phpstan: only run if the project has its own phpstan.neon(.dist) — unlike phpcs there is no safe generic fallback (no paths/level/extensions to guess), so it is skipped rather than guessing. Each tool reports scanned=false with a reason when it can't run, instead of staying silent.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.9/5.0
Behavior5/5

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

With no annotations, the description carries the full burden and delivers: it shells out to the project's own vendor/bin tools, phpcs uses phpcs.xml(.dist) as-is or falls back to the Magento2 standard on app/code, phpstan runs only with a project phpstan.neon(.dist) and is skipped rather than guessed, and failures surface as scanned=false with a reason instead of silence. This is exactly the behavioral disclosure an agent needs.

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 purpose is front-loaded in the first clause, and the subsequent sentences each add distinct behavioral detail (phpcs config, phpstan skip logic, scanned=false reporting). It is on the long side, but nearly every sentence earns its place.

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?

An output schema exists, so return-value explanation is not required, and the description still notes the scanned=false signaling. For a single-parameter tool with rich behavioral disclosure, coverage is strong; the only real gap is guidance on when to prefer it over sibling tools.

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 0% and the single 'path' parameter has no description in the schema. The phrase 'the given Magento project's custom code' implies path points at a project root, giving partial meaning, but it never states the expected format (absolute vs relative, project root vs module dir). Partial compensation only.

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?

States a specific verb and resource: 'Scans the given Magento project's custom code for coding-standard violations and static-analysis issues.' This is clearly distinguishable from the update/status/notes-oriented siblings, and it names the underlying engines (phpcs/phpstan) so the agent knows the kind of output to expect.

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

Usage Guidelines2/5

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

The description is entirely about internal mechanics (config resolution, fallbacks, skip behavior) and never says when to reach for this tool versus project_status, check_updates, or upgrade_plan. Usage is only implicit from the tool's subject matter, with no conditions or exclusions stated.

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