Skip to main content
Glama

puppeteer_hover

Simulate mouse hover on a webpage element using its CSS selector. Part of MCP Puppeteer Linux Server, enabling browser automation for web interaction and testing.

Instructions

Hover an element on the page

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
selectorYesCSS selector for element to hover

Implementation Reference

  • The handler function for the puppeteer_hover tool. It waits for the specified CSS selector to appear on the page, then hovers over the element using Puppeteer's page.hover() method. Returns a success message or an error if the operation fails.
    case "puppeteer_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.message}`, }], isError: true, }; }
  • The input schema definition for the puppeteer_hover tool, specifying that a CSS selector string is required.
    { name: "puppeteer_hover", description: "Hover an element on the page", inputSchema: { type: "object", properties: { selector: { type: "string", description: "CSS selector for element to hover" }, }, required: ["selector"], }, },
  • index.ts:448-449 (registration)
    Registers the list of available tools, including puppeteer_hover via the TOOLS array.
    tools: TOOLS, }));

Other Tools

Related 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/PhialsBasement/MCP-Puppeteer-Linux'

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