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. Dates show when Glama detected each change.

  1. First observedv1.0.1

TDQS

B3.4/5.0
Behavior2/5

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

No annotations are supplied, so the description carries the full burden of behavioral disclosure. It's a detect tool, which hints at read-only behavior, but it never states that explicitly, nor does it describe what the output looks like, whether it mutates anything, or how it uses the configured layers. For an analysis tool with zero annotations, this is insufficient.

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?

One focused sentence with a concrete example. Front-loaded purpose, zero filler.

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?

For a complex analysis tool with no output schema and no annotations, this is thin. It doesn't clarify how layers_config is used, what the agent should pass, what the tool returns, or any prerequisites. With 100% schema coverage, the params are defined, but the tool's behavior and output are left unstated.

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 already covers both parameters at 100%, so baseline 3. The description mentions layer boundaries but doesn't explicitly explain how repo_path and layers_config interact. It adds context but doesn't materially improve on the schema's example.

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 states a specific verb ('Detect') and a specific resource ('architectural drift'), then clarifies the exact nature with concrete examples (UI importing from data layer, reverse dependencies). This clearly distinguishes it from siblings like analyze_dead_code or detect_circular_deps, which target different defect classes.

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 should be used when checking layer-boundary violations, but it never explicitly says when to use it versus the sibling tools (detect_circular_deps, full_health_scan). It gives a clear purpose but no exclusions or conditions that would help an agent choose it over alternatives. It's adequate but not explicit.

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

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/icohangar-ops/codesentinel'

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