Skip to main content
Glama

open_session

Starts a live web, iOS, or Android app session for end-to-end testing, launching the configured engine and returning a session ID, runnable tools, and the first screen observation.

Instructions

Open a live session on one target of an e2e project: loads the config, starts the app command the target declares (if any), boots the engine (a browser, a simulator), opens the app (its URL, or the pinned app on a device), and returns the session id, the catalog of tools it can run, and the first observation. Where the project has no e2e config file, pass engine to open a session on that engine: {engine: "@e2e-dev/web", app: {url: "http://localhost:3000"}}. With test, it runs that one test first and stops on the screen where the test passed or failed, with the failure and its line ahead of the catalog. Several sessions can be open at once, one per agent, each with its own engine: pass the returned session id to every later call. Then act with call and look with call {tool: "observe"}.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "open_session"
  }
}

Input Schema

NameRequiredDescriptionDefault
appNoWith engine: the app under test, as a target declares it in an e2e.config.ts. @e2e-dev/web needs url; @e2e-dev/mobile needs bundleId or appPath
testNoOne test to run in the session first, named the way npx e2e run takes it: tests/checkout.e2e.ts:12, where 12 is the line its test( call is on (not a failing line inside it), or a file or name that selects one test. The session then stays on the screen where the test stopped; afterEach hooks and fixture teardown run at close_session. To rerun after editing the test, close_session and open_session with test again
configNoPath to an e2e config file, absolute or relative to the server's working directory; default: the nearest e2e.config.ts, .mts, .js, or .mjs
engineNoOnly where the project has no config file: the engine to open a session on, as a config would build it. A package name calls its default export with no options: "@e2e-dev/web". An object passes options, and an option can be another factory call, which is how an engine gets a device or browser provider: {package: "@e2e-dev/mobile", options: {platform: "ios"}}, or {package: "@e2e-dev/mobile", options: {platform: "ios", device: {package: "@e2e-dev/limrun", export: "limrun", options: {region: "eu"}}}} for mobile({platform: "ios", device: limrun({region: "eu"})}). A package not installed fails with the command that installs it. Excludes target, config, and test
headedNoShow the browser or simulator, when the engine supports it; pass true when the user wants to watch. Default: headless, unless the server was started with --headed
targetNoTarget name from the config; required when the config declares several

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.23.1

TDQS

A4.4/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=false and openWorldHint=false; the description goes further by disclosing that sessions persist across calls until close_session, that afterEach hooks and fixture teardown are deferred to close_session, that several sessions can be open concurrently, and that a test rerun requires close_session first. That is meaningful lifecycle and statefulness context beyond the annotations. However, it omits failure modes for the main path (what happens if the app command fails or the engine package is missing beyond the install-hint note) and says nothing about timeouts, which keeps it at 3 rather than higher.

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 opening sentence front-loads purpose and returns, and every later sentence carries distinct information (test behavior, engine fallback, concurrency, next steps). It is long and the engine example sentence is dense enough to require re-reading, but no sentence is purely redundant.

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 complex 6-parameter tool with nested objects and no output schema, the description covers the return contract (session id, tool catalog, first observation), the session lifecycle, and the no-config fallback path. Nothing an agent needs to call it correctly or interpret the result is missing.

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 the baseline is 3; the description still adds value by explaining that engine is only for the no-config case, giving a literal example payload, and clarifying that a package not installed fails with the install command. It also reinforces the test naming convention (line of the test( call, not a failing line). It does not add meaning for config, target, or headed beyond what the schema states, so it stops short of 5.

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 ('Open a live session on one target of an e2e project') and enumerates what happens during the call: config load, app command, engine boot, app open, and the three return values. An agent can immediately distinguish this from call, tools, close_session, and run_tests.

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

Usage Guidelines5/5

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

Gives explicit branching conditions: use test to run one test first and stop on its screen, use engine only where no e2e config exists (with a concrete example), and pass the returned session id to every later call. It also names the follow-up tools (call, call {tool: "observe"}, close_session) and the multi-session/multi-agent model, so the agent knows when this is and isn't the right entry point.

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

Deploy Server

Other Tools