gograph_orphans
Find unreachable functions and methods not called from runtime, test, HTTP, or external roots. Use during code cleanup and dead-code audits to locate orphan symbols.
Instructions
Find functions and methods unreachable from runtime roots (main/init), test/benchmark/fuzz roots, HTTP route handlers, and eligible externally callable exports; exports confined under internal/ are not roots. Uses full BFS reachability. The MCP server checks freshness before this call and refreshes in the current requested analysis mode; precise and precise_fallback graphs retry CHA/SSA after source changes. Read-only; no side effects. WHEN TO USE: During code cleanup or dead-code audits. NOT TO USE: For checking one symbol's usages (use gograph_usages or gograph_callers). RETURNS: Orphan symbols with package paths and file locations; empty means no unreachable code was detected.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | Maximum rows per page; the byte budget may return fewer. | |
| cursor | No | Opaque next_cursor for the same graph snapshot and result selection. |