Skip to main content
Glama

generate_test

Generate executable Playwright test scripts from test steps to automate browser testing. Converts actions like clicks, fills, and assertions into ready-to-run code.

Instructions

Generate a Playwright test script from test steps. Returns executable code that can be saved and run independently.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
testNameYesName of the test
stepsYesArray of test steps
languageNoProgramming language for the test script (default: typescript)
Behavior2/5

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

No annotations are provided, so the description carries full burden. It states the tool returns 'executable code,' which implies a read-only generation function, but doesn't disclose behavioral traits like whether it requires specific inputs, how errors are handled, or if there are rate limits. The description is minimal and lacks crucial operational context.

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?

The description is front-loaded and concise with two sentences that directly state the purpose and output. Every sentence earns its place by explaining the tool's function and result, though it could be slightly more structured by explicitly mentioning input requirements.

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

Completeness2/5

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

Given no annotations, no output schema, and a tool with 3 parameters, the description is incomplete. It doesn't explain return values, error handling, or prerequisites, leaving significant gaps for an AI agent to understand how to use this tool effectively in context with its siblings.

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%, so the schema fully documents parameters like testName, steps, and language. The description adds no additional meaning beyond implying that steps are used to generate code, which is already clear from the schema. Baseline 3 is appropriate as the schema does the heavy lifting.

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 specific action ('Generate a Playwright test script from test steps') and the resource ('executable code'), distinguishing it from sibling tools like analyze_page or run_test by focusing on code generation rather than analysis or execution.

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 usage for creating test scripts from steps, but provides no explicit guidance on when to use this tool versus alternatives like generate_page_object or run_test. It mentions the output can be 'saved and run independently,' which hints at a preparatory role, but lacks clear when/when-not instructions.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/naveenanimation20/locatorlabs-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server