Skip to main content
Glama

List available tests

list-tests
Read-onlyIdempotent

Lists Playwright tests in the project with file, line, title, and project details, supports optional filtering, and falls back to a source scan with the reason when setup or config is broken.

Instructions

List the Playwright tests available in the project (file, line, full title, projects), with optional filtering. Uses playwright test --list when Playwright works and falls back to a source scan when the install or config is broken, reporting why.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "list-tests"
  }
}

Input Schema

NameRequiredDescriptionDefault
limitNoMax tests to return (default 500)
configNoplaywright.config path or 1-based index when the project has several configs
filterNoCase-insensitive substring filter on "file › title"
testDirNoRestrict scanning to this directory (inside the project)
projectRootNoProject directory; defaults to the server working directory

Output Schema

NameRequiredDescriptionDefault
okYesfalse when the call failed (see error) or the tests it ran failed
errorNo
testsNo
totalNo
truncatedNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changedv0.13.0
    • removedInput schema / $schema
      Removed value: -"https://json-schema.org/draft/2020-12/schema"
    • removedInput schema / additionalProperties
      Removed value: -{}
  2. Changed2 schema fields changedv0.6.1
    • addedInput schema / additionalProperties
      Added value: +{}
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "$schema": "https://json-schema.org/draft/2020-12/schema",
      +  "additionalProperties": false,
      +  "properties": {
      +    "error": {
      +      "additionalProperties": false,
      +      "properties": {
      +        "hint": {
      +          "type": "string"
      +        },
      +        "kind": {
      +          "type": "string"
      +        },
      +        "message": {
      +          "type": "string"
      +        }
      +      },
      +      "required": [
      +        "kind",
      +        "message"
      +      ],
      +      "type": "object"
      +    },
      +    "ok": {
      +      "description": "false when the call failed (see error) or the tests it ran failed",
      +      "type": "boolean"
      +    },
      +    "tests": {
      +      "items": {
      +        "additionalProperties": false,
      +        "properties": {
      +          "failed": {
      +            "maximum": 9007199254740991,
      +            "minimum": -9007199254740991,
      +            "type": "integer"
      +          },
      +          "file": {
      +            "type": "string"
      +          },
      +          "line": {
      +            "maximum": 9007199254740991,
      +            "minimum": -9007199254740991,
      +            "type": "integer"
      +          },
      +          "passed": {
      +            "maximum": 9007199254740991,
      +            "minimum": -9007199254740991,
      +            "type": "integer"
      +          },
      +          "project": {
      +            "type": "string"
      +          },
      +          "title": {
      +            "type": "string"
      +          },
      +          "verdict": {
      +            "enum": [
      +              "NOT REPRODUCING",
      +              "FLAKY",
      +              "CONSISTENTLY FAILING",
      +              "NO TESTS RAN"
      +            ],
      +            "type": "string"
      +          }
      +        },
      +        "required": [
      +          "file",
      +          "title"
      +        ],
      +        "type": "object"
      +      },
      +      "type": "array"
      +    },
      +    "total": {
      +      "maximum": 9007199254740991,
      +      "minimum": -9007199254740991,
      +      "type": "integer"
      +    },
      +    "truncated": {
      +      "type": "boolean"
      +    }
      +  },
      +  "required": [
      +    "ok"
      +  ],
      +  "type": "object"
      +}
  3. First observedv0.3.2

TDQS

A4/5.0
Behavior4/5

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

Annotations already declare readOnlyHint, idempotentHint and openWorldHint=false, so the description's real contribution is the execution strategy: it prefers `playwright test --list` and falls back to a source scan when install or config is broken, reporting the reason. That is meaningful context an agent needs to interpret results, though it stops short of saying whether fallback results are lower fidelity (e.g., missing line numbers or project data).

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?

Two sentences, zero filler, and the core purpose plus returned fields are front-loaded before the fallback caveat. Every clause carries information the agent cannot get from structured fields alone.

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?

An output schema exists, so return-shape explanation is unnecessary, and the description covers the non-obvious dual-mode behavior. The remaining gap is minor: it doesn't warn that source-scan results may be incomplete or differ in shape from --list output, which matters for a tool whose reliability varies by environment.

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% and each parameter carries its own explanation (limit default 500, config path-or-index, filter semantics, testDir, projectRoot), so the schema does the work. The description only adds the generic phrase "with optional filtering" and no syntax or interaction details beyond what is already documented.

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 ("List the Playwright tests available in the project") and enumerates the returned fields (file, line, full title, projects), which clearly separates it from siblings like run-test, generate-e2e-test, and audit-tests. An agent can identify this as the discovery/enumeration tool without opening the schema.

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?

Usage is only implied: the tool's role as the entry point before run-test or audit-tests is inferable but never stated. There is no explicit "use this when..." nor any exclusion naming a sibling (e.g., audit-tests or analyze-history), leaving the agent to reason about routing on its own.

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