Skip to main content
Glama

click_by_text

Click buttons, links, tabs, radios, or checkboxes by their visible text. Scrolls element into view before clicking for reliability.

Instructions

Click a button, link, tab, radio, or checkbox by its visible text. Much more reliable than coordinate clicking. Scrolls element into view before clicking.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
textYesVisible text to search for (case-insensitive partial match)
element_typeNoType of element to click (default: 'any')
indexNoWhich match to click if multiple found (0-based, default: 0)
browserNo'safari' or 'chrome' (defaults to Safari)
Behavior4/5

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

With no annotations, the description discloses that the tool scrolls elements into view before clicking, which is a useful behavioral detail. It does not cover error handling or waiting, but for a simple click action, this 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 three sentences, front-loaded with the action and immediately differentiates from alternatives. No wasted words.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the simplicity of the tool and the parameter descriptions, the context is largely complete. It lacks details on return values or post-click behavior, but these are often implicit for a click action.

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?

The input schema provides detailed descriptions for all 4 parameters (100% coverage). The description adds context by mentioning visible text and scrolling, but does not significantly enhance parameter understanding beyond 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?

The description clearly states that the tool clicks UI elements by visible text, listing specific element types (button, link, tab, radio, checkbox). It distinguishes itself from coordinate-based clicking, which is a key sibling differentiator.

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 explicitly contrasts with coordinate clicking, indicating a preferred use case. However, it does not mention when not to use this tool or provide alternatives for other sibling tools like click_element.

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/PeterHdd/macos-control-mcp'

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