Skip to main content
Glama
Antigravity in Chrome MCP Server

Antigravity in Chrome MCP Server

by sxqib

handle_dialog

Accept or dismiss open JavaScript browser dialogs such as alert, confirm, prompt, or beforeunload, and optionally enter text into prompt dialogs.

Instructions

Accept or dismiss an open JavaScript browser dialog (alert, confirm, prompt, or beforeunload), optionally entering text into a prompt dialog.

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": {
      "action": "<action>"
    },
    "name": "handle_dialog"
  }
}

Input Schema

NameRequiredDescriptionDefault
tabIdNoTarget tab ID (defaults to active managed tab).
actionYesWhether to accept (OK) or dismiss (Cancel) the dialog.
promptTextNoOptional text to enter when accepting a JS prompt() dialog.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A3.5/5.0
Behavior3/5

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

With no annotations, the description must carry the behavioral burden. It usefully discloses that prompt text is optional and scoped to prompt dialogs, but omits side effects: accepting a beforeunload may navigate away or close the tab, accepting a confirm returns a value the agent cannot observe, and behavior with no pending dialog is unstated.

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?

A single front-loaded sentence with no filler; the parenthetical list of dialog types is functional rather than decorative.

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?

Adequate for a simple three-parameter tool whose schema is fully documented, but missing edge-case behavior (no dialog present, timeouts, whether beforeunload acceptance aborts the action) that an agent would need before invoking it.

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 100% and each parameter already has an enum or description, so the schema explains tabId defaulting, accept vs dismiss, and promptText usage. The description only reinforces that promptText applies when accepting a prompt, adding little beyond 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?

States a specific verb (accept/dismiss) applied to a specific resource (open JavaScript browser dialog) and enumerates the dialog variants (alert, confirm, prompt, beforeunload). No sibling handles dialogs, so the tool is distinguishable without further differentiation.

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 implied by naming the dialog types, but there is no explicit guidance on when to call it (e.g., after a click triggers a blocking dialog) or what happens if no dialog is open. No alternatives are named, though none of the siblings appear to overlap.

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