Skip to main content
Glama

handle_alert

Accept or dismiss blocking system alerts and in-app dialogs by finding the correct button from the UI tree, no coordinates needed. Specify button text for precise taps.

Instructions

Accept or dismiss a blocking alert/dialog (system permission prompts, 'Open in …?' sheets, in-app modals). Finds the right button from the current UI tree — no coordinates needed. Use buttonText for a specific button. Returns what was tapped and what changed; if no alert is present you get the current tree.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
actionNoDefault 'dismiss' (the safe choice)
deviceNoDevice id from list_devices. Optional when exactly one device is booted.
buttonTextNoTap this specific button instead of the action vocabulary
Behavior4/5

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

With no annotations, the description carries the full burden. It states the tool returns what was tapped and what changed, and returns the current tree if no alert is present. It also notes no coordinates are needed, implying UI-tree-based interaction. This provides adequate transparency for agent decision-making, though it could mention any side effects or permission requirements.

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?

Three sentences, each front-loaded with essential information. First sentence covers purpose and examples, second explains mechanism, third gives usage tip and return behavior. No unnecessary words, every sentence earns its place.

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?

For a tool with 3 parameters and no output schema, the description covers return behavior, edge cases (no alert), and usage advice (buttonText). It differentiates from sibling tools effectively. The description is complete for a simple interaction tool.

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 100% and the schema already includes the descriptions for all three parameters (action, device, buttonText). The narrative description does not add additional meaning beyond what is in the schema, so baseline score of 3 is appropriate.

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 clearly states the tool accepts or dismisses blocking alerts/dialogs, with specific examples (system permission prompts, sheets, modals). It distinguishes from siblings by emphasizing 'no coordinates needed' and ability to find the right button from the UI tree.

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?

The description provides clear context for when to use this tool (blocking alerts) and how to use buttonText for specific buttons. It mentions default action (dismiss) and return behavior if no alert. However, it does not explicitly state when not to use it or compare with alternatives like tap or press_button.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/roti-c137/twiddle-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server