Skip to main content
Glama

e2e_create_test

Creates a new JSON E2E test suite from declarative browser actions and hooks, letting agents define executable tests while avoiding fragile evaluate scripts.

Instructions

Create a new E2E test JSON file. Prefer built-in actions over evaluate — more robust and readable. Full catalog: the e2e-testing skill / references/action-types.md.

Action cheat-sheet:

  • Click: click (by text), click_regex, click_menu_item, click_option, click_chip, click_icon, click_in_context; in a dialog use click with scope:"dialog" (+ last/visible).

  • Select (MUI): select_combobox (open+optional filter+pick), select, focus_autocomplete.

  • Assert text: assert_text (present), assert_no_text (absent), assert_text_in (scoped regex), assert_element_text, assert_matches.

  • Assert elements (selector, NOT text): assert_visible, assert_not_visible, assert_count, assert_attribute, assert_input_value, assert_url.

  • Nav/wait: goto, navigate (SPA), wait {text|selector|gone|value(ms)}, wait_network_idle.

  • Form: type, type_react (React inputs; optional blur/waitAfter), clear, press.

Field rules: assert_text/assert_no_text use "text" (whole page); assert_visible/assert_not_visible use "selector"; for text absence use assert_no_text. Use evaluate only for computed styles, complex logic, GraphQL (window.__e2eGql), or app state.

Modules: { "$use": "module-name", "params": {...} } references reusable modules in e2e/modules/ (they compose). Run e2e_list to see available modules.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "name": "<name>",
      "tests": "<tests>"
    },
    "name": "e2e_create_test"
  }
}

Input Schema

NameRequiredDescriptionDefault
cwdNoProject root directory (defaults to the current working directory).
nameYesSuite file name without .json extension (e.g. "login-flow", "issue-1743-sidebar")
hooksNoOptional hooks: beforeAll, afterAll, beforeEach, afterEach (each an array of actions). Note: beforeAll runs on a SEPARATE page that is closed before tests — use beforeEach for auth/setup.
testsYesArray of test objects with { name, actions, expect }

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.6.0

TDQS

A3.6/5.0
Behavior3/5

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

With no annotations, the description must carry the behavioural burden. It usefully discloses that modules compose and which action types are robust, but omits key write semantics: what happens if the file already exists (overwrite vs error), where the file is written relative to cwd, and what the call returns. These are meaningful gaps for a file-creating tool.

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 purpose is front-loaded in one sentence, followed by clearly labelled cheat-sheet and field-rule blocks. It is long, but the bulleted grouping keeps it scannable and most lines map directly to decisions the agent must make while authoring tests.

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?

For a complex tool with nested object schemas and no output schema, the description supplies the action vocabulary, module composition model, and text-vs-selector rules needed to build a valid payload. The remaining hole is operational behaviour (overwrite handling, return value), which keeps it short of a 5.

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%, so baseline is 3. The description still adds value beyond the schema by enumerating the action-type catalog (click variants, assert_* families, MUI select helpers, wait forms) that the schema does not list, and by stating the '{"$use": ...}' module shape that helps the agent populate 'tests' correctly.

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?

The first sentence states a specific verb and resource ('Create a new E2E test JSON file'), which is unambiguous. It does not explicitly differentiate itself from the sibling e2e_create_module, though the schema's 'tests' array and the modules note imply the distinction.

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 gives strong composition guidance ('Prefer built-in actions over evaluate', when to fall back to evaluate, and to run e2e_list to discover modules). However, it gives no guidance on when to create a test file versus e2e_create_module or when to run e2e_run, so tool selection against siblings is left implicit.

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