Skip to main content
Glama
nfodor

Chromium ARM64 Browser

by nfodor

click

Click elements on web pages using CSS selectors for browser automation and testing workflows with Chromium on ARM64 devices.

Instructions

Click an element on the page

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
selectorYesCSS selector for the element to click

Implementation Reference

  • The core handler function for the 'click' tool. It uses Chrome DevTools Protocol (CDP) to locate the element by CSS selector, calculates its center point from the box model, and dispatches mouse press/release events to simulate a click.
    async click(selector) {
      await this.ensureChromium();
      
      // Find element
      const doc = await this.sendCDPCommand('DOM.getDocument');
      const element = await this.sendCDPCommand('DOM.querySelector', {
        nodeId: doc.root.nodeId,
        selector
      });
      
      if (!element.nodeId) {
        throw new Error(`Element not found: ${selector}`);
      }
    
      // Get element box
      const box = await this.sendCDPCommand('DOM.getBoxModel', { nodeId: element.nodeId });
      const quad = box.model.content;
      const x = (quad[0] + quad[4]) / 2;
      const y = (quad[1] + quad[5]) / 2;
    
      // Click
      await this.sendCDPCommand('Input.dispatchMouseEvent', {
        type: 'mousePressed',
        x, y,
        button: 'left',
        clickCount: 1
      });
      
      await this.sendCDPCommand('Input.dispatchMouseEvent', {
        type: 'mouseReleased',
        x, y,
        button: 'left',
        clickCount: 1
      });
      
      return {
        content: [{ type: 'text', text: `Clicked element: ${selector}` }],
      };
    }
  • The input schema definition for the 'click' tool, specifying that it requires a 'selector' string parameter.
    {
      name: 'click',
      description: 'Click an element on the page',
      inputSchema: {
        type: 'object',
        properties: {
          selector: {
            type: 'string',
            description: 'CSS selector for the element to click',
          },
        },
        required: ['selector'],
      },
    },
  • index.js:355-356 (registration)
    Registration of the 'click' tool handler in the MCP CallToolRequest switch statement, dispatching calls to the click implementation.
    case 'click':
      return await this.click(args.selector);
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. While 'click' implies a user interaction that may trigger page changes, the description doesn't specify what happens after clicking (e.g., navigation, form submission, JavaScript events), whether it waits for page loads, or error handling for invalid selectors. This is inadequate for a mutation tool with zero annotation coverage.

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 a single, direct sentence with no wasted words. It front-loads the core action ('click') and target ('element on the page'), making it immediately understandable without unnecessary elaboration.

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

Completeness2/5

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

For a tool that performs a user interaction on a web page with no annotations and no output schema, the description is insufficient. It lacks details on behavioral outcomes, error conditions, dependencies (e.g., needing a loaded page), or how it relates to sibling tools, leaving significant gaps for an agent to use it effectively.

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?

Schema description coverage is 100%, with the parameter 'selector' clearly documented as a CSS selector. The description adds no additional parameter information beyond what the schema provides, which is acceptable given the high schema coverage, resulting in the baseline score of 3.

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') and target ('an element on the page'), which is specific and unambiguous. However, it doesn't explicitly differentiate from sibling tools like 'hover' or 'select', which also interact with page elements but perform different actions.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives like 'hover', 'select', or 'fill'. It doesn't mention prerequisites (e.g., requiring a page to be loaded) or exclusions, leaving the agent to infer usage context from the tool name alone.

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/nfodor/mcp-chromium-arm64'

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