Skip to main content
Glama

Find tests

find_tests
Read-onlyIdempotent

List a Playwright or Vitest project's tests matching filters, read from source without running them, to find skipped tests and why, tags, or leftover .only.

Instructions

Lists a project's tests that match filters, read from the test files without running them: each with its id, full name, file and line, state, skip reason and condition, and tags by default. Use it for questions such as which tests are skipped and why, which tests carry @smoke, or where a .only was left in; use test_summary for counts and get_tests for every key of a few ids. Filters combine with AND; a list matches any of its values. fields picks other keys of the test records (id is always there). Answers are paged: follow nextCursor, or narrow the filters. Example: {"states": ["skip"], "withoutReason": true}.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
grepNoKeeps tests whose fullName (describe titles and title joined with " > ") matches this regular expression, ignoring case.
onlyNotrue keeps tests that use .only, or are in a describe that does.
tagsNoKeeps tests with one of these tags, written as in the titles, such as "@smoke".
limitNoThe most items to return.
cursorNonextCursor from the previous answer, for the next page. Keep the other arguments the same.
fieldsNoKeys of each test record to return, besides id. Default: fullName, relativeFilePath, lineStart, state, reason, condition, tags.
statesNoKeeps tests in one of these states.
patternsNoGlobs of the test files, relative to `directory`, such as ["tests/**/*.spec.ts"]. Default: the ones the server was started with.
directoryNoA folder inside the project to scan, relative to its root, such as "packages/web". Default: the root.
frameworkNoThe test runner. Default: the one the server was started with.
withoutReasonNotrue keeps tests that don't run and give no reason.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
hintYes
testsYesOne page of matching tests, in file and line order.
totalYesAll matching items, on every page.
frameworkYes
nextCursorYes
scanErrorsYesProblems of level error in the scan, which may leave tests out of the answer.
frameworkVersionYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.6/5.0
Behavior4/5

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

Annotations already declare readOnly/idempotent/non-destructive, and the description adds value beyond them: tests are parsed from files without executing them, results are paged ('follow nextCursor'), and filters combine with AND while list values OR. It does not discuss performance or scan scope limits, but for a local read-only tool this is solid.

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?

Dense but front-loaded: the core behavior and default return shape come first, then usage triggers, then alternatives, then filter/paging mechanics, then an example. No filler sentences, though the opening sentence packs a lot into one clause chain.

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

Completeness5/5

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

With an output schema present, return values need not be re-explained, and the description covers purpose, filtering semantics, paging, and alternative selection. For an 11-parameter filter tool with 100% schema coverage, an agent has everything needed to call it correctly.

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

Parameters4/5

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

Schema coverage is 100% (baseline 3), and the description still adds semantics the schema does not state: AND combination across filters, OR within a list, that 'fields' picks other record keys and that 'id' is always present, plus a concrete example object. This genuinely reduces invocation error.

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 ('Lists a project's tests that match filters') plus the key behavioral distinction that they are read from files 'without running them', and enumerates the default returned fields. It also explicitly differentiates from siblings: test_summary for counts, get_tests for every key of a few ids.

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?

Gives concrete trigger questions ('which tests are skipped and why', 'which tests carry @smoke', 'where a .only was left in') and names the two alternative tools with the condition that selects each. Nothing is left to inference.

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

Deploy Server

Other Tools