Skip to main content
Glama

browser_hover

Hover over specified elements on a web page using structured accessibility snapshots, enabling precise interaction without screenshots or visual models.

Instructions

Hover over element on page

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
elementYesHuman-readable element description used to obtain permission to interact with the element
refYesExact target element reference from the page snapshot

Implementation Reference

  • The handler function for the browser_hover tool. It sets the response to include a snapshot, resolves the element locator from parameters, adds the Playwright hover code to the response, and executes the hover action on the tab.
    handle: async (tab, params, response) => { response.setIncludeSnapshot(); const locator = await tab.refLocator(params); response.addCode(`await page.${await generateLocator(locator)}.hover();`); await tab.waitForCompletion(async () => { await locator.hover(); }); },
  • Schema definition for the browser_hover tool, including name, title, description, input schema referencing elementSchema, and type.
    schema: { name: 'browser_hover', title: 'Hover mouse', description: 'Hover over element on page', inputSchema: elementSchema, type: 'readOnly', },
  • The browser_hover tool (hover) is registered by being included in the default export array of snapshot tools.
    hover,

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/nzjami/mcpPlaywright'

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