Skip to main content
Glama

browsercat_click

Click elements on web pages using CSS selectors to automate interactions during browser automation sessions.

Instructions

Click an element on the page

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
selectorYesCSS selector for element to click

Implementation Reference

  • Handler implementation for the browsercat_click tool. It uses Puppeteer's page.click() to click the element matching the provided CSS selector, with error handling.
    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, }; }
  • Schema definition for the browsercat_click tool, specifying the required 'selector' input parameter.
    { 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)
    Tool registration via ListToolsRequestSchema handler, which returns the TOOLS array containing browsercat_click.
    server.setRequestHandler(ListToolsRequestSchema, async () => ({ tools: TOOLS, }));
  • index.ts:425-427 (registration)
    CallToolRequestSchema handler registration, which dispatches tool calls to handleToolCall where browsercat_click case is implemented.
    server.setRequestHandler(CallToolRequestSchema, async (request) => handleToolCall(request.params.name, request.params.arguments ?? {}) );

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