Skip to main content
Glama

e2e_create_module

Create reusable E2E test modules that encapsulate repeated action sequences, expose parameters, and can be referenced by other tests via $use to reduce duplication.

Instructions

Create a reusable module for E2E tests. Modules encapsulate repeated action sequences referenced via { "$use": "module-name", "params": {...} }.

Good module candidates: auth setup, page navigation, tab clicking, opening sidebars/drawers, form fill sequences, cleanup routines. Modules can compose — a module can $use other modules. Params use {{paramName}} mustache syntax in action fields. Extract a module when you see the same 2+ action sequence in multiple tests.

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>",
      "actions": "<actions>"
    },
    "name": "e2e_create_module"
  }
}

Input Schema

NameRequiredDescriptionDefault
cwdNoAbsolute path to the project root directory.
nameYesModule name (used in $use references, e.g. "auth-jwt", "navigate-patient")
paramsNoParameter definitions. Each key is a param name, value is { required: boolean, default?: string, description?: string }
actionsYesSequential actions with {{param}} placeholders for substitution
descriptionNoHuman-readable description of what this module does

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.6.0

TDQS

A3.8/5.0
Behavior3/5

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

With no annotations supplied, the description carries the full behavioral burden, and it does disclose the composition model ($use nesting) and the {{paramName}} substitution semantics, which are genuinely non-obvious. However, for a write operation it never states where modules are persisted, what happens when a module name already exists (overwrite vs. error), or whether actions are validated at creation time.

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 core action is front-loaded in the first sentence, followed by definition, candidate examples, and the extraction heuristic in a logical order with no filler. It is a dense paragraph rather than a bulleted list, and the candidate list is slightly longer than necessary, but every sentence contributes information.

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

Completeness5/5

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

For a 5-parameter tool with nested objects and no output schema, the description covers what an agent most needs: the module concept, the $use reference syntax, compositionality, mustache placeholders, and when extraction is warranted. The only real gap is return-value behavior, which is minor here since the call's effect is file creation rather than a result the agent must interpret.

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 coverage is already 100%, so the schema documents cwd, name, params, actions, and description on its own, which sets the baseline at 3. The description adds real meaning for name ("used in $use references" with example values) and for placeholder syntax in action fields, but leaves the params object shape and action type enumeration entirely to the schema.

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 description opens with a specific verb+resource ("Create a reusable module for E2E tests") and immediately defines what a module is and how it is referenced via { "$use": "module-name" }. That conceptual definition does the work of distinguishing a module from a test file, but the sibling e2e_create_test is never named, so the split is inferred rather than stated.

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?

It gives an explicit triggering heuristic — "Extract a module when you see the same 2+ action sequence in multiple tests" — plus a concrete list of good candidates (auth setup, navigation, form fills, cleanup). It stops short of when-not-to-use guidance or naming the alternative tool for non-reusable one-off actions.

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