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,
    }));
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden of behavioral disclosure. It states the action but doesn't mention potential side effects (e.g., triggering JavaScript events, changing page state), error conditions, or performance considerations. This leaves significant gaps for a tool that interacts with dynamic web content.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is extremely concise with a single, clear sentence that directly states the tool's purpose. There is no wasted language or unnecessary elaboration, making it front-loaded and efficient.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the lack of annotations and output schema, the description is incomplete. It doesn't address what happens after hovering (e.g., does it wait for page updates?), potential errors, or return values. For a browser automation tool with dynamic interactions, this leaves critical context missing.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The schema description coverage is 100%, with the single parameter 'selector' clearly documented in the schema. The description doesn't add any additional meaning or context about the parameter beyond what the schema provides, such as selector best practices or examples.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the action ('hover') and target ('an element on the page'), providing a specific verb+resource combination. However, it doesn't explicitly differentiate from sibling tools like 'puppeteer_click' or 'puppeteer_select', which also interact with page elements.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No guidance is provided on when to use this tool versus alternatives. The description lacks context about scenarios where hovering is appropriate (e.g., triggering dropdowns or tooltips) or when other tools like 'click' or 'select' might be better suited.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

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