suggest_imports
Find import candidates for an unresolved Java type by searching project sources, JDK, and libraries, then return ranked fully qualified names.
Instructions
Find import candidates for unresolved type.
USAGE: suggest_imports(typeName="List") OUTPUT: List of matching types with fully qualified names and relevance
Searches project sources, JDK, and libraries for types matching the simple name that the project can import: a type in the default package, or in a package its module does not export to the project (such as the JDK's internal packages), is never a candidate; the package's name never decides. Every candidate is ranked by relevance (java.util types ranked higher than java.awt, etc.; equally relevant ones by fully qualified name), then the first maxResults are returned. totalCandidates and meta.totalCount count every candidate; meta.truncated is true when candidates are left out.
Requires load_project to be called first.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| typeName | Yes | Simple type name to find imports for (e.g., 'List', 'Map') | |
| maxResults | No | Maximum candidates to return (default 20) |