Skip to main content
Glama

Handle next native dialog

tab_dialog
Destructive

Arms a one-shot accept or dismiss response for an upcoming browser alert, confirm, or prompt dialog. Optionally include prompt text; unarmed dialogs are dismissed and reported as unsupported flow.

Instructions

Arm a one-shot accept or dismiss response before the action that opens an alert, confirm or prompt. Optional prompt_text is entered only for that dialog. Unarmed dialogs are dismissed and reported as unsupported flow; check actual outcomes before retrying.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
actionYes
session_idYesSession ID returned by tab_open.
prompt_textNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.6/5.0
Behavior5/5

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

Annotations already mark destructive and open-world behavior; the description adds valuable context beyond that: one-shot nature, unarmed dialogs dismissed and reported as unsupported flow, and advice to check actual outcomes before retrying.

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?

Three sentences, front-loaded with the primary purpose, then behavioral notes. Every sentence earns its place without filler.

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

Completeness4/5

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

Covers the arm-before-dialog workflow, one-shot semantics, and unarmed fallback. However, with no output schema, it does not describe return values or what happens if no dialog appears, so not a perfect 5.

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 documents only session_id; the description compensates for low coverage by explaining prompt_text is entered only for prompt dialogs and action is a single accept/dismiss choice. It does not add further session_id semantics.

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 the specific verb 'Arm' and resource 'accept or dismiss response' for native dialogs, clarifies scope with 'alert, confirm or prompt'. It clearly distinguishes from sibling tools like tab_act by focusing on one-shot dialog handling.

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

Usage Guidelines4/5

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

Explicitly says to use it 'before the action that opens an alert, confirm or prompt', providing clear timing and context. It does not name alternatives explicitly, but the usage context is unambiguous.

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