Skip to main content
Glama
omarchy-desktop

omarchy-desktop

by martoast

Close a dialog that is hiding the page (verified)

dismiss_dialog

Closes one consent or promo dialog covering the page: sends a single Escape to the dialog ref, verifies it closed, then falls back to a dismiss control inside it.

Instructions

Close ONE dialog that is covering the page. A consent or promo overlay can hide the entire page from the accessibility tree, so read_page shows almost nothing while the site renders normally. TRY dialog_ref FIRST for cookie, sale and promotional overlays: pass the ref of the DIALOG ITSELF (a row marked DIALOG-ROOT) and it sends ONE Escape, then verifies whether that exact dialog actually closed. Some overlays respond to Escape and some ignore it — the result tells you which, and never assumes. Worth trying first because a consent banner may expose NO close button at all, only Accept/Reject/Preferences. FALL BACK in a SEPARATE CALL to control_ref when Escape is unavailable or fails verification: pass a close/dismiss control INSIDE the dialog and its own action is invoked. If dialog_ref or dialog_text is supplied, the Escape path always wins even when control_ref is also present; this prevents callers from accidentally skipping the safe first attempt. Either way this tool ONLY closes. It refuses any control that makes a substantive choice (Accept, Reject, Preferences, Subscribe and similar), because those decide something on the user's behalf — use click_element if such a choice is genuinely intended. At most one action or one keypress, never a coordinate click, never a change of keyboard focus, and the outcome is verified from a fresh read. If another dialog remains it is reported with its ref rather than closed automatically.

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": "dismiss_dialog"
  }
}

Input Schema

NameRequiredDescriptionDefault
dialog_refNoPREFERRED for cookie, sale and promotional overlays: ref of the DIALOG ITSELF (a row marked DIALOG-ROOT in read_page). Sends ONE Escape and verifies whether that exact dialog actually closed. Worth trying first: a consent banner may expose no close button at all, only Accept/Reject/Preferences. Some overlays respond to Escape and some ignore it — the result tells you which.
control_refNoFALLBACK: ref of a close/dismiss control INSIDE the dialog. Use when Escape is unavailable or fails verification. Activates that control's own action. May be combined with dialog_ref/dialog_text; the dialog identity still selects the Escape-first path; use control_ref alone on the separate fallback call.
dialog_textNoFor a dynamic dialog, pass this with dialog_ref as a stale-identity fallback, or alone when no ref survives. The exact ref is tried first; text refresh occurs only after a stale-identity refusal and must resolve exactly one dialog.
window_addressNoHyprland window address; defaults to the active window.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.8/5.0
Behavior5/5

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

With no annotations supplied, the description carries the full burden and does so: at most one action or one keypress, never a coordinate click, never a focus change, and the outcome is verified from a fresh read. It also discloses precedence (dialog_ref/dialog_text always wins over control_ref), the refusal policy for substantive choices, and that a remaining dialog is reported with its ref rather than auto-closed.

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?

Front-loaded with the effect and the first-choice parameter, and organized into TRY / FALL BACK / constraints blocks. It is dense and repeats some schema text (the Escape-then-verify rationale appears twice), which costs a little efficiency but nothing is genuinely wasted.

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 and no annotations, four optional parameters — the description covers what an agent needs: ordering, verification semantics, refusal boundaries, precedence among parameters, and how leftover dialogs are surfaced. Nothing material is left to inference.

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 the baseline is 3, but the description adds a genuine cross-parameter rule the schema does not state: if dialog_ref or dialog_text is supplied the Escape path wins even when control_ref is present. The stale-identity fallback behavior for dialog_text is reinforced in prose, though mostly duplicated from the schema.

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 ('Close ONE dialog that is covering the page') plus the diagnostic symptom it addresses (an overlay hiding the page from the accessibility tree so read_page shows almost nothing). It also names the sibling it defers to for substantive choices ('use click_element'), so an agent can separate it from click_element and escape_page without opening a schema.

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 an explicit ordered strategy: try dialog_ref first (one Escape + verification), then fall back in a SEPARATE call to control_ref, and spells out the precondition ('when Escape is unavailable or fails verification'). It also states the negative case — it refuses Accept/Reject/Preferences/Subscribe controls — and routes those to click_element.

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