Skip to main content
Glama

Find Latest Playwright Trace

find_latest_trace
Read-onlyIdempotent

Recursively searches test-results/ and playwright-report/ for a newly created trace.zip, returning its path, size, and timestamp as JSON. Use it to confirm a trace exists before triage.

Instructions

Recursively searches test-results/, playwright-report/, and project subdirectories under baseDir (defaults to cwd) for the newest Playwright trace.zip file. Returns JSON with { found, tracePath, sizeBytes, lastModified }, or { found: false, message } when no trace exists (does not throw on empty results). Use before other tools to verify a trace exists or inspect its timestamp; do not use when you already have a tracePath and want immediate triage (use triage_failure directly).

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": "find_latest_trace"
  }
}

Input Schema

NameRequiredDescriptionDefault
baseDirNoAbsolute or relative base directory to search from (e.g. ./e2e). Defaults to the current working directory.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv1.0.1
    • changedInput schema / properties / baseDir / description
      Previous value: -"Base directory to search from. Defaults to the current working directory."New value: +"Absolute or relative base directory to search from (e.g. ./e2e). Defaults to the current working directory."
  2. Changed1 schema field changedv1.0.0
    • changedInput schema / properties / baseDir / description
      Previous value: -"Base directory to search from. Defaults to current working directory."New value: +"Base directory to search from. Defaults to the current working directory."
  3. First observedv0.1.0

TDQS

A4.7/5.0
Behavior4/5

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

Annotations already declare this is read-only, idempotent, non-destructive, and closed-world. The description adds useful behavior beyond that: it searches specific directory patterns, returns structured JSON, and does not throw when no trace exists, though it does not cover edge cases such as symlink or hidden-directory behavior.

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?

The description is two tight sentences with no wasted wording. The primary purpose is front-loaded, followed immediately by return behavior and the key alternative.

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?

For a one-parameter read-only search tool, the description is complete: it explains search scope, default behavior, return shape, empty-result behavior, and when to use a sibling instead. The absence of an output schema is compensated by the explicit return-value summary.

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%, so the baseDir parameter is already documented. The description still adds meaning by clarifying that the search is recursive across test-results/, playwright-report/, and project subdirectories under baseDir, and that baseDir defaults to cwd.

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 states a specific action and resource: recursively search named Playwright directories under baseDir for the newest trace.zip. It also distinguishes itself from triage_failure by naming the case where that sibling is more appropriate.

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?

It gives explicit when-to-use guidance: before other tools to verify a trace exists or inspect its timestamp. It also gives an explicit exclusion and alternative: when you already have a tracePath and want immediate triage, use triage_failure directly.

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