Skip to main content
Glama

validate_module_architecture

Validate module boundaries and conventions (layer, screen, DI) against an approved architecture profile via read-only static inspection; fails fast on invalid structure.

Instructions

Validate module boundaries using the approved architecture profile.

iMESPro also checks its layer, screen and DI conventions. External layout/DI needs Client inspection.

Strictly READ-ONLY: Performs static inspection of the module directory without writing files.
Zero Mock Data: Fails fast if module directory does not exist or has invalid structure.

Args:
    module_path: Path to the feature module directory (e.g. lib/modules/<feature>).
    feature_name: Name of the feature module (optional, inferred from path if omitted).
    architecture_profile: Approved mode: imespro, external-structured, or external-standard.
        Omitted values retain legacy iMESPro checks. External layout/DI checks remain UNVERIFIED.

Returns:
    Dictionary containing validation status, gate_status (PASSED/FAILED), violations, and checked rules.

Input Schema

NameRequiredDescriptionDefault
module_pathNo
feature_nameNo
architecture_profileNoimespro

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv3.3.1

TDQS

A3.9/5.0
Behavior4/5

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

With no annotations, the description carries the full load and does so well: it declares strictly read-only static inspection with no file writes, fails fast on missing/invalid directories, and discloses that external layout/DI results remain UNVERIFIED. It stops short of stating permissions, side effects of the gate, or cost, so not a 5.

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 key contract (what it validates, read-only, fail-fast) is front-loaded in the first lines, and the Args/Returns blocks are compact with no filler. Every line carries actionable information for an agent.

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 the Returns block is redundant but harmless; combined with the Args documentation and the fail-fast/UNVERIFIED caveats, an agent has enough to invoke it correctly. The only gap is which profile to pick when the project is external.

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

Parameters4/5

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

Schema coverage is 0%, so the description must compensate and largely does: it documents all three params, gives a path example, explains feature_name is inferred when omitted, and supplies the enum values for architecture_profile plus the consequence of omission. It does not clarify the difference between external-structured and external-standard.

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 ("Validate module boundaries") scoped to an approved architecture profile, and names the additional checks it runs (layer, screen, DI conventions). It is clear enough to distinguish from get_project_structure, though it never explicitly contrasts itself with the similarly named sibling validate_architecture_code.

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?

"External layout/DI needs Client inspection" implies a scope limit and "Omitted values retain legacy iMESPro checks" implies default behavior, so usage is inferable. But there is no explicit "use this when / use X instead" guidance, and no mention of when to prefer validate_architecture_code.

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