Skip to main content
Glama

find_tests

Locate test classes and methods in Java projects using JUnit 4, JUnit 5, or TestNG annotations to identify testing components.

Instructions

Find test classes and methods in the project.

USAGE: find_tests() OUTPUT: List of test classes with their test methods

Supports:

  • JUnit 4 (@Test, @Before, @After, etc.)

  • JUnit 5 (@Test, @BeforeEach, @AfterEach, etc.)

  • TestNG annotations

Requires load_project to be called first.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
includeDisabledNoInclude disabled/ignored tests (default false)
patternNoFilter test classes by name pattern (glob)
Behavior3/5

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

With no annotations provided, the description carries the full burden. It discloses that the tool outputs 'List of test classes with their test methods' and supports specific testing frameworks (JUnit 4, JUnit 5, TestNG), which adds useful behavioral context. However, it doesn't mention performance aspects, error handling, or whether it's read-only (implied by 'Find' but not explicit), leaving some gaps in transparency.

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

Conciseness4/5

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

The description is well-structured with clear sections (purpose, usage, output, supports, requires) and uses bullet points for readability. It's appropriately sized for the tool's complexity, with no redundant information. However, the 'USAGE: find_tests()' line is slightly redundant with the tool name, preventing a perfect score.

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 the tool's moderate complexity (2 parameters, no output schema, no annotations), the description is fairly complete. It covers purpose, output format, supported frameworks, and prerequisites. However, without an output schema, it could benefit from more detail on the return structure (e.g., format of the list), and it doesn't address potential limitations or errors.

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 fully documents the two parameters ('includeDisabled' and 'pattern'). The description doesn't add any parameter-specific information beyond what the schema provides (e.g., no examples of pattern usage or details on disabled tests). This meets the baseline of 3, as the schema does the heavy lifting.

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

Purpose4/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 test classes and methods in the project.' It specifies the verb ('Find') and resource ('test classes and methods'), making it distinct from siblings like 'find_references' or 'find_unused_code'. However, it doesn't explicitly differentiate from similar tools like 'find_annotation_usages' or 'find_method_references', which could also involve test-related searches, so it doesn't reach a perfect score.

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

Usage Guidelines4/5

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

The description provides clear context for usage: 'Requires load_project to be called first.' This is a specific prerequisite that helps the agent know when to use this tool. However, it doesn't mention alternatives or when not to use it (e.g., vs. 'search_symbols' for general symbol searches), so it lacks explicit exclusions or comparisons to siblings.

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