Skip to main content
Glama

Answer dialogs

browser_dialog

Control alert, confirm, and prompt dialog responses on a browser tab before an action opens them. Accept or dismiss, and persist the choice.

Instructions

Decide how alert/confirm/prompt dialogs are answered on a tab you are driving. By default they are dismissed (a confirm returns false) and reported in the action result. Call this BEFORE the action that opens the dialog: accept for the next dialog, persist to keep answering that way.

Input Schema

NameRequiredDescriptionDefault
textNoWhat to type into a prompt.
tabIdNo
acceptYes
persistNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.2

TDQS

A4.2/5.0
Behavior4/5

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

With no annotations, the description carries the behavioral burden and does so well: it discloses the default (dismissed, confirm returns false), that outcomes are reported in the action result, and the pre-emptive timing requirement. It does not describe interaction with tabId scope or error cases, so not a 5.

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?

Three sentences, front-loaded with purpose then behavior then usage. No filler; each sentence adds distinct actionable information.

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?

No output schema or annotations exist, so the description must stand alone, and it covers default behavior, timing, and the key parameter effects. Gaps remain on tabId semantics and whether text is required for prompt dialogs, keeping it from a 5.

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 only 25%, so the description must compensate. It meaningfully explains accept ('for the next dialog') and persist ('keep answering that way') and implies text applies to prompts, but tabId is left entirely unexplained in both description and schema.

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

Purpose5/5

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

States a specific verb and resource: deciding how alert/confirm/prompt dialogs are answered on a driven tab. No sibling tool in the list handles dialog resolution, so it is naturally distinguishable from browser_ask, browser_fill, and browser_act.

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?

Explicit timing guidance: 'Call this BEFORE the action that opens the dialog.' It also explains the effect of accept vs persist. There is no explicit statement of when not to use it or which alternative to prefer, so it stops short of a 5.

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