Skip to main content
Glama

gograph_coupling

Read-onlyIdempotent

Quantify package coupling by reporting fan-in, fan-out, and instability ratio. Identify overly coupled packages and assess architectural isolation.

Instructions

Report fan-in (Ca), fan-out (Ce), and instability ratio (I = Ce/(Ca+Ce)) per package. Instability range [0,1]: 0 = maximally stable, 1 = maximally unstable. Requires .gograph/graph.json — run gograph build . first. Read-only; no side effects. package filters by name substring; include_stdlib adds stdlib (default false); internal_only restricts to this module's packages only. WHEN TO USE: When evaluating package isolation, planning architectural layering, or identifying packages that are too tightly coupled. NOT TO USE: For single-function complexity (use gograph_complexity or gograph_hotspot); for reverse package dependency lookup (use gograph_dependents). RETURNS: Array of package coupling records with Ca, Ce, and instability score; empty when no packages match the filter.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
include_stdlibNoInclude standard-library packages in the report. Default false — users asking 'how coupled is my code?' rarely care about stdlib coupling.
internal_onlyNoRestrict the report to the project's own packages (anything starting with the module path from go.mod). Strictly stronger than excluding stdlib — also excludes third-party deps.
packageNoOptional package name substring to filter results
Behavior5/5

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

Description adds value beyond annotations by detailing prerequisite (.gograph/graph.json and build step), explaining metric ranges, and confirming read-only behavior, which aligns with annotations and provides critical usage context.

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?

Description is a well-structured single paragraph that front-loads core functionality, followed by prerequisites, parameter behavior, and usage guidance. Every sentence adds value with no waste.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Despite no output schema, description clearly states return type (array of coupling records with Ca, Ce, instability) and edge case (empty result). Covers prerequisites, metrics, and alternatives, making it complete for a tool of this complexity.

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%, so baseline is 3. Description adds extra context about default values (include_stdlib default false) and relationships (internal_only stronger than excluding stdlib), justifying a 4.

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 clearly states the tool reports fan-in, fan-out, and instability per package, which is a specific verb+resource. It distinguishes from siblings by naming alternative tools for other use cases (e.g., gograph_complexity, gograph_dependents).

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Explicit WHEN TO USE and NOT TO USE sections provide clear context for selection and exclusion of alternative tools, such as gograph_complexity and gograph_dependents, leaving no ambiguity.

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/ozgurcd/gograph'

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