Skip to main content
Glama

list_tests

Collects test IDs without executing tests, separates collection errors from real failures, and lets you filter tests or select exact cases for later runs.

Instructions

List the tests without running them (collect-only). Returns ids (max 500) and any collection errors (import errors in test modules or conftest.py), reported separately.

filter: pytest -k expression / unittest name pattern / substring of a jest or vitest file name. For jest and vitest only test FILES can be listed. Use the ids as run_tests selectors and as flaky_check / explain_failure test_id.

Input Schema

NameRequiredDescriptionDefault
pathNo.
filterNo
pythonNo
runnerNo
timeoutNo
selectorNo

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.9/5.0
Behavior4/5

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

With no annotations, the description carries the full burden and does real work: nothing is executed, output is capped at 500 ids, and collection errors (import errors in test modules or conftest.py) are reported separately rather than as failures. It leaves timeout behavior and failure modes on bad paths unexplained.

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?

Front-loaded with the collect-only distinction and the return shape, then a compact block on filter and consumer wiring. Dense but every sentence contributes; no marketing filler.

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?

The existence of an output schema reduces the need to describe return values, and what's said about ids and errors is adequate. But for a six-parameter tool with zero schema descriptions and no annotations, the unexplained `selector`, `runner` and `timeout` leave the definition short of what an agent needs.

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?

Schema description coverage is 0% across six parameters, yet only `filter` is explained (per-runner semantics: -k expression, unittest name pattern, file-name substring). path, runner, python, timeout and especially `selector` receive no meaning at all beyond their bare titles.

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?

States a specific verb and resource plus the crucial negative scope: "List the tests without running them (collect-only)". That single clause separates it unambiguously from the sibling run_tests, and it also names what comes back (ids, collection errors).

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?

Gives forward routing explicitly: use the returned ids as run_tests selectors and as flaky_check / explain_failure test_id, and warns that for jest/vitest only test FILES can be listed. It stops short of saying when to call detect_runner first or when a list is unnecessary.

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