gograph_imports
Find all files and packages that import a specific package by exact import path to isolate library usage before removal or replacement.
Instructions
Find all files and packages in the codebase that import a specific package by its exact import path. WHEN TO USE: When isolating usage of a third-party library before removing or replacing it, or tracing where an internal package is consumed from outside. NOT TO USE: For a package's own outgoing imports (use gograph_deps); for reverse package-level dependency lookup by short name (use gograph_dependents). RETURNS: File paths and package names of all importers; empty when the package is imported nowhere.
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_imports"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| root | No | Absolute path of your checkout or worktree (alias cwd). | |
| limit | No | Rows per page. | |
| cursor | No | next_cursor from the previous page. | |
| package | Yes | The exact import path of the target package to trace imports for (e.g., 'github.com/redis/go-redis') | |
| intention | No | Rationale; required with an active session. | |
| session_id | No | Session from session_create; omit for none. |