Skip to main content
Glama
Antigravity Browser Operator

Antigravity Browser Operator

browser_handle_dialog

Accepts or dismisses native browser JavaScript dialogs—alerts, confirms, prompts, and beforeunload prompts—so automation can continue without manual clicks.

Instructions

Handles, accepts, or dismisses browser native JavaScript modal dialogs (alerts, confirms, prompts, and "Leave site?" beforeunload dialogs) using Chrome DevTools Protocol.

Input Schema

NameRequiredDescriptionDefault
tabIdNoTarget tab ID (optional, defaults to active tab).
acceptNoWhether to accept (click Leave/OK/Yes) or dismiss (click Cancel/No). Defaults to true.
promptTextNoOptional prompt text to enter into the dialog.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv1.4.0

TDQS

A3.6/5.0
Behavior3/5

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

No annotations are supplied, so the description must carry the behavioral load, and it does disclose the accept-vs-dismiss semantics and that prompt text can be entered. However it omits operationally important behavior: what happens if no dialog is open (error vs no-op), whether unhandled dialogs block subsequent commands, and any timing/wait requirement. Those gaps matter for a tool whose whole purpose is unblocking a page.

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?

A single front-loaded sentence with the verb and dialog taxonomy up front and zero redundancy. The trailing 'using Chrome DevTools Protocol' is implementation detail that adds little for the selecting agent, keeping it just short of a 5.

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

Completeness3/5

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

For a 3-optional-parameter, no-output-schema tool, the description covers what the tool acts on and how accept/dismiss work, which is close to sufficient. What is missing is the failure/precondition story — whether it errors when no dialog exists and whether dialogs block other browser commands — which is the main thing an agent needs to call this correctly.

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 all three parameters (tabId, accept, promptText) are already fully documented in the schema, including defaults. The description adds no meaning beyond that baseline — it does not, for example, clarify that promptText is ignored for alert/confirm dialogs.

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 set (handles/accepts/dismisses) and a precisely bounded resource: native JavaScript modal dialogs, with the four concrete types enumerated (alert, confirm, prompt, beforeunload). No sibling tool touches native dialogs, so an agent can route here unambiguously.

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?

Usage is only implied — an agent must infer that this is the tool to call when a dialog is blocking the page. There is no explicit 'call this when you see an alert/confirm' trigger, no mention of what to do instead if no dialog is present, and no guidance on sequencing relative to browser_click or browser_navigate, which are the actions that typically spawn dialogs.

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