gograph_deps
List a Go package's import dependencies, returning direct imports or the full transitive closure via BFS. Audit package layering and structure.
Instructions
List the import dependencies of a named package. With transitive=false (default), returns direct imports; true returns the BFS closure. The MCP server refreshes source analysis before the call. Read-only; no side effects. WHEN TO USE: When auditing package layering. NOT TO USE: For reverse lookup (use gograph_dependents). RETURNS: direct[] and transitive[] arrays; with mermaid=true, Mermaid flowchart text; found:false when absent.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| mermaid | No | Return Mermaid flowchart text instead of structured JSON | |
| package | Yes | The target package path or name to inspect (e.g., 'internal/search', 'internal/cli') | |
| transitive | No | If true, return the full transitive import closure via Breadth-First Search (BFS) |