Skip to main content
Glama
extentos

extentos

ensureSimulatorBrowser

Ensure the simulator browser tab is attached to the session: open one if missing and confirm the WebSocket connection. Use before camera or photo flows to prevent browser-not-attached errors.

Instructions

Ensure a connected simulator browser tab for the session — opens one if needed and confirms the browser's WebSocket actually attached before returning. The browser tab is the hardware surrogate's viewport: camera + inject tools require it (setSimVideo returns browser_not_attached without it; the capture_photo / describe_scene flows the assistant runtime drives fail). Idempotent — if a browser is already connected it's a no-op (returns alreadyOpen: true); it never opens a redundant tab (the hub would reject a second live browser with role_conflict). When to call: right after createSimulatorSession before any camera-driven flow; after a backend deploy (which severs every sim WebSocket — the tab does NOT auto-reconnect); whenever the tab was closed; or any time getSimulatorStatus / a camera tool reports the browser isn't attached. How it works: checks the AUTHORITATIVE in-memory hub liveness (the same signal setSimVideo/inject enforce, so this can't disagree with them — unlike getSimulatorStatus.connectedRoles.browser, which is persisted state that can lag a dead socket ~25-50s after an unclean drop); if no browser is attached, the MCP server opens the session URL in the developer's default browser ITSELF (cross-platform — no shell command for you to run), then polls until the tab's WebSocket attaches or timeoutMs elapses. Headless / remote agents: pass autoOpen: false to get an immediate presence snapshot + the sessionUrl with NO spawn and NO wait — surface the URL to the developer to open on a machine with a display, then re-run with autoOpen:true to confirm. Returns { alreadyOpen, opened, browserConnected, browserClientId, appConnected, sessionUrl, waitedMs }; errors with browser_not_connected (carrying sessionUrl) when an auto-open didn't attach in time. DON'T USE to check whether the device APP is attached or hardware is ready — this ensures the BROWSER viewer only; use getSimulatorStatus for app/hardware state.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
autoOpenNoWhen true (default): if no browser is connected the MCP server opens the session URL in the developer's default browser and polls until it attaches. When false: returns an immediate presence snapshot + sessionUrl with no spawn and no wait — for headless/remote agents that surface the URL to the developer themselves.
sessionIdYes
timeoutMsNoMax ms to wait for the browser tab's WebSocket to attach after auto-opening. Default 20000. Clamped to [5000, 60000]. Bump it for a cold-started browser or a slow machine. Ignored when autoOpen:false.
Behavior5/5

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

With no annotations, the description fully discloses behavior: idempotent, no redundant tab, checks authoritative hub liveness, opens browser directly, polls, handles errors, and explains autoOpen:false case for headless. It even notes that hub rejects second live browser. Comprehensive.

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 description is lengthy but well-structured and front-loaded. Every sentence adds value, explaining behavior, usage, and edge cases. It could be slightly more concise but given the complexity, it earns a 4.

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?

The description covers return object shape, error conditions, when to call, and behavioral differences from siblings. It explains the lag in getSimulatorStatus and the authoritative hub check. For a tool with 3 params and no output schema, this is outstandingly complete.

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 67% (autoOpen and timeoutMs described), and the description adds meaningful context: autoOpen:false gives immediate snapshot without spawn, timeoutMs has default and clamp range. SessionId lacks description but is required and minimal. Overall enhances understanding beyond schema.

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 clearly states the tool ensures a connected simulator browser tab, opening one if needed and confirming WebSocket attachment. It specifies the resource (simulator browser tab) and action (ensure connection), and distinguishes from siblings like getSimulatorStatus which check app/hardware state.

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?

The description provides explicit when-to-use guidance: after createSimulatorSession, after backend deploy, after tab close, or when reported not attached. It also explicitly says when NOT to use: for app/hardware state, directing to getSimulatorStatus. This is exemplary.

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

Install Server

Other Tools

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/extentos/mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server