Skip to main content
Glama

analyze_coupling

Identifies modules with excessive dependencies and tightly coupled clusters, flagging high fan-out areas to reduce architectural drift.

Instructions

Analyze coupling metrics across the codebase. Identifies modules with high fan-out (too many dependencies) and tightly coupled clusters.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
repo_pathNoPath or URL to the repository
fan_out_thresholdNoFan-out threshold for flagging modules

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.1

TDQS

A3.7/5.0
Behavior3/5

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

No annotations are present, so the description carries full transparency burden. It discloses what the tool identifies (high fan-out modules, tightly coupled clusters) but does not state whether it modifies anything, what permissions are needed, or how results are returned. The verb 'Analyze' suggests a read-only operation, but this is inferred rather than explicit.

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 sentences, front-loaded with the core action and followed by concrete outputs. No filler or redundant phrases. The structure is easy to scan.

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 description covers the tool's purpose and key concepts but lacks explicit output formatting, usage context relative to siblings, and side-effect disclosure. Since there is no output schema, agents would benefit from a sentence describing the return value. Comparable to a minimum-viable description for a simple analysis tool.

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 coverage is 100%; both repo_path and fan_out_threshold have descriptions in the input schema. The tool description adds contextual meaning (e.g., 'high fan-out' clarifies the threshold concept) but doesn't introduce new parameter semantics. Baseline 3 is appropriate.

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 distinct analysis task—coupling metrics—with concrete outputs: high fan-out modules and tightly coupled clusters. This differentiates it from siblings like detect_circular_deps (which focuses on cycles) or analyze_dead_code (unused code). A clear verb and resource make the purpose unambiguous.

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 coupling-focused analysis but offers no explicit when-to-use guidance or comparison to sibling analyzer tools. An agent could confuse it with detect_circular_deps or detect_architectural_drift without additional direction. There are no stated prerequisites or exclusions.

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