Skip to main content
Glama

e2e_analyze

Analyzes a page's interactive elements and returns CSS selectors plus test scaffolds, replacing manual screenshot-guessing so you can build E2E tests in one call.

Instructions

Analyze a page's structure and return all interactive elements (forms, buttons, links, navigation, tables, modals, etc.) with their CSS selectors, plus suggested test scaffolds. One call replaces the entire screenshot→guess-selectors→retry cycle.

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": {
      "url": "<url>"
    },
    "name": "e2e_analyze"
  }
}

Input Schema

NameRequiredDescriptionDefault
cwdNoProject root directory (defaults to the current working directory).
urlYesFull URL to analyze (e.g. "https://example.com" or "http://host.docker.internal:3000/dashboard")
delayNoWait N milliseconds after page load before analyzing (default: 0)
scopeNoCSS selector to limit analysis to a section (e.g. "#sidebar", ".modal-content")
selectorNoWait for this CSS selector before analyzing
authTokenNoJWT or auth token to inject into localStorage before navigating (for authenticated pages)
waitUntilNoNavigation wait strategy. "auto" (default) tries networkidle2 first with a short timeout, then falls back to domcontentloaded + delay for SPA/WebSocket apps. Use "domcontentloaded" for apps with persistent connections (WebSocket, SSE).
maxElementsNoMax elements per category (default: 50). Lower values produce smaller responses.
authStorageKeyNolocalStorage key name for the auth token (default: "accessToken")
includeScreenshotNoInclude a screenshot alongside the JSON analysis (default: true)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.6.0

TDQS

A4/5.0
Behavior3/5

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

With no annotations at all, the description must disclose behavior on its own. It does say the tool navigates a page and returns a structured analysis plus scaffolds, which is useful, but it never mentions that a browser session is launched, that the target URL must be reachable from the host, or anything about cost, time, or failure modes. The efficiency claim is the main behavioral signal, leaving real gaps for a browser-driving tool.

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?

Two tight sentences; what the tool returns is front-loaded and the value proposition comes last. No filler.

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?

Because there is no output schema, it is useful that the description spells out that the response contains element lists with selectors plus test scaffolds. It is a read-only analysis tool requiring only a url, so little else is needed, though output shape, size limits, and failure behavior remain unspecified.

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 10 parameters are already fully documented, including authToken, scope, waitUntil, and maxElements. The description adds no meaning beyond the schema, so the baseline 3 applies.

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?

States a specific verb and resource ('Analyze a page's structure') and enumerates exactly what comes back (interactive elements with CSS selectors, suggested test scaffolds). The phrase about replacing the screenshot→guess-selectors→retry cycle implicitly sets it apart from e2e_screenshot and e2e_capture.

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 a clear context for use: this is the single-call alternative to the screenshot-then-guess workflow. It stops short of an explicit when-not or naming a sibling tool, but the intended alternative workflow is easy to infer.

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