Skip to main content
Glama

find_tests

Retrieve test classes and methods from a Java project, supporting JUnit 4/5 and TestNG annotations. Optionally filter by name or include disabled tests.

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?

No annotations are provided, so the description must disclose behavior. It states the tool 'finds' and 'lists', implying a read-only operation, and lists supported frameworks. However, it does not explicitly confirm no side effects, performance considerations, or error conditions.

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 brief and front-loaded with the main purpose. However, the 'USAGE' line is partially inaccurate and includes unnecessary formatting. It could be more concise without losing clarity.

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

Completeness3/5

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

Given no output schema, the description explains the return value (list of test classes with methods) and supported frameworks. It lacks details on output structure, error handling, and dependency on load_project. The parameter omission reduces completeness.

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

Parameters2/5

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

The input schema has 100% description coverage for both parameters (includeDisabled and pattern). However, the description misleadingly shows 'USAGE: find_tests()' with no parameters, contradicting the schema. It adds no additional meaning or usage guidance for the parameters.

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 finds test classes and methods, specifying supported frameworks (JUnit 4, JUnit 5, TestNG). It distinguishes itself from sibling 'find_' tools by focusing on tests, with no other sibling serving the same purpose.

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

Usage Guidelines3/5

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

The description mentions a prerequisite (load_project must be called first), which provides some usage context. However, it does not explain when to use this tool versus alternatives or when not to use it.

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