Skip to main content
Glama

hover_by_uid

Hover over web elements using their unique identifier to trigger hover states for testing interactions, inspecting dynamic content, or verifying CSS effects in Firefox browser automation.

Instructions

Hover over an element identified by its UID. TIP: Take a fresh snapshot if the UID becomes stale.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
uidYesThe UID of the element to hover over

Implementation Reference

  • The primary MCP tool handler for 'hover_by_uid'. Validates input, calls Firefox's hoverByUid method, handles errors with UID-specific messaging, and returns MCP response.
    export async function handleHoverByUid(args: unknown): Promise<McpToolResponse> { try { const { uid } = args as { uid: string }; if (!uid || typeof uid !== 'string') { throw new Error('uid parameter is required and must be a string'); } const { getFirefox } = await import('../index.js'); const firefox = await getFirefox(); try { await firefox.hoverByUid(uid); return successResponse(`✅ hover ${uid}`); } catch (error) { throw handleUidError(error as Error, uid); } } catch (error) { return errorResponse(error as Error); } }
  • Tool schema definition with name, description, and input schema requiring a 'uid' string parameter.
    export const hoverByUidTool = { name: 'hover_by_uid', description: 'Hover over element by UID.', inputSchema: { type: 'object', properties: { uid: { type: 'string', description: 'Element UID from snapshot', }, }, required: ['uid'], }, };
  • src/index.ts:130-136 (registration)
    Registration of the hover_by_uid handler in the main toolHandlers Map used by the MCP server.
    // Input ['click_by_uid', tools.handleClickByUid], ['hover_by_uid', tools.handleHoverByUid], ['fill_by_uid', tools.handleFillByUid], ['drag_by_uid_to_uid', tools.handleDragByUidToUid], ['fill_form_by_uid', tools.handleFillFormByUid], ['upload_file_by_uid', tools.handleUploadFileByUid],
  • src/index.ts:175-180 (registration)
    Inclusion of hoverByUidTool schema in the allTools array returned by listTools MCP request.
    tools.clickByUidTool, tools.hoverByUidTool, tools.fillByUidTool, tools.dragByUidToUidTool, tools.fillFormByUidTool, tools.uploadFileByUidTool,
  • Re-export of hoverByUidTool and handleHoverByUid from input.ts for central import in src/index.ts.
    // Input tools (UID-based interactions) export { clickByUidTool, hoverByUidTool, fillByUidTool, dragByUidToUidTool, fillFormByUidTool, uploadFileByUidTool, handleClickByUid, handleHoverByUid, handleFillByUid, handleDragByUidToUid, handleFillFormByUid, handleUploadFileByUid, } from './input.js';

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/freema/firefox-devtools-mcp'

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