Skip to main content
Glama

scraping_browser_click

Click on web page elements using CSS selectors to automate browser interactions for data collection and navigation.

Instructions

Click on an element. Avoid calling this unless you know the element selector (you can use other tools to find those)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
selectorYesCSS selector for the element to click

Implementation Reference

  • The execute function that handles the tool execution: retrieves the browser page and clicks the element matching the given CSS selector.
    execute: async({selector})=>{
        const page = await (await require_browser()).get_page();
        try {
            await page.click(selector, {timeout: 5000});
            return `Successfully clicked element: ${selector}`;
        } catch(e){
            throw new UserError(`Error clicking element ${selector}: ${e}`);
        }
    },
  • Zod schema defining the input parameters: a required 'selector' string for the CSS selector.
    parameters: z.object({
        selector: z.string().describe('CSS selector for the element to click'),
    }),
  • The tool is registered by being included in the exported 'tools' array (line 312), which is used for MCP tool registration when API_TOKEN is set.
    export const tools = process.env.API_TOKEN ? [
        scraping_browser_navigate,
        scraping_browser_go_back,
        scraping_browser_go_forward,
        scraping_browser_links,
        scraping_browser_click,
        scraping_browser_type,
        scraping_browser_wait_for,
        scraping_browser_screenshot,
        scraping_browser_get_text,
        scraping_browser_get_html,
        scraping_browser_scroll,
        scraping_browser_scroll_to,
    ] : [scraping_browser_activation_instructions];
Behavior2/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 of behavioral disclosure. It mentions the need for a known selector, which is useful context, but fails to describe critical behavioral traits such as what happens after clicking (e.g., page navigation, element state changes), error handling (e.g., if selector is invalid), or performance implications (e.g., delays). For a mutation tool with zero annotation coverage, this is a significant gap.

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 appropriately sized and front-loaded, with two sentences that directly convey the action and usage guidance without any wasted words. Every sentence earns its place by providing essential information efficiently.

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?

Given the tool's complexity (a mutation action in a browser context) and the absence of annotations and output schema, the description is incomplete. It covers the basic purpose and usage but lacks details on behavioral outcomes, error cases, and return values. This is adequate as a minimum viable description but has clear gaps for effective tool invocation.

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 has 100% description coverage, with the 'selector' parameter fully documented in the schema. The description adds minimal value beyond the schema by implying the selector must be known, but does not provide additional semantics like format examples or constraints. Given the high schema coverage, the baseline score of 3 is appropriate.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the action ('Click on an element') and the resource ('an element'), making the purpose specific and understandable. However, it does not explicitly distinguish this tool from potential sibling tools like 'scraping_browser_navigate' or 'scraping_browser_type', which are also interaction tools but for different actions, so it lacks sibling differentiation.

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 on when to use this tool ('unless you know the element selector') and suggests alternatives ('you can use other tools to find those'), such as 'scraping_browser_get_html' or 'scraping_browser_links' for selector discovery. It does not explicitly state when not to use it or list all alternatives, but the guidance is sufficient for effective usage.

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/dsouza-anush/brightdata-mcp-heroku'

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