Skip to main content
Glama
cploujoux

Puppeteer MCP Server

by cploujoux

puppeteer_hover

Simulate mouse hover action on a webpage element using a CSS selector. Enables precise interactions in browser automation tasks with Puppeteer MCP Server.

Instructions

Hover an element on the page

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
selectorYesCSS selector for element to hover

Implementation Reference

  • Implements the puppeteer_hover tool by waiting for the specified selector and hovering over the element using Puppeteer's page.hover method, with error handling.
    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 as Error).message }`, }, ], isError: true, }; }
  • Defines the tool metadata including name, description, and input schema requiring a 'selector' string for the puppeteer_hover tool.
    { 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:459-461 (registration)
    Registers the puppeteer_hover tool (along with others) by including it in the TOOLS array returned for list tools requests.
    server.setRequestHandler(ListToolsRequestSchema, async () => ({ 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/cploujoux/mcp-puppeteer'

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