Skip to main content
Glama
UrbanDiver

Local DeepWiki MCP Server

by UrbanDiver

get_coupling_metrics

Read-onlyIdempotent

Compute Robert C. Martin coupling metrics (Ca, Ce, I, A, D) for modules to identify those too concrete-and-stable or too abstract-and-unstable.

Instructions

Compute Robert C. Martin package-level coupling metrics per module: afferent coupling (Ca), efferent coupling (Ce), instability (I = Ce/(Ca+Ce)), abstractness (A = abstract_classes/total_classes), and distance from the main sequence (D = |A+I-1|). Modules with high distance are either too concrete-and-stable or too abstract-and-unstable.

No prior indexing required.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
repo_pathYesPath to the repository
module_filterNoRestrict to modules whose label starts with this prefix
top_nNoLimit output to the top N modules sorted by distance from the main sequence (default: 20, max: 500)
include_leavesNoInclude modules with zero efferent coupling (default: false, excludes pure leaf modules)
summary_onlyNoReturn only stats without individual module metrics (default: false)
exclude_testsNoExclude test modules from metrics (default: true)
Behavior4/5

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

Annotations already indicate readOnlyHint=true and idempotentHint=true. Description adds value by explaining the meaning of 'distance from the main sequence' and confirming no prior indexing needed, enhancing transparency beyond annotations.

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?

Three focused sentences plus a standalone note on indexing. No fluff, metric formulas are front-loaded, and every sentence adds value.

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?

Description lists all computed metrics and provides interpretation of distance. However, since there is no output schema, the return format is not described, but the metrics and purpose are sufficiently clear for a read-only 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 description coverage is 100%, so parameters are well-documented in schema. Description does not add extra meaning to parameters beyond what schema provides, thus baseline score of 3.

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?

Description explicitly states it computes Robert C. Martin package-level coupling metrics and lists specific metrics (Ca, Ce, I, A, D). This distinguishes it from sibling tools like get_complexity_metrics or get_architecture_health.

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?

Description mentions 'No prior indexing required' but does not specify when to use this tool versus alternatives. No explicit exclusion or comparison to sibling tools, though the metric focus implies use for coupling analysis.

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

Install Server

Other Tools

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/UrbanDiver/local-deepwiki-mcp'

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