Skip to main content
Glama

click_element

Destructive

Performs a verified click on a specific element in the current frame. Requires a CSS selector that matches exactly one visible element, with explicit confirmation to authorize side effects.

Instructions

Performs one verified, auditable click in the currently selected frame. Use it when the task requires activating a known button, link, or control after selecting the correct page/frame and identifying a CSS selector; it is the preferred minimal interaction primitive over arbitrary evaluate_script code. It does not discover elements, type text, or silently guess among matches: the selector must resolve to exactly one element unless index is explicit, and the chosen element must be visible. A click can submit data, navigate, or trigger external effects, so confirm=true is required and the result reports the exact resolved element.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
indexNoExplicit zero-based match index. Required when the selector matches more than one element.
buttonNoMouse button. Defaults to left.left
confirmNoMust be true to authorize this specific click because it can submit data, navigate, or trigger external side effects.
timeoutNoMaximum wait time in milliseconds. If set to 0, the default timeout will be used.
selectorYesCSS selector evaluated only in the currently selected frame. Use select_frame first when the target is inside an iframe.
modifiersNoOptional keyboard modifiers held during the click.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
okYesWhether the tool completed successfully.
dataNo
toolYesStable MCP tool name.
errorNo
summaryYesConcise human-readable outcome.
Behavior5/5

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

Disclosures beyond annotations: confirms destructive side effects, requirement for visibility and exact match, and mentions confirm flag authorizes side effects. No contradiction with annotations.

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?

Single paragraph is front-loaded with core purpose, then usage guidelines, then constraints; every sentence adds value 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 6 parameters, destructive nature, and output schema, the description covers purpose, usage, parameter roles, and behavioral notes comprehensively, leaving no significant gaps.

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%, but description adds contextual value for each parameter (e.g., selector limited to current frame, index needed for multiple matches, confirm to authorize effects), justifying a score above baseline.

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?

Description explicitly states it performs a verified, auditable click on a known button, link, or control, distinguishing itself from siblings like evaluate_script and select_frame.

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?

Explicitly states when to use (activating known controls after frame selection) and when not (does not discover elements, type text, or guess matches), and mentions prerequisite of selecting frame and requirement of confirm=true.

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/zhizhuodemao/js-reverse-mcp'

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