Skip to main content
Glama

Run PHP_CodeSniffer (PHPCS)

run_phpcs
Idempotent

Checks PHP code for PSR and coding standard violations; automatically fix issues with phpcbf when enabled.

Instructions

PHP_CodeSniffer ile kod stili / PSR ihlallerini raporlar. 'fix' parametresi true ise otomatik düzeltme yapar (phpcbf).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
fixNoOtomatik düzeltme uygula (phpcbf kullanır). Varsayılan: false.
filepathYesTaranacak dosya veya dizin. Örnek: ./src
severityNoMinimum raporlama seviyesi. Varsayılan: warning.warning
standardNoKod stili standardı. Varsayılan: PSR12. Boş bırakılırsa phpcs.xml kullanılır.PSR12
projectPathNoİsteğe bağlı proje kökü (otomatik tespit edilir).
Behavior1/5

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

The description discloses that setting fix=true auto-corrects (modifies files), but annotations declare destructiveHint=false and idempotentHint=true. This is a direct contradiction: modifying files is destructive and potentially not idempotent. The annotation contradiction severely undermines trust.

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?

Two concise sentences, no fluff. The key behavior (report/fix) is front-loaded. Every sentence earns its place.

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 having 5 parameters and no output schema, the description is very brief. It fails to explain return format, error handling, or whether the tool outputs a report or just exit codes. For a code analysis tool, this is insufficient.

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 baseline is 3. The description adds behavior for the 'fix' parameter beyond the schema, but does not elaborate on other parameters like filepath, severity, standard, or projectPath. Minimal extra value.

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 reports PHP coding style/PSR violations and optionally auto-fixes. Verb 'raporlar' (reports) is specific. However, it does not explicitly differentiate from sibling tools like run_phpmd or run_psalm, which have distinct purposes.

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?

Usage is implied (admin wants to check coding style), but no explicit guidance on when to use this tool versus alternatives (e.g., run_phpmd for mess detection). No exclusions or when-not-to-use mentioned.

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/halitartuc/phpustik'

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