Skip to main content
Glama

generate_gherkin

Convert recorded browser sessions into Cucumber Gherkin feature files, Java step definitions, and a TestNG runner. Choose TestFly-managed or raw Selenium output to create production-ready automated tests.

Instructions

Generate a Cucumber Gherkin .feature file + Java step definitions class + TestNG Cucumber runner from the recorded browser session. framework='testfly' (default) emits steps extending BaseCucumberSteps with framework-managed driver, open(), accessibility-first locators, web-first assertThat, and a RunCucumberTest runner extending BaseCucumberTest. framework='raw' emits standalone Selenium.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
frameworkNoStep-definition flavor. Use 'testfly' (default) inside a TestFly project.testfly
feature_nameNoFeature name e.g. 'Login'. Auto-inferred from URL if omitted.
package_nameNocom.tests.selenium
scenario_nameNoRecorded user flow

Schema Changelog

Changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. First observedv1.0.0

TDQS

A3.9/5.0
Behavior3/5

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

With no annotations available, the description correctly carries the behavioral disclosure burden and does reveal important output traits: the generated file types and the framework-specific class shapes. However, it omits operational behaviors such as where files are written, whether existing files are overwritten, and what the 'selenium_boot' framework value emits, leaving the agent with incomplete side-effect knowledge.

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 dense, front-loaded sentences with no filler. The first sentence states the tool's output, and the second efficiently explains framework variants, so every clause contributes useful information.

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

Completeness3/5

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

For a multi-file code generator with no output schema and no annotations, the description covers the core artifacts and the two main framework modes. It is incomplete regarding output paths, overwrite behavior, prerequisites beyond the recorded session, and the 'selenium_boot' enum option, so an agent can invoke it correctly for the documented defaults but cannot fully predict all outcomes.

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?

The description adds meaning to the framework parameter by explaining the emitted code structure for 'testfly' and 'raw', which goes beyond the enum values in the schema. It does not help with 'selenium_boot', and package_name/scenario_name receive no added guidance beyond their defaults, so parameter coverage is only partial.

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 opening sentence names a concrete action ('Generate') and a specific multi-part resource: a Cucumber Gherkin .feature file, a Java step definitions class, and a TestNG Cucumber runner, all derived from the recorded browser session. This clearly differentiates it from sibling generation tools like generate_java_testng or generate_python_test, which target different outputs and frameworks.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The definition clearly states the input context — the recorded browser session — and gives actionable framework guidance: use 'testfly' inside a TestFly project and 'raw' for standalone Selenium. It does not explicitly list alternatives or state when not to use this tool, but the intended use case is unambiguous.

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

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/hakanngul/testfly-mcp'

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