Skip to main content
Glama
Browser Controller

Browser Controller

by compnew2006

browser_handle_dialog

Accept or dismiss an open browser alert, confirm, or prompt and supply prompt text when required. Returns NO_DIALOG if no dialog is open.

Instructions

Accept or dismiss the open alert, confirm or prompt; promptText answers a prompt. No open dialog: NO_DIALOG.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "tabId": "<tabId>",
      "accept": "<accept>"
    },
    "name": "browser_handle_dialog"
  }
}

Input Schema

NameRequiredDescriptionDefault
tabIdYes
acceptYes
promptTextNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv3.5.0

TDQS

A3.5/5.0
Behavior3/5

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

With no annotations, the description carries the full burden: it discloses that the tool mutates dialog state and that a missing dialog yields NO_DIALOG, which is genuinely useful error context. It does not explain whether the call blocks until the page settles, what accept=false does to a prompt's value, or whether promptText is ignored for alert/confirm types.

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?

Two short sentences, front-loaded with the action, followed by the parameter note and the error condition. Nothing is redundant and every clause conveys usable information.

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 dialog tool with no output schema and no annotations, the definition covers the core action and one error path adequately. It is still missing tabId semantics and what a successful call returns or changes, so an agent must guess at those.

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 coverage is 0%, so the description must compensate, and it partially does: 'accept or dismiss' maps to the accept boolean and 'promptText answers a prompt' explains the third parameter and its conditional relevance. The required tabId parameter is never explained (which tab's dialog is targeted), leaving a meaningful gap.

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?

States a specific verb pair (accept/dismiss) against a specific resource (the open alert, confirm or prompt), so the agent knows exactly what this tool acts on. It does not need to distinguish itself from siblings, none of which touch dialogs, but it also never names an alternative.

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?

Usage is implied by 'the open alert, confirm or prompt' and the NO_DIALOG precondition tells the agent what state must exist first. There is no explicit when-to-use versus alternatives guidance (e.g. what to do if no dialog appears, or how this interacts with browser_click that triggered the dialog).

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