Skip to main content
Glama
Batyrkhan-Sk

Frontend Bug Investigator MCP

by Batyrkhan-Sk

Generate Playwright regression test

generate_regression_test
Read-only

Generates a reviewable Playwright TypeScript regression test from a completed investigation, asserting the reported UI symptom's observable behavior with assumptions listed.

Instructions

Generates a Playwright test (TypeScript) from the investigation that asserts the observable behaviour behind the reported symptom. The code is returned for review and is never executed by the server. Assumptions are listed explicitly.

Input Schema

NameRequiredDescriptionDefault
testNameNo
investigationIdYesId returned by start_investigation

Output Schema

NameRequiredDescriptionDefault
codeYes
executedYesGenerated code is never executed by the investigator
fileNameYes
languageYes
testNameYes
frameworkYes
assertionsYes
assumptionsYes
reviewNotesYes
investigationIdYes
reproductionStatusYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4/5.0
Behavior5/5

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

With readOnlyHint and openWorldHint already declared, the description adds genuinely new behavioural facts: the code is returned for review, is never executed by the server, and assumptions are listed explicitly. That is exactly the context an agent needs about side effects and output shape beyond the annotations.

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?

Three tight sentences, front-loaded with the artifact produced, then the safety guarantee, then the assumption disclosure. No sentence restates the title or wastes tokens.

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-value detail is unnecessary, and the description covers the non-execution guarantee and assumption listing. It stops short of explaining whether the investigation must be in a particular state or what a failed generation looks like, which are the remaining gaps.

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 coverage is 50%: investigationId is documented in the schema and reinforced only indirectly by 'from the investigation', while testName is never mentioned in the description and relies entirely on its pattern/maxLength constraints. With half the parameters undocumented in prose, a baseline 3 is appropriate.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb and artifact: generates a Playwright TypeScript test from the investigation, scoped to the observable behaviour behind the reported symptom. The artifact type clearly separates it from siblings like generate_bug_report, but the description never names or contrasts an alternative, so sibling differentiation is left implicit.

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 phrase 'from the investigation' implies the tool is used after evidence gathering and before reporting, and the schema's investigationId ties it to start_investigation, but the description never states when to use this versus generate_bug_report or reproduce_issue, and offers no exclusions or prerequisites in prose.

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