Skip to main content
Glama

handle_dialog

Destructive

Handle JavaScript dialogs in a live browser tab by accepting, dismissing, or reporting them to avoid automation interruption.

Instructions

Inspect or handle a JavaScript dialog on the requested real-browser tab. action is dismiss, accept, or manual; manual reports the dialog without choosing.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
actionYes
timeoutNo
session_idNo
prompt_textNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

B3/5.0
Behavior3/5

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

The description adds value by explaining that 'manual' reports the dialog without choosing, which clarifies one non-destructive behavior. However, it does not elaborate on the effects of dismiss or accept (e.g., losing unsaved changes, clicking OK/Cancel), and it does not explain the role of timeout or session_id. Since the annotations already declare destructiveHint=true, the description doesn't contradict them but doesn't add much beyond that.

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?

The description is extremely concise: two sentences that state the purpose and list the action options. There is no wasted text, and the core information is front-loaded. This is an efficient use of words.

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?

The tool has four parameters, one required, and an output schema, but the description does not cover essential context. It omits the meaning of timeout (likely how long to wait for the dialog), session_id (which tab), and prompt_text (input for prompt dialogs). It also doesn't explain what happens after the action (e.g., return value or page behavior). For a tool that can destructively handle dialogs, this is under-specified.

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

Parameters2/5

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

With 0% schema description coverage, the description must explain the parameters. It only explains 'action' by listing valid values (dismiss, accept, manual). The other three parameters (timeout, session_id, prompt_text) are not described at all, leaving the agent without necessary information to use them correctly. The description partially compensates for the lack of schema documentation but is insufficient.

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 identifies the tool's function: inspecting or handling a JavaScript dialog on a real-browser tab. It specifies the resource (JavaScript dialog) and the action (handle/inspect), and lists the valid action values. However, it does not explicitly differentiate from the sibling tool resolve_leave_dialog, which might also handle a specific type of dialog.

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

Usage Guidelines2/5

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

The description provides no guidance on when to use this tool versus alternatives such as resolve_leave_dialog or other dialog-related tools. It does not state when to use dismiss versus accept versus manual, nor does it mention prerequisites like whether a dialog must already be present. The usage context is implied but not explicit.

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