Skip to main content
Glama

browser_click

Simulate mouse clicks on web page elements to automate user interactions in browser automation workflows.

Instructions

Click element

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
elementYes
refYes

Implementation Reference

  • index.js:332-339 (registration)
    Registration of the 'browser_click' tool in the MCP server.
    server.tool('browser_click', 'Click element', {
      element: z.string(),
      ref: z.string()
    }, async (args) => {
      const check = requireActivePage();
      if (check) return check;
      return proxyToolCall('browser_click', args);
    });
  • The proxy function that calls the actual browser-automation client for the 'browser_click' tool.
    async function proxyToolCall(toolName, args) {
      log(`[proxyToolCall] ${toolName} with args: ${JSON.stringify(args)}`);
      const { client } = await getOrCreateInstance();
      log(`[proxyToolCall] got client for port ${assignedPort}`);
    
      // Update last used
      if (assignedPort && instances.has(assignedPort)) {
        instances.get(assignedPort).lastUsed = Date.now();
      }
    
      try {
        log(`[proxyToolCall] Calling client.callTool...`);
        const result = await client.callTool({ name: toolName, arguments: args || {} });

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/OMGEverdo/browser-pool-mcp'

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