Skip to main content
Glama

handle_dialog

Configure whether JavaScript alert, confirm, and prompt dialogs are accepted or dismissed, and view recent dialog events to control browser interaction flow.

Instructions

Set how JS alert/confirm/prompt dialogs are handled ('accept' or 'dismiss') and show recent ones.

Input Schema

NameRequiredDescriptionDefault
actionNoaccept

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

B3.3/5.0
Behavior3/5

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

Annotations already declare that the tool is not read-only, not destructive, and open-world. The description adds some behavioral context by noting that it 'shows recent ones,' implying a read-like return, but it does not explain whether the chosen action applies to future dialogs only, whether recent dialog history is preserved, or what the output contains. With annotations covering the safety profile, the added context is useful but not complete.

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?

The description is a single compact sentence with the core configuration behavior front-loaded. The appended 'and show recent ones' mixes a second function into the same clause, but there is no filler or repetition.

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?

Because an output schema exists, the description does not need to explain return values. Annotations cover the general safety profile, and the parameter values are supplied. However, for a browser-automation configuration tool, the description never states the scope of the setting, its persistence, or how it relates to actual dialog occurrences during navigation, leaving moderate contextual gaps.

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 description coverage is 0%, so the description must carry semantic weight. It does by defining the accepted values ('accept' or 'dismiss') for the single action parameter, which the schema does not express as an enum. It does not explicitly name the parameter or describe how the default interacts with omitted values, but the meaning is clear.

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 a specific verb and resource combination: it sets how JS alert/confirm/prompt dialogs are handled and also shows recent ones. This is clear enough for an agent to select the tool without opening the schema, although there is no sibling tool dedicated to dialog handling, so explicit differentiation is unnecessary.

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 does not say when to use this tool versus alternatives, nor does it give any prerequisites or exclusions. It implies that the tool configures dialog behavior and reports recent dialogs, but an agent receives no guidance on when to call it or how it interacts with other browser-automation tools.

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