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

  1. First observedv1.0.1

TDQS

A4/5.0
Behavior3/5

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

No annotations are provided, so the description carries the burden of disclosing behavior. It clearly states the tool identifies high fan-out and tightly coupled clusters, implying a read-only analysis, but it does not describe output format, repository access behavior, or any limitations.

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 tightly worded sentences deliver purpose and output with no filler. The primary action is front-loaded, and every clause contributes meaning.

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?

For a 2-parameter tool with 100% schema coverage, the description gives enough context for an agent to select and invoke it correctly. It identifies what will be analyzed and what findings will be surfaced, though a bit more detail about the returned report would fully complete the picture.

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 100%, providing baseline 3. The description adds semantic value by explaining 'high fan-out' as 'too many dependencies,' which helps the agent understand the fan_out_threshold parameter's intent beyond the schema's terse label.

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 names a specific verb and resource: 'Analyze coupling metrics across the codebase.' It further identifies concrete outputs (high fan-out modules, tightly coupled clusters), which clearly distinguishes it from siblings like analyze_dead_code and detect_circular_deps.

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 phrase 'across the codebase' implies this is a whole-repository analysis tool and gives some sense of when to use it. However, it does not explicitly state when to prefer this over alternatives such as detect_circular_deps or detect_architectural_drift.

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