Skip to main content
Glama

Answer a dialog

dialog

Accept or dismiss open alert, confirm, prompt, or leave-page dialogs on the selected browser tab; provide prompt text when needed.

Instructions

Accepts or dismisses the alert, confirm, prompt or leave-page dialog open on the selected tab.

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": {
      "accept": "<accept>"
    },
    "name": "dialog"
  }
}

Input Schema

NameRequiredDescriptionDefault
textNoA prompt dialog's answer.
acceptYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.7/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 and it only partially meets it. It discloses the scope (selected tab) and the set of dialog types handled, but says nothing about blocking behavior, what happens if no dialog exists, or whether accepting a leave-page dialog discards unsaved work.

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?

A single front-loaded sentence that names the actions, the dialog variants, and the scope with no filler. Nothing could be trimmed without losing content.

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 two-parameter, side-effecting tool with no annotations and no output schema, the definition covers what the tool acts on but omits failure modes and the accept/dismiss boolean mapping. It is adequate to identify the tool but thin for invoking it correctly on the first try.

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 50%: 'text' is documented in the schema, while 'accept' has no schema description. The phrase 'accepts or dismisses' implies that the boolean selects between the two actions, which is a real addition beyond the schema, but the mapping is never made explicit and nothing says 'text' is ignored for non-prompt dialogs.

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?

The description gives a specific verb pair ('accepts or dismisses') and a precise resource ('the alert, confirm, prompt or leave-page dialog open on the selected tab'). The resource itself separates it from the page-interaction siblings (click, type, fill_date), which act on page elements rather than browser-level dialogs.

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?

It states the trigger condition clearly: a dialog must already be open on the selected tab. However, it gives no guidance on what to do when no dialog is present, whether the call waits for a dialog, or how this relates to siblings that might trigger dialogs (navigate, click, tab_close).

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