gograph_deps
Identify direct or transitive import dependencies of a Go package for layering audits, and optionally generate Mermaid diagrams.
Instructions
List the import dependencies of a named package. With transitive=false (default), returns direct imports; true returns the BFS closure. 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.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"package": "<package>"
},
"name": "gograph_deps"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| root | No | Absolute path of your checkout or worktree (alias cwd). | |
| 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') | |
| intention | No | Rationale; required with an active session. | |
| session_id | No | Session from session_create; omit for none. | |
| transitive | No | If true, return the full transitive import closure via Breadth-First Search (BFS) |