Skip to main content
Glama

browsercat_hover

Hover over web page elements using CSS selectors to trigger interactive states and reveal hidden content during automated browser testing.

Instructions

Hover over an element on the page

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
selectorYesCSS selector for element to hover

Implementation Reference

  • The handler logic for browsercat_hover tool. It waits for the specified CSS selector to appear on the page and then hovers over the element using Puppeteer's page.hover method. Returns a success message or an error if the operation fails.
    case "browsercat_hover": try { await page.waitForSelector(args.selector); await page.hover(args.selector); return { content: [{ type: "text", text: `Hovered ${args.selector}`, }], isError: false, }; } catch (error) { return { content: [{ type: "text", text: `Failed to hover ${args.selector}: ${(error as Error).message}`, }], isError: true, }; }
  • The input schema definition for the browsercat_hover tool, specifying that it requires a 'selector' property of type string (CSS selector).
    { name: "browsercat_hover", description: "Hover over an element on the page", inputSchema: { type: "object", properties: { selector: { type: "string", description: "CSS selector for element to hover" }, }, required: ["selector"], }, },
  • index.ts:421-423 (registration)
    Registration of all tools including browsercat_hover via the ListToolsRequestSchema handler, which returns the TOOLS array containing the tool definition.
    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