Skip to main content
Glama

Decide what the page’s own native dialogs do

qa_dialogs

Suppress or answer browser dialogs like confirm(), alert(), prompt(), and "Leave site?" prompts by setting a per-tab policy, so navigation and flows proceed without blocking. Every suppressed dialog is logged as a finding.

Instructions

The browser's OWN dialogs — “Leave site? Changes you made may not be saved”, confirm(), alert(), prompt() — are drawn outside the document, so no click of any kind can reach their buttons. Nothing on this bridge can press them and nothing in any page can. What IS reachable is the page's REQUEST for them, and that is what this changes: beforeunload:true stops the app from asking, so the navigation simply proceeds; confirm:"accept"|"dismiss" decides what confirm() returns; alert:true swallows alerts; prompt supplies the string (or null to cancel). op:'list' is free and reads the policy in force; setting one needs the Agent control consent, because an auto-accepted confirm can be the one in front of Delete. SCOPE: this tab, until it closes; it survives reloads of it. EVERY suppressed dialog is logged as a finding carrying the question the page asked and the answer given — so never report that the app stopped asking. It asked; Qiksy answered. Clear it (op:'clear') as soon as the flow is through.

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": "qa_dialogs"
  }
}

Input Schema

NameRequiredDescriptionDefault
opNoDefault 'set'
alertNotrue = swallow alert() instead of blocking on it
tabIdNoTarget tab (from qa_tabs); omit for the active tab
promptNoWhat prompt() returns; null cancels it
confirmNoWhat confirm() returns; null removes the override
beforeunloadNotrue = let navigation through without the browser’s “Leave site?” prompt

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.86.2

TDQS

A4.8/5.0
Behavior5/5

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

With no annotations supplied, the description carries the full behavioral burden and does: consent requirement for setting policy, tab-scoped lifetime that survives reloads, and the fact that every suppressed dialog is logged as a finding with the question and answer. It even warns against misreporting suppression as the app not asking.

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?

Front-loaded with the crucial framing that native dialog buttons are unreachable, then policy semantics, then scope and logging. Dense but nearly every sentence earns its place; heavy ALL-CAPS emphasis and curved quotes make it slightly harder to scan than necessary.

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

Completeness5/5

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

For a 6-parameter, no-output-schema, no-annotation tool, the description covers consent, scope and persistence, logging side effects, cleanup, and the safety rationale. Nothing an agent needs to invoke it correctly is missing.

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 100%, so per-parameter text already documents op, alert, prompt, confirm, tabId and beforeunload. The description still adds consequence-level meaning — that beforeunload:true lets navigation proceed rather than blocking, and that prompt null cancels — going slightly beyond the schema's restatement.

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 concrete verb and resource — controlling the page's native browser dialogs (beforeunload, confirm, alert, prompt) — and explicitly separates that from what click tools can do ("no click of any kind can reach their buttons"). An agent can tell immediately that this changes what the page's dialog requests return, not the dialogs themselves.

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

Usage Guidelines5/5

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

Gives per-operation guidance (op:'list' is free, op:'set' needs Agent control consent, op:'clear' once the flow is through) and a clear prohibition against trying to click native dialog buttons. It also names the risk condition that motivates caution: an auto-accepted confirm can be the one in front of Delete.

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