Skip to main content
Glama

get_captured_dialog

Consume a dialog-capture interval to fetch the URL, type, message, and one-use ID of exactly one pending Chrome JavaScript dialog for verification and OK/Cancel or prompt handling.

Instructions

End and consume the capture interval identified by capture_id. Succeeds only if exactly one dialog-opening event was observed and that same dialog is still pending. Returns Chrome-reported URL, type, message and a one-use dialog_id for independent provenance and authorisation checks. Zero or multiple openings return incorrect_dialog_count with expected_count and observed_count. Every read consumes the token, including failures; do not poll it. After failure, stop dialog-handling attempts and inform the user, including the observed count for a count error. Do not respond to another dialog, silently re-arm, or repeat the operation; ask the user to resolve any remaining dialog. This stops the operation attempt, not the conversation turn. Do not capture the browser through Computer Use while a dialog is pending.

Input Schema

NameRequiredDescriptionDefault
capture_idYes
browser_tokenYesPrivate capability token for this managed browser session; use the token returned by launch_chrome.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.1

TDQS

A4.6/5.0
Behavior5/5

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

With no annotations, the description carries the full load and does it well: it discloses that the token is one-use and that "Every read consumes the token, including failures", names the exact error payload (incorrect_dialog_count with expected_count and observed_count), and scopes the effect ("stops the operation attempt, not the conversation turn"). It also warns against capturing the browser through Computer Use while a dialog is pending.

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 core action and its single-use constraint are front-loaded, and the behavioural rules follow in roughly priority order. It runs long for a two-parameter call, with some overlap between "After failure, stop dialog-handling attempts" and "Do not respond to another dialog, silently re-arm, or repeat the operation", but the redundancy reinforces a safety-critical constraint rather than padding.

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

Completeness5/5

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

No output schema exists, so the description supplies the return shape itself (Chrome-reported URL, type, message, one-use dialog_id) plus the failure payload. Combined with no annotations, the preconditions, consumption rule, and post-failure procedure make the definition self-sufficient for correct invocation.

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?

At 50% schema description coverage, the schema documents browser_token (source and format) but says nothing about capture_id. The description supplies that capture_id names a capture interval that is consumed on read, which is real added meaning, but neither field's format or provenance is elaborated beyond the schema, so this sits at the baseline rather than above it.

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 a specific verb and resource ("End and consume the capture interval identified by capture_id") rather than restating the get_ name, and immediately signals the consuming semantics that separate it from get_dialog_status. The closing rules (do not respond, do not silently re-arm, do not poll) implicitly demarcate it from respond_to_dialog and start_dialog_capture.

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

Usage Guidelines5/5

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

Explicit preconditions ("Succeeds only if exactly one dialog-opening event was observed and that same dialog is still pending"), explicit prohibitions ("do not poll it", "Do not respond to another dialog, silently re-arm, or repeat the operation") and a prescribed failure path (stop attempts, inform the user with the observed count, ask the user to resolve). Little is left to inference.

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