Skip to main content
Glama
microsoft

Playwright MCP Server

Official
by microsoft

browser_handle_dialog

Destructive

Accept or dismiss browser dialog boxes and prompts during automated web testing with Playwright.

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.
Behavior3/5

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

Annotations already provide significant behavioral information (destructiveHint: true, readOnlyHint: false, openWorldHint: true), so the bar is lower. The description adds no additional behavioral context beyond what annotations provide - it doesn't explain what gets destroyed, what permissions are needed, rate limits, or error conditions. However, it doesn't contradict the annotations either.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness2/5

Is the description appropriately sized, front-loaded, and free of redundancy?

While technically concise with just three words, this is under-specification rather than effective conciseness. The description fails to provide essential information that would help an AI agent understand and use the tool correctly. Every word should earn its place, but this description provides almost no value.

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 that this is a destructive tool (destructiveHint: true) with no output schema, the description is woefully incomplete. It doesn't explain what happens when a dialog is handled, what the consequences are, or what the agent should expect. For a browser automation tool that modifies browser state, this minimal description leaves critical gaps in understanding.

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?

With 100% schema description coverage, the baseline is 3 even without parameter information in the description. The schema already fully documents both parameters (accept and promptText) with clear descriptions. The tool description adds no additional meaning or context about these parameters beyond what the schema provides.

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, providing no specific information about what the tool actually does. It doesn't specify what type of dialog (alert, confirm, prompt) or what handling entails, nor does it distinguish this tool from sibling browser tools like browser_click or browser_press_key.

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 absolutely no guidance about when to use this tool versus alternatives. It doesn't mention what triggers a dialog, when this tool should be invoked, or what other tools might be used for similar purposes. There's no context about browser state or prerequisites for using this tool.

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/microsoft/playwright-mcp'

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