Skip to main content
Glama

detect_architectural_drift

Identify violations of intended layer boundaries, such as UI importing from data layers, to enforce clean architecture and prevent reverse dependencies.

Instructions

Detect architectural drift — violations of intended layer boundaries (e.g., UI importing from data layer, reverse dependencies).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
repo_pathNoPath or URL to the repository
layers_configNoJSON string defining layer patterns, e.g. {"ui": ["src/components/"], "data": ["src/db/"]}

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.1

TDQS

A3.5/5.0
Behavior3/5

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

No annotations are provided, so the description must carry the behavioral transparency burden. It communicates the core behavior: detecting drift/violations of layer boundaries, and the examples suggest a non-destructive analysis. However, it doesn't disclose potential side effects, prerequisites (e.g., whether a local clone is required), or behavior when inputs are invalid or absent.

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 a single, front-loaded sentence that defines the term with a dash and provides concrete examples. It is concise, contains no filler, and every phrase contributes to understanding. This is an ideal structure for a tool description.

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?

The tool is simple and the schema covers both parameters, but the description leaves notable gaps: it does not clarify what happens when the optional parameters are omitted, how it relates to sibling detection tools, or whether any default configuration applies. These ambiguities prevent the definition from being fully complete for an agent.

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% for both repo_path and layers_config, including an example JSON for layers_config. The description adds no parameter-specific meaning, but because the schema already documents both parameters thoroughly, the baseline of 3 is appropriate.

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 identifies the verb 'Detect' and the resource 'architectural drift', defining it as violations of intended layer boundaries with concrete examples (UI importing from data layer, reverse dependencies). This is a specific and meaningful expression, not a tautology. It does not explicitly contrast with sibling tools like detect_circular_deps, so it does not earn a 5.

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 when to use the tool by providing examples of architectural-drift violations, but it offers no explicit guidance on when to choose this tool over siblings like analyze_coupling or detect_circular_deps. There are no stated exclusions or alternative routing, leaving the agent to infer the appropriate context.

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