Skip to main content
Glama

click

Automate clicks on web page elements using CSS selectors to test consent management platforms and browser interactions in the Autoconsent MCP server environment.

Instructions

Click elements on the page

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
selectorYesCSS selector for element to click

Implementation Reference

  • The switch case in handleToolCall that implements the 'click' tool by calling page.click on the given CSS selector, with success/error response handling.
    case "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, }; }
  • src/index.ts:65-78 (registration)
    Registration of the 'click' tool in the TOOLS array, including name, description, and input schema definition.
    { name: "click", description: "Click elements on the page", inputSchema: { type: "object", properties: { selector: { type: "string", description: "CSS selector for element to click", }, }, required: ["selector"], }, },
  • Input schema for the 'click' tool, defining the required 'selector' parameter.
    inputSchema: { type: "object", properties: { selector: { type: "string", description: "CSS selector for element to click", }, }, required: ["selector"], },

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/noisysocks/autoconsent-mcp'

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