Skip to main content
Glama

gograph_deps

Read-onlyIdempotent

List import dependencies of a Go package. Get direct or full transitive imports to audit package layering or map dependency chains before removal.

Instructions

List the import dependencies of a named package. With transitive=false (default), returns only direct imports. With transitive=true, returns the full BFS closure of all transitive imports. Requires .gograph/graph.json — run gograph build . first. Read-only; no side effects. WHEN TO USE: When auditing package layering, understanding what a package pulls in, or mapping import chains before removing a dependency. NOT TO USE: For reverse lookup of who imports the package (use gograph_dependents); for symbol-level call tracing (use gograph_callers/gograph_impact). RETURNS: JSON with direct[] and transitive[] import path arrays; {"found":false} when the package is not in the graph.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
packageYesThe target package path or name to inspect (e.g., 'internal/search', 'internal/cli')
transitiveNoIf true, return the full transitive import closure via Breadth-First Search (BFS)
Behavior5/5

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

Annotations already indicate readOnly, not destructive, idempotent. The description adds valuable context: requires pre-built graph.json, no side effects, and explains transitive BFS behavior. No contradictions.

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?

Well-structured with clear sections, every sentence adds essential information (prerequisite, behavior, usage guidance, return format), no wasted words.

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 missing output schema, the description fully explains return values. Covers all aspects: purpose, parameters, prerequisites, alternatives, behavioral semantics. Complete for an audit tool with many siblings.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema has 100% coverage with descriptions, but the description adds significant value: explains default for transitive, BFS algorithm, and documents return structure (direct/transitive arrays, missing package case).

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 clearly states the tool lists import dependencies of a named package, distinguishes direct vs transitive, and explicitly differentiates from sibling tools like gograph_dependents and gograph_callers.

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?

The description provides explicit WHEN TO USE and NOT TO USE sections, naming specific alternative tools for different tasks, which guides appropriate selection.

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