Skip to main content
Glama
JustasMonkev

MCP Accessibility Scanner

browser_hover

Read-only

Simulate hover interactions on web elements to test accessibility and functionality, ensuring WCAG compliance during automated scans with detailed visual and JSON reports.

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 snapshot inclusion, resolves the element locator from the ref, adds the generated hover code to the response, and executes the hover action via waitForCompletion.
    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();
      });
    },
  • The schema definition for the browser_hover tool, specifying name, title, description, input schema (elementSchema), and readOnly type.
    schema: {
      name: 'browser_hover',
      title: 'Hover mouse',
      description: 'Hover over element on page',
      inputSchema: elementSchema,
      type: 'readOnly',
    },
  • The complete definition and registration of the browser_hover tool using defineTabTool, which wraps the tab-specific handler.
    const hover = defineTabTool({
      capability: 'core',
      schema: {
        name: 'browser_hover',
        title: 'Hover mouse',
        description: 'Hover over element on page',
        inputSchema: elementSchema,
        type: 'readOnly',
      },
    
      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();
        });
      },
    });
  • src/tools.ts:38-56 (registration)
    Aggregates all tools from various modules, including ...snapshot which contains browser_hover, into the allTools array used by the MCP backend.
    export const allTools: Tool<any>[] = [
      ...common,
      ...console,
      ...dialogs,
      ...evaluate,
      ...files,
      ...form,
      ...install,
      ...keyboard,
      ...navigate,
      ...network,
      ...mouse,
      ...pdf,
      ...screenshot,
      ...snapshot,
      ...tabs,
      ...wait,
      ...verify,
    ];
  • The shared elementSchema used as inputSchema for browser_hover, defining element description and ref.
    export const elementSchema = z.object({
      element: z.string().describe('Human-readable element description used to obtain permission to interact with the element'),
      ref: z.string().describe('Exact target element reference from the page snapshot'),
    });
Behavior3/5

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

Annotations already provide readOnlyHint=true, destructiveHint=false, and openWorldHint=true, indicating a safe, non-destructive operation. The description adds minimal behavioral context beyond this, stating the hover action but not detailing effects like potential UI changes or timing considerations. It doesn't contradict annotations.

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 a single, direct sentence ('Hover over element on page') with zero wasted words. It's front-loaded and efficiently conveys the core action without unnecessary elaboration, making it easy for an agent to parse quickly.

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

Completeness3/5

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

Given the tool's low complexity (simple hover action), no output schema, and rich annotations covering safety and world state, the description is minimally adequate. However, it lacks details on expected outcomes (e.g., UI feedback) or prerequisites (e.g., needing a page snapshot from browser_snapshot), leaving some contextual gaps.

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?

Schema description coverage is 100%, with clear descriptions for both parameters (element as human-readable description, ref as exact target reference). The description adds no additional parameter semantics beyond what the schema provides, so it meets the baseline for high schema coverage without extra value.

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

Purpose5/5

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

The description 'Hover over element on page' clearly states the specific action (hover) and target (element on page). It distinguishes from siblings like browser_click (click action) and browser_type (typing action) by specifying the hover interaction, which is a distinct browser manipulation operation.

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?

The description provides no guidance on when to use this tool versus alternatives. It doesn't mention scenarios where hovering is appropriate (e.g., triggering dropdowns, tooltips) versus when clicking or other interactions are needed, nor does it reference sibling tools like browser_click for comparison.

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/JustasMonkev/mcp-accessibility-scanner'

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