Skip to main content
Glama

JavaScript dialogs

dialog

Inspect recent alert, confirm, and prompt popups, clear the log, or set automatic answers to prevent blocking during browser automation.

Instructions

Inspect recent alert/confirm/prompt dialogs, clear the log, or change how future dialogs are answered. Interception avoids blocking automation.

Input Schema

NameRequiredDescriptionDefault
tabIdNo
actionNostatus
promptNoAnswer for window.prompt.
confirmNoAnswer for window.confirm.
interceptNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.3

TDQS

A3.5/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 behavioral burden. It usefully discloses that interception prevents dialogs from blocking automation and that a log of recent dialogs exists, which is real context. However, it does not say what clearing destroys, whether a default policy applies on first use, or what inspection returns.

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?

Two sentences with zero filler; the operational modes are front-loaded and the behavioral caveat follows. Every clause contributes information.

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 five-parameter tool with no annotations, no output schema, and 40% schema coverage, the description covers the core actions but omits the intercept flag's effect and the tabId scoping. It is adequate to start, not complete.

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 description coverage is only 40% (only prompt and confirm are documented), so the description must compensate. It explains the three action modes but leaves tabId and intercept opaque, and never states that prompt/confirm supply the answers used for future dialogs. It adds partial meaning over the schema but does not close the gap.

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 uses specific verbs (inspect, clear, change) tied to a concrete resource (alert/confirm/prompt dialogs), so an agent understands this manages JS dialogs rather than general page state. It lacks explicit contrast with siblings like console or evaluate, but the resource is distinct enough to separate it.

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 through the three enumerated modes (inspect, clear, change policy), which maps loosely to the action enum, but there is no explicit statement of when to use this versus alternatives such as console or evaluate, nor any prerequisites. The 'interception avoids blocking automation' line hints at the motivating context but is not a routing rule.

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