Skip to main content
Glama

Lint against the framework conventions

lint_against_framework_rules

Validate PHP files for CodeIgniter MVC compliance: strict_types, naming, no queries in controllers, input validation, repository interfaces. Returns structured violations with compliant status.

Instructions

Validates a PHP file of the project against the framework conventions: strict_types, naming, no queries in controllers, input validation and repositories behind an interface. Returns structured violations; compliant=false when there is any error.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
filePathYes
Behavior3/5

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

No annotations are provided, so the description must disclose behavior on its own. It mentions specific checks and the compliant flag, but it does not explicitly state that the tool is read-only or what happens when the file doesn't exist. This is a gap, though the verb 'validates' suggests a non-mutating operation.

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 two sentences long, front-loading the purpose and immediately listing the checked conventions. It ends with the return behavior, which is essential. No unnecessary words.

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

Completeness3/5

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

For a tool with one parameter and no output schema, the description covers the main purpose and provides some return information ('structured violations', 'compliant=false'). However, it doesn't describe the structure of violations or any failure modes, so it's incomplete but not severely lacking.

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 only has one parameter, filePath, with a minLength constraint. The description refers to 'a PHP file of the project', which adds context that the path should point to a PHP file, but it does not further elaborate on path requirements or default behavior. Given the simplicity of the parameter, this is adequate.

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 the tool's purpose: it validates a PHP file against specific framework conventions. The list of conventions (strict_types, naming, no queries in controllers, etc.) distinguishes it from the sibling scaffold and migration tools.

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?

The description implies the tool is for linting existing PHP files, which separates it from the scaffolding tools that generate code. However, it does not explicitly state when to use this versus validate_route or when not to use it, leaving the guidance at an implicit level.

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/X-Gunner/codeigniter-mcp'

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