gograph_diagram
Generate a Mermaid architecture diagram of a Go package dependency graph. Use grouping and depth options for onboarding, architecture reviews, or large monorepos.
Instructions
Refresh source analysis and generate a Mermaid architecture diagram of the package dependency graph. Read-only; no side effects. WHEN TO USE: Onboarding, architecture review, or communicating package structure. Use group_by=module for monorepos and group_by=file for drill-downs. NOT TO USE: For call-graph traversal or single-package focus. RETURNS: Mermaid text; use max_depth or coarser grouping for large graphs.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "gograph_diagram"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| root | No | Absolute path of the checkout you are working in (your cwd or git worktree). Must be this server's repository or one of its git worktrees; the answer then comes from that checkout's own graph. A path elsewhere is refused. Alias: cwd. Omit only when the configured checkout is the one you mean. | |
| group_by | No | Grouping level: 'package' (default), 'module', 'service', or 'file' | |
| intention | No | Technical rationale, required for analytical calls selecting an active session. | |
| max_depth | No | Maximum BFS depth from graph roots (0 = unlimited) | |
| session_id | No | Caller selector returned by session_create. Omission means an independent caller; never inherits server environment or another caller's session. | |
| include_stdlib | No | If true, include Go standard library packages in the diagram |