Skip to main content
Glama

test_export_playwright

Generate a saved test as a Playwright or Jest TypeScript spec, embedding sub-flows as functions. Optionally write the file to exports/.spec.ts.

Instructions

Generates the code of a saved test as a TypeScript spec (.spec.ts), in Playwright (@playwright/test) or Jest (jest-environment-playwright) format, with sub-flows embedded as functions. Returns the content; with write: true it saves the file into exports/.spec.ts like the app.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYesName of the saved test
writeNoWrite the file into exports/ (default false)
formatNoFormat of the generated spec (default "playwright")

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.2/5.0
Behavior4/5

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

With no annotations provided, the description carries the full burden. It transparently discloses that the tool returns content by default and writes a file when write is true, including the file path pattern. This covers the key side-effect behavior, though it does not detail error handling or permissions.

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 sentences with zero fluff. The primary action is front-loaded, and the side-effect condition is stated succinctly. Every clause earns its place.

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?

Given three parameters, no output schema, and no annotations, the description covers the essential operational aspects: what is generated, the return value, and the write behavior. It does not elaborate on error cases or the internal structure of the generated code, but these are not critical for invocation.

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% with each parameter described, so the baseline is 3. The description adds extra value by specifying the exact file name pattern (exports/<name>.spec.ts) and noting 'like the app', which enriches the meaning of the write parameter beyond the schema's simple 'Write the file into exports/'.

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 clearly states the verb 'Generates' with a specific resource 'saved test' and the output type '.spec.ts'. It distinguishes from sibling tools like test_get by focusing on code generation rather than data retrieval, and specifies both Playwright and Jest formats.

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 description implies the use case (generating exportable code) but does not explicitly state when to use this tool over alternatives. It does not mention any exclusions or alternative tools, leaving the selection to inference from the purpose.

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