Skip to main content
Glama

browser_handle_dialog

Destructive

Accept or dismiss browser dialogs during automation. Specify whether to accept the dialog and provide text for prompt dialogs when needed.

Instructions

Handle a dialog

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
acceptYesWhether to accept the dialog.
promptTextNoThe text of the prompt in case of a prompt dialog.
Behavior4/5

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

Annotations indicate destructiveHint=true and readOnlyHint=false, suggesting this tool performs a mutation. The description doesn't contradict these annotations, as 'handle' implies an action that could change state. However, it adds minimal behavioral context beyond annotations—it doesn't specify what happens when a dialog is handled (e.g., dismissed, accepted, or text entered) or any side effects like page changes. The description compensates slightly by implying interaction with dialogs, but lacks detail on behavior traits like error handling or prerequisites.

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 extremely concise with just three words, making it front-loaded and free of unnecessary information. Every word ('Handle a dialog') directly relates to the tool's function, though it's under-specified. There's no wasted text or redundant phrasing, which aligns with efficient communication despite the lack of detail.

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

Completeness2/5

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

Given the complexity of handling dialogs (which can involve various types like alerts, prompts, or confirmations), the description is incomplete. With no output schema and annotations that only hint at destructiveness, the description fails to explain what the tool returns or how it behaves in different scenarios. Sibling tools like browser_wait_for might overlap in functionality, but no context is provided to differentiate or guide usage, leaving significant gaps for an agent to understand when and how to invoke this tool effectively.

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%, with clear documentation for both parameters: 'accept' (boolean for accepting the dialog) and 'promptText' (string for prompt dialog text). The description adds no additional meaning beyond the schema, such as explaining when promptText is required or how accept interacts with dialog types. Since the schema fully covers parameters, the baseline score of 3 is appropriate, as the description doesn't enhance parameter understanding.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose2/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description 'Handle a dialog' is a tautology that merely restates the tool name without specifying what kind of dialog or what handling entails. It doesn't distinguish this tool from sibling tools like browser_click or browser_press_key, which also handle UI interactions. The verb 'handle' is vague compared to more specific sibling actions like 'click', 'navigate', or 'type'.

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

Usage Guidelines1/5

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

The description provides no guidance on when to use this tool versus alternatives. It doesn't mention what types of dialogs it handles (e.g., alerts, prompts, confirmations) or under what conditions it should be invoked. With siblings like browser_wait_for that might interact with dialogs indirectly, there's no context to help an agent choose appropriately.

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

Install Server

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/Playwright-os/Playwright-MCP'

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