Skip to main content
Glama

ie_dialog

Accept, dismiss, or answer JavaScript alert, confirm, and prompt dialogs in Edge IE mode, including prompt text entry, and refuse system dialogs that need user action.

Instructions

Handle a script dialog (alert/confirm/prompt). action: accept (default) | dismiss | text | sendkeys (with text, for a prompt; it also accepts). Without target it uses the driver's alert, then a script alert or confirm window of the session. With target="hwnd:" (a script_dialog from ie_windows or a NOTICE) it needs no driver: it presses that window's button (alert: OK; confirm: accept = OK/true, dismiss = Cancel/false) after checking that it really is the session's own alert or confirm; a confirm's message is not readable through its window, so action=text then asks the driver alert when it can. A dialog shown as a TaskDialog (IE's "leave this page?" prompt has that shape) is accepted, with or without target, only when the page's instrumentation recorded it (a pending dialog-open record, see ie_console); otherwise accept is refused: ask the user. Answers carry that record as evidence. A prompt is answered only through the driver alert, so a prompt raised inside a showModalDialog window cannot be answered (ask the user). System dialogs (file, print, security prompts) are never answered: 'system dialog: ask the user'.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "ie_dialog"
  }
}

Input Schema

NameRequiredDescriptionDefault
textNotext for sendkeys
actionNoaccept | dismiss | text | sendkeys
targetNohwnd:<n>: the script dialog window to answer through the window path (no driver needed)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.1

TDQS

A4.7/5.0
Behavior5/5

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

No annotations are supplied, so the description carries the full burden, and it does: it discloses with/without-target behavior, the need for instrumentation records for TaskDialog shapes, the prompt limitation inside showModalDialog, and that system dialogs are refused. It also notes that answers carry the dialog-open record as evidence, which is important behavioral context.

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 paragraph is dense and front-loads the purpose and actions, with each subsequent sentence adding a concrete condition. It is long but nearly every clause earns its place; a bulleted structure for the target/driver and TaskDialog rules would improve scanability slightly.

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?

For a complex dialog-handling tool with no output schema, the description is thorough on conditions, prerequisites, and refusal cases. It only lightly indicates what the returned evidence looks like ('Answers carry that record as evidence'), leaving return semantics somewhat implicit rather than fully specified.

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 100%, so baseline is 3, but the description adds genuine meaning: it explains that action=sendkeys also accepts the prompt, that text is for sendkeys/accept, and that target="hwnd:<n>" selects the no-driver window path. This goes beyond the brief schema field descriptions.

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 ('Handle a script dialog (alert/confirm/prompt)') and enumerates the four actions. It is clearly distinguishable from siblings, and explicitly references ie_windows and ie_console for related operations.

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?

Gives explicit when-to-use conditions: without target it uses the driver alert, with target="hwnd:<n>" it takes the window path and needs no driver. It also states the fallback ('ask the user') and the exclusion that system dialogs are never answered, so the agent can route without inference.

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