Skip to main content
Glama
Pagewright (browser-mcp)

Pagewright (browser-mcp)

by zamansheikh

browser_handle_dialogs

Set whether alert, confirm, and prompt dialogs on a tab are accepted or dismissed and provide prompt text, enabling browser automation to proceed without manual popup handling.

Instructions

Set how alert/confirm/prompt dialogs are answered on a tab (they are auto-accepted by default and logged to browser_console).

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "browser_handle_dialogs"
  }
}

Input Schema

NameRequiredDescriptionDefault
tabIdNoTab to act on. Defaults to the tab last opened/selected by an agent, else the active tab.
acceptNo
promptTextNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.1

TDQS

B3.4/5.0
Behavior3/5

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

With no annotations, the description carries the full burden, and it does disclose two useful traits: dialogs are auto-accepted by default, and answers are logged to browser_console. It omits whether the setting persists for the tab across navigations, whether it applies to already-open dialogs or only future ones, and how a confirm is dismissed when accept is false.

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

Conciseness4/5

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

A single front-loaded sentence with the key behavior first and the default plus logging destination in a compact parenthetical. Nothing is padded, though the parenthetical carries load-bearing information that could be given its own clause.

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

Completeness3/5

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

For a three-parameter tool with no annotations and no output schema, the description covers the core behavior and default state but leaves the scope and lifetime of the setting, the dismiss path, and two of three parameter meanings underspecified.

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 33%: only tabId is documented, while accept and promptText are bare. The description's phrasing about 'how dialogs are answered' and the naming of prompt dialogs lets an agent infer accept and promptText, but it never states what promptText defaults to or that it is ignored when accept is false, so compensation is partial.

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?

States a specific verb and object: setting how alert/confirm/prompt dialogs are answered on a tab. That is concrete and distinguishable from all listed siblings, none of which deal with dialogs, though the description never explicitly contrasts itself with an alternative.

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

Usage Guidelines3/5

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

Usage is implied rather than stated: the parenthetical notes dialogs are auto-accepted by default, which tells an agent this tool is only needed when that default is wrong, but there is no explicit 'use when' clause, no mention of dismiss/deny workflows, and no guidance on when to leave the default in place.

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