Skip to main content
Glama

generate_python_test

Convert recorded browser actions into a runnable pytest + Selenium test script. Captures navigation, clicks, typing, and more to produce executable test code.

Instructions

Generate a pytest + Selenium test script from the current browser session. Captures all recorded actions (navigate, click, type, hover, drag, select, etc.) into a runnable test.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
test_nameNoName of the test functiontest_recorded_flow
class_nameNoName of the test classTestRecordedFlow

Schema Changelog

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

  1. First observedv1.0.0

TDQS

A3.7/5.0
Behavior3/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It does reveal the core behavior: capturing recorded actions and converting them into a runnable pytest + Selenium test. However, it does not disclose whether the current session or session log is consumed/cleared after generation, whether an active session is required, or what the tool returns (generated code string vs. writing a file) — and there is no output schema to fill that gap.

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 zero filler. The core action and target framework are front-loaded in the first sentence, and the second sentence earns its place by enumerating which recorded action types are captured. Every word contributes.

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 low-complexity tool (two optional parameters with defaults, no output schema, no annotations), the description covers the essential calling context: what it produces, from what source, and for which framework. The notable gap is the unspecified return format and unclear side effects on the recorded session, which an agent needs since no output schema exists. It is adequate but stops short of complete.

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%, with both test_name and class_name already documented as 'Name of the test function' and 'Name of the test class.' The description adds no additional meaning about these parameters, so the baseline score of 3 applies. Nothing is missing, but the description contributes no value beyond the schema here.

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 verb and resource: 'Generate a pytest + Selenium test script from the current browser session.' It names the exact framework and lists concrete captured action types (navigate, click, type, hover, drag, select), which distinguishes it from sibling generators like generate_java_junit5, generate_java_testng, generate_csharp_nunit, and generate_gherkin. An agent can confidently select this tool when a Python pytest test is needed.

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 current browser session' provides a clear precondition: the tool consumes the recorded actions of an active session. However, it never states when NOT to use it or mentions alternatives among the many generator siblings, such as using generate_java_junit5 for a Java target or generate_gherkin for BDD. The usage context is implied rather than explicit.

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