gograph_imports
Find all files and packages that import a given package by exact import path. Ideal for tracing usage before removing or replacing a dependency.
Instructions
Find all files and packages in the codebase that import a specific package by its exact import path. 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: 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.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| package | Yes | The exact import path of the target package to trace imports for (e.g., 'github.com/redis/go-redis') |