Skip to main content
Glama

dialog

Accept or dismiss pending JavaScript confirm, prompt, or beforeunload popups on a browser tab; supply text to answer prompts. Alerts are auto-accepted.

Instructions

Accept or dismiss the pending JS dialog (confirm, prompt, beforeunload) on a tab; text answers a prompt. Alerts are auto-accepted.

Input Schema

NameRequiredDescriptionDefault
tabNoTab id such as "t3"; default is the active tab
textNo
actionYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.2/5.0
Behavior3/5

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

Annotations only provide openWorldHint, so the description carries most of the burden; it discloses useful behavior (alerts auto-accepted, text answers a prompt, accept vs dismiss). It omits failure behavior when no dialog is pending, whether a dismissal loses form data for beforeunload, and whether the call blocks.

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?

A single tight sentence with the action and target front-loaded, followed by the prompt-text and auto-alert caveats. Nothing is wasted.

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?

There is no output schema, and the description covers the key semantics (action, text, which dialog types) for a low-complexity tool. A note on the no-pending-dialog case would close the remaining gap.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 33% (only 'tab' is documented), so the description compensates by explaining that 'text' answers a prompt, which the schema leaves bare. The accept/dismiss enum is self-describing; the active-tab default is already in the 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 precise verb pair (accept or dismiss) and a specific resource (pending JS dialog: confirm, prompt, beforeunload) on a tab. No sibling tool in the list covers dialog handling, so the agent can identify it unambiguously.

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?

The clause 'Alerts are auto-accepted' is real when-not-to-use guidance, telling the agent not to call this for alert dialogs. It also clarifies that text only matters for prompts. It stops short of saying when a dialog appears (e.g., after click/type) or what happens if none is pending.

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