Skip to main content
Glama

gograph_coupling

Read-onlyIdempotent

Reports fan-in, fan-out, and instability per Go package to evaluate package isolation. Use to identify tightly coupled packages and improve modularity.

Instructions

Report fan-in (Ca), fan-out (Ce), and instability I=Ce/(Ca+Ce) per package. The MCP server refreshes source analysis before the call. Read-only; no side effects. package filters by substring; include_stdlib and internal_only control scope. WHEN TO USE: To evaluate package isolation. RETURNS: Package coupling records; with mermaid=true, Mermaid flowchart text.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
mermaidNoReturn Mermaid flowchart text instead of structured JSON
packageNoOptional package name substring to filter results
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.
include_stdlibNoInclude standard-library packages in the report. Default false — users asking 'how coupled is my code?' rarely care about stdlib coupling.
Behavior4/5

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

Annotations already declare readOnlyHint=true, idempotentHint=true, and destructiveHint=false, and the description adds 'Read-only; no side effects' which is consistent. It also discloses that the server refreshes source analysis before the call and mentions mermaid output behavior, providing extra behavioral context beyond the annotations.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is well-structured with labeled sections for WHEN TO USE and RETURNS, and it stays compact. It includes a small redundancy ('Read-only; no side effects' duplicates annotations) but overall every sentence contributes 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?

There is no output schema, so the description compensates by stating that returns are 'Package coupling records' and that Mermaid flowchart text is returned when mermaid=true. The metrics are already explained in the first sentence, making the return type sufficiently clear, though more detail on record fields or sorting would improve completeness.

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% with descriptive text for every parameter, so the baseline is 3. The description adds a brief restatement ('package filters by substring; include_stdlib and internal_only control scope') but does not meaningfully clarify parameter semantics beyond what the schema already provides.

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 opens with a specific verb ('Report') and precisely names the metrics: fan-in (Ca), fan-out (Ce), and instability I=Ce/(Ca+Ce) per package. This clearly distinguishes gograph_coupling from sibling tools like gograph_deps or gograph_imports, which focus on different aspects of dependencies.

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

Usage Guidelines4/5

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

An explicit 'WHEN TO USE' section states 'To evaluate package isolation,' giving a clear and actionable use case. It does not name alternative tools or conditions when not to use it, so it falls short of the full explicit-exclusion bar.

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