Skip to main content
Glama

browser_handle_dialog

Automate browser dialogs by pre-arming acceptance, dismissal, or text input before the next alert, confirm, or prompt appears, preventing click blockage. Optionally wait for an opening dialog.

Instructions

Arm automatic handling of the next JavaScript alert/confirm/prompt on the active tab, then return immediately. Call this BEFORE the click that opens the dialog — a dialog freezes the tab, so nothing can be clicked once it is on screen. Pass wait=true only when the dialog is already opening.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
textNoText to enter for prompt() dialogs
waitNoBlock until a dialog appears instead of arming and returning (default: false). Only use when the dialog is already on its way.
actionNoAccept or dismiss the dialog (default: accept)
timeoutNoHow long the arming stays active in ms (default: 60000)
Install Server

TDQS

A4.4/5.0
Behavior4/5

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

No annotations are provided, so the description carries the full behavioral burden. It discloses the arm-and-return behavior, the blocking wait mode, and the underlying hazard of dialogs freezing the tab. It doesn't state what happens if no dialog appears within the timeout, but the schema's timeout parameter partially covers that.

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?

The description is three sentences with no filler. The core behavior is front-loaded, followed by the most critical usage warning and the wait caveat. Every sentence contributes necessary operational information.

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?

For a narrow dialog-handling tool with four fully documented parameters, the description covers the essential ordering, blocking behavior, and timeout meaning via schema. It doesn't describe the return value or no-dialog edge case, but these are minor for this tool's simple arming operation.

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 baseline is 3. The description mostly restates the wait timing note already present in the schema. It does not add meaningful new meaning to text, action, or timeout beyond their schema descriptions.

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 uses a specific verb ('Arm automatic handling') with a clear resource ('the next JavaScript alert/confirm/prompt on the active tab'). It also adds the crucial timing distinction ('Call this BEFORE the click') that makes the tool's purpose unmistakable. This clearly differentiates it from the browser sibling tools.

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 explicitly tells the agent when to call the tool: before the click that opens the dialog. It also provides a precise exclusion—wait=true only when the dialog is already opening—and explains why the ordering matters via the tab-freeze behavior.

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

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/Agent360dk/browser-mcp'

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