Skip to main content
Glama

suggest_imports

Find import statements for Java types by searching project sources, JDK, and libraries. Enter a type name to get qualified import candidates sorted by relevance.

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. Results are sorted by relevance (java.util types ranked higher than java.awt, etc.).

Requires load_project to be called first.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
maxResultsNoMaximum candidates to return (default 20)
typeNameYesSimple type name to find imports for (e.g., 'List', 'Map')
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description carries full burden and does well: it explains the search scope ('Searches project sources, JDK, and libraries'), ranking behavior ('Results are sorted by relevance'), and prerequisite ('Requires load_project to be called first'). It doesn't mention rate limits or error conditions, but covers key behavioral aspects.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is well-structured and front-loaded: purpose first, usage example, output format, behavioral details, and prerequisite. Every sentence earns its place with no wasted words, making it easy to scan and understand quickly.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given 2 parameters with full schema coverage, no annotations, and no output schema, the description does well: it explains purpose, usage, behavior, and prerequisite. It could improve by describing the output format more explicitly (e.g., structure of the list), but covers most context needed for this tool's complexity.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the schema already documents both parameters well. The description adds minimal value beyond schema: it provides an example 'typeName="List"' and mentions 'maxResults' indirectly via 'Maximum candidates to return' in the schema. Baseline 3 is appropriate when schema does the heavy lifting.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's purpose: 'Find import candidates for unresolved type' (specific verb+resource). It distinguishes from siblings by focusing on import resolution rather than analysis, refactoring, or navigation tasks listed among siblings.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides explicit usage guidance: 'Requires load_project to be called first' (prerequisite), and includes a usage example 'USAGE: suggest_imports(typeName="List")' showing when to use it. It implicitly distinguishes from 'organize_imports' and 'search_symbols' by focusing on unresolved types.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/pzalutski-pixel/javalens-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server