Skip to main content
Glama

get_alert_text

Retrieve the text message from an open JavaScript alert, confirm, or prompt dialog to verify the exact message during Selenium browser automation.

Instructions

Return the text message of a currently open JavaScript alert/confirm/prompt.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
timeoutNo

Schema Changelog

Changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. First observedv1.0.0

TDQS

B3.4/5.0
Behavior2/5

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

With no annotations, the description carries the full burden of behavioral disclosure. It states what the tool does but does not explain what happens if no alert is open, whether it waits for an alert, or what the timeout parameter actually does. The 'currently open' constraint is useful, but the behavior is under-disclosed.

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 with zero wasted words. The verb, resource, and context are all present and clearly structured, making it easy to parse.

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?

The tool is simple—one optional parameter and no output schema—and the description captures the core action and precondition. However, it omits the timeout parameter's semantics and any error-handling behavior, leaving small but meaningful gaps for an agent trying to call it confidently.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The schema has one parameter, timeout, with zero description coverage, and the tool description does not mention it. The name hints at waiting behavior, but the description provides no explicit meaning, units, or effect, so it fails to compensate for the schema gap.

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 names a specific verb ('Return') and a specific resource ('text message of a currently open JavaScript alert/confirm/prompt'). This clearly differentiates it from sibling alert tools such as accept_alert, dismiss_alert, and type_in_alert, and from generic get_text.

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?

The description implies the use case—when a JavaScript alert/confirm/prompt is open and the agent needs its text—and the 'currently open' precondition is clear. However, it does not explicitly state when not to use it or name alternatives, leaving usage guidance implied rather than explicit.

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

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/hakanngul/testfly-mcp'

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