Skip to main content
Glama

dialogs

Get and manage native browser dialogs (alert, confirm, prompt, beforeunload) raised by a page. Set a policy to accept or dismiss future dialogs, preventing renderer blocks and timeouts.

Instructions

Native dialogs (alert/confirm/prompt/beforeunload) the page raised, and how they were answered (requires --enable-observers). With observers on, dialogs are intercepted rather than left to block the renderer - which is what otherwise turns a click that opens a confirm() into a mystery TIMEOUT. Set policy:'accept' to answer confirms with true.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
clearNo
limitNo
tabIdNoTarget tab id (defaults to the active tab)
policyNoHow to answer future dialogs (default dismiss: confirm->false, prompt->null)
frameIdNoAct inside this frame (ids come from frames_list)
sinceSeqNo
allFramesNoSearch every frame of the tab and act on the first that matches - use when a selector should match but does not (the element is in an iframe)
promptTextNoText to answer prompt() with when policy is 'accept'

Schema Changelog

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

  1. Addedv0.7.0

TDQS

A3.5/5.0
Behavior4/5

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

With no annotations, the description carries the burden. It discloses the requirement for --enable-observers, explains the interception behavior, and clarifies that without observers a confirm() can cause a timeout. It also hints at the effect of policy on future dialogs. This adds valuable context beyond the schema, though it doesn't describe return format or side effects like clearing.

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?

The description is two sentences but packs significant information, including the purpose, the observer requirement, the timeout risk, and a policy example. It is front-loaded with the resource and behavior. While not extremely concise, it avoids fluff and each sentence contributes to understanding.

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 8 parameters, no output schema, and no annotations, the description is incomplete. It does not explain the return format, what 'clear' does, how 'limit' or 'sinceSeq' work, or the behavior for 'dismiss' policy beyond schema hints. The tool's overall workflow (retrieving dialogs, setting policies, clearing) is not fully described, leaving gaps for an agent.

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 63%, so the description does not need to fully compensate. It does add meaning to the 'policy' parameter by explaining the accept behavior with an example. However, it does not clarify other parameters like clear, limit, or sinceSeq, which remain partially or fully undocumented. The added value is moderate and primarily focused on policy.

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 states the tool deals with native dialogs (alert/confirm/prompt/beforeunload) and how they were answered. It distinguishes from the 'mystery TIMEOUT' issue and mentions the interception behavior. However, it doesn't explicitly name the primary action (e.g., 'list dialogs' or 'retrieve dialog history') and relies on context to infer the tool's core function. It's more specific than a tautology but could be clearer about the main purpose.

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?

The description implies usage: it explains that with observers on, dialogs are intercepted, and suggests setting policy to 'accept' to answer confirms. It does not explicitly state when to use this tool over alternatives (e.g., when a dialog is suspected of blocking) or provide exclusions. The guidance is inferred from the context rather than directly stated.

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/Mehmoodqureshi/chrome-mcp'

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