Skip to main content
Glama
AdsPower

AdsPower LocalAPI MCP Server

Official

hover-element

Simulate mouse hover over web page elements using CSS selectors to trigger interactive features or reveal hidden content during browser automation.

Instructions

Hover the element

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
selectorYesThe selector of the element to hover, find from the page source code

Implementation Reference

  • The main handler function for the 'hover-element' tool that performs the hover action on the specified element using Puppeteer.
    async hoverElement({ selector }: HoverElementParams) { browser.checkConnected(); await browser.pageInstance!.waitForSelector(selector); await browser.pageInstance!.hover(selector); return `Hovered element with selector: ${selector} successfully`;
  • Zod schema defining the input parameters (selector) for the 'hover-element' tool.
    hoverElementSchema: z.object({ selector: z.string().describe('The selector of the element to hover, find from the page source code') }).strict(),
  • Registers the 'hover-element' tool with the MCP server, including name, description, schema, and wrapped handler.
    server.tool('hover-element', 'Hover the element', schemas.hoverElementSchema.shape, wrapHandler(automationHandlers.hoverElement));

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/AdsPower/local-api-mcp-typescript'

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