Skip to main content
Glama

click_and_wait

Click an element and wait for a specified outcome to confirm the action succeeded, avoiding silent failures like unsubmitted forms.

Instructions

⭐ Click + wait for the side-effect to land. Distinguishes a successful action from a silent failure (e.g. form invalid where click() returns success but submit never happened).

Args:
    ref / selector / text: element to click (passed through to existing
        click tools — text uses click_text fuzzy match)
    expect: what to wait for after the click. One of:
        "navigation"     — URL changes
        "url"            — URL matches expect_url_pattern (regex)
        "text"           — page contains expect_text
        "selector"       — expect_selector becomes visible
        "request"        — outgoing request matches expect_request_pattern
        "network_idle"   — no in-flight requests for 500ms
        "auto"           — try navigation→network_idle→nothing
    expect_*: target for the matching expect mode
    timeout: per-mode max wait

Returns JSON {clicked, observed: {what, evidence}, elapsed_ms}.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
refNo
selectorNo
textNo
expectNoauto
expect_url_patternNo
expect_textNo
expect_selectorNo
expect_request_patternNo
timeoutNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior4/5

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

No annotations are provided, so the description carries the full burden. It discloses the behavioral traits: click action, waiting for various conditions, and response JSON structure. It lacks explicit mention of page state changes or destructive potential, but for a click tool the transparency is adequate.

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?

The description is concise yet comprehensive. It front-loads the core purpose with an emoji, then uses a bullet list with clear labels for each parameter and value. Every sentence adds information without redundancy.

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?

Given 9 parameters and no annotations, the description covers all necessary details: what the tool does, how to use each parameter, what to expect in the return value, and the behavioral nuances of each expect mode. It is fully self-contained for an agent to invoke correctly.

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

Parameters5/5

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

The input schema has 0% description coverage, but the description adds rich semantic meaning for every parameter: explains element selection methods (fuzzy match for text), enumerates all expect modes with clear definitions, and describes the expect_* targets and timeout. This fully compensates 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 clearly states the tool performs a click and then waits for a side-effect, distinguishing it from a plain click that may silently fail. It uses a specific verb-resource pair and contrasts with 'click()' to emphasize verification of outcomes.

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 explains when to use the tool (to confirm a successful action) and contrasts it with silent failure scenarios. It does not explicitly list when not to use or name alternative sibling tools, but the purpose is clear enough for an agent to differentiate.

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/RobithYusuf/mcp-stealth-chrome'

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