Skip to main content
Glama

Code Audit Phpstan

code_audit_phpstan

Run PHPStan static analysis on Drupal custom modules to find code errors and enforce quality standards before release.

Instructions

Run PHPStan static analysis on Drupal custom modules.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathYes
levelNo
configurationNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

C2.7/5.0
Behavior2/5

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

With no annotations, the description carries the full behavioral burden. It does not say whether PHPStan must be installed/configured, whether the run is read-only, how long it takes, or how issues are surfaced. Only the implied 'analysis' framing hints at a non-destructive read.

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?

A single front-loaded sentence with no filler. It is efficiently worded, though its brevity here shades into under-specification rather than pure tightness.

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?

An output schema exists, so return values needn't be described. However, with no annotations, 0% schema description coverage, and no usage guidance, the definition is too thin for a three-parameter analysis tool whose siblings are numerous and easily confused.

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

Parameters2/5

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

Schema description coverage is 0% and the description compensates for none of the three parameters. The meaning and valid range of 'level' (default 5, presumably 0-9), the format of 'configuration', and the expected shape of 'path' are all left unexplained.

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?

States a specific verb and resource ('Run PHPStan static analysis') and scopes it to 'Drupal custom modules'. An agent knows what the tool does, but nothing distinguishes it from closely related siblings like code_sniffer, deprecation_scan, or code_quality_report.

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?

There is no when-to-use guidance and no mention of alternatives, despite a crowded field of code-quality siblings. The agent must infer that this applies to PHP analysis versus Twig (theme_lint_twig), deprecations (deprecation_scan), or sniffing (code_sniffer).

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

Deploy Server

Other Tools