Skip to main content
Glama

handle_dialog

Accepts or dismisses a browser dialog that opened on a target page, optionally entering prompt text, so automated browser sessions can continue.

Instructions

If a browser dialog was opened, use this command to handle it

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
actionYesWhether to dismiss or accept the dialog
pageIdYesTargets a specific page by ID.
promptTextNoOptional prompt text to enter into the dialog.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

C2.9/5.0
Behavior2/5

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

Annotations set readOnlyHint=false, marking this as a mutating operation, and the description does not contradict that. But it discloses nothing beyond the annotation: it never says dialogs block page execution, that accept vs dismiss produce different outcomes, or what entering promptText does to the page state.

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?

A single front-loaded sentence with no filler; the condition comes before the instruction. It is efficient, though its brevity is partly under-specification rather than deliberate economy.

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 simple three-parameter tool with full schema coverage and no output schema, the definition is minimally adequate. It omits useful context such as how to discover an open dialog, that only one dialog can be handled at a time, and what happens when no dialog is present.

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 100%, so all three parameters (action, pageId, promptText) are documented in the schema itself. The description adds no parameter meaning beyond that, which is the expected baseline when the schema does the heavy lifting.

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

Purpose3/5

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

The description names the resource (browser dialog) and a condition for acting, but 'use this command to handle it' largely restates the tool name rather than specifying what handling means. It gives no detail on the accept/dismiss outcome, though no sibling handles dialogs so differentiation is not the issue.

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?

It provides a clear trigger condition ('If a browser dialog was opened'), which is genuine when-to-use guidance. However, it offers no when-not guidance, no mention of validation steps (e.g., checking via snapshot) and no alternatives or prerequisites.

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