Skip to main content
Glama
pssrh
by pssrh

browser_handle_dialog

Accept or dismiss JavaScript alert, confirm, or prompt dialogs, including optional text entry, by calling this before the triggering action to manage them automatically.

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)

Schema Changelog

Changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. First observedv1.0.1

TDQS

A3.8/5.0
Behavior3/5

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

With no annotations provided, the description carries the behavioral disclosure burden. It explains that the tool waits for the dialog and then accepts or dismisses it, which is the core behavior. However, it does not mention what happens on timeout, whether it returns any value, or how it interacts with the subsequent action.

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 no redundancy. The first sentence states the resource and action; the second gives critical timing guidance and the wait behavior. Every sentence earns its place.

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 low-complexity tool with three optional, fully documented parameters, the description covers the essential call pattern and behavior. It could be more complete about failure modes, but the current guidance is sufficient for correct invocation in most cases.

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 schema already documents all three parameters. The description adds little beyond naming prompt() dialogs, which aligns with the 'text' parameter, but it does not meaningfully enrich parameter understanding.

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?

The description clearly identifies the target resource as JavaScript alert(), confirm(), or prompt() dialogs and states the tool's behavior of accepting or dismissing them. It is distinct in the sibling list, though it does not explicitly name an alternative tool for contrast.

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?

The description provides explicit timing guidance: call this BEFORE triggering the action that causes the dialog. It does not list exclusions or alternative tools, but the intended usage context is clear from the sibling set.

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

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

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