Skip to main content
Glama

browser_handle_dialog

Handle JavaScript alert, confirm, or prompt dialogs by accepting or dismissing them before the triggering action. Optionally input text for prompt dialogs.

Instructions

Handle JavaScript alert(), confirm(), or prompt() dialogs. Call this BEFORE triggering the action that causes the dialog. Waits for the dialog to appear, then accepts or dismisses it.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
textNoText to enter for prompt() dialogs
actionNoAccept or dismiss the dialog (default: accept)
timeoutNoMax wait for dialog in ms (default: 10000)
Behavior3/5

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

No annotations provided, so description carries full burden. Discloses waiting and action but omits return value, timeout error behavior, and multiple dialog handling. Transparency is adequate but not thorough.

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?

Two sentences with zero waste. Front-loaded with purpose and immediately provides key usage instruction.

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?

Given 3 simple parameters and no output schema, the description covers core usage sufficiently. Lacks return value and error info, but for a straightforward tool this is acceptable.

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%, so schema already describes all parameters. Description adds minor context on timing but does not significantly enhance parameter understanding beyond schema definitions.

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 it handles JavaScript alert(), confirm(), or prompt() dialogs, using specific verbs and resource types. It distinguishes from sibling tools like browser_dismiss_overlays which handle non-JS overlays.

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

Usage Guidelines4/5

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

Explicitly instructs to call before the action causing the dialog, and explains waiting and acceptance/dismissal. Lacks exclusion of when not to use, but context is clear.

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