Skip to main content
Glama

browser_handle_dialog

Read-onlyIdempotent

Respond to a pending JS dialog (alert/confirm/prompt). Pass accept=true for OK or false for Cancel. For prompt() dialogs also pass prompt_text. Dialogs are queued at page-open time; returns {pending: false} if none is waiting.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
acceptYes
page_idYes
prompt_textNo
in_workspaceNoRun this one call in this workspace id instead of the session's. Nothing is stored; other sessions are not affected.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • addedInput schema / properties / in_workspace
      Added value: +{
      +  "description": "Run this one call in this workspace id instead of the session's. Nothing is stored; other sessions are not affected.",
      +  "type": "integer"
      +}
  2. Added
  3. Removed
  4. Added
  5. Removed
  6. Added
  7. Removed
  8. Added
  9. Removed
  10. First observed

TDQS

A4.4/5.0
Behavior4/5

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

Annotations already declare readOnly/idempotent/non-destructive, so safety is covered. The description adds genuinely new behavioral context: dialogs are queued at page-open time and the call returns {pending: false} when nothing is waiting, which tells the agent how to interpret a no-op result.

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?

Four tight sentences, purpose front-loaded, then parameter semantics, then runtime behavior. No filler and every sentence adds actionable information.

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?

With no output schema and low schema description coverage, the description steps in to explain return shape and prompt handling, which is adequate for a 4-param tool. Only page_id and error cases are left unaddressed.

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 coverage is only 25% (just in_workspace), so the description carries most of the burden and does so well: accept is mapped to OK/Cancel semantics and prompt_text is tied to the prompt() case. page_id is left implicit but is self-evident from the required field.

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 (Respond) and resource (pending JS dialog) plus the dialog types (alert/confirm/prompt). No other browser_* sibling handles dialogs, so it is unmistakably distinct from browser_click, browser_snapshot, etc.

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?

Clearly identifies the triggering condition (a pending dialog) and the response options (accept=true for OK, false for Cancel, prompt_text for prompt()). It does not name alternatives or when-not-to-use, but for a uniquely-scoped tool that gap is minor.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.