Skip to main content
Glama

browsercat_click

Click web page elements using CSS selectors to automate browser interactions and perform actions like button clicks or link navigation.

Instructions

Click an element on the page

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
selectorYesCSS selector for element to click

Implementation Reference

  • The handler for the 'browsercat_click' tool within the handleToolCall function's switch statement. It clicks the element matching the provided CSS selector using Puppeteer's page.click() method and returns success/error messages.
    case "browsercat_click": try { await page.click(args.selector); return { content: [{ type: "text", text: `Clicked: ${args.selector}`, }], isError: false, }; } catch (error) { return { content: [{ type: "text", text: `Failed to click ${args.selector}: ${(error as Error).message}`, }], isError: true, }; }
  • The JSON schema definition for the 'browsercat_click' tool, specifying the required 'selector' parameter as a CSS selector string.
    { name: "browsercat_click", description: "Click an element on the page", inputSchema: { type: "object", properties: { selector: { type: "string", description: "CSS selector for element to click" }, }, required: ["selector"], }, },
  • index.ts:421-423 (registration)
    Registers the list of available tools (including browsercat_click via the TOOLS array) with the MCP server using ListToolsRequestSchema.
    server.setRequestHandler(ListToolsRequestSchema, async () => ({ tools: 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/pipethedev/browsercat-mcp-server'

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