Skip to main content
Glama
JustasMonkev

MCP Accessibility Scanner

browser_click

Destructive

Simulate clicks on web page elements to test interactions and verify WCAG compliance, ensuring accessibility across user workflows with precise element targeting.

Instructions

Perform click on a web page

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
doubleClickNoWhether to perform a double click instead of a single click
elementYesHuman-readable element description used to obtain permission to interact with the element
refYesExact target element reference from the page snapshot

Implementation Reference

  • Executes the browser_click tool: resolves element locator from params, generates code snippet for click/dblclick, performs the action via Playwright on the tab's page.
    handle: async (tab, params, response) => {
      response.setIncludeSnapshot();
    
      const locator = await tab.refLocator(params);
      const button = params.button;
      const buttonAttr = button ? `{ button: '${button}' }` : '';
    
      if (params.doubleClick)
        response.addCode(`await page.${await generateLocator(locator)}.dblclick(${buttonAttr});`);
      else
        response.addCode(`await page.${await generateLocator(locator)}.click(${buttonAttr});`);
    
    
      await tab.waitForCompletion(async () => {
        if (params.doubleClick)
          await locator.dblclick({ button });
        else
          await locator.click({ button });
      });
    },
  • Defines Zod schemas for input validation: base elementSchema (element desc, ref), clickSchema extending it with doubleClick and button options. Used in tool schema with name 'browser_click'.
    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'),
    });
    
    const clickSchema = elementSchema.extend({
      doubleClick: z.boolean().optional().describe('Whether to perform a double click instead of a single click'),
      button: z.enum(['left', 'right', 'middle']).optional().describe('Button to click, defaults to left'),
    });
    
    const click = defineTabTool({
      capability: 'core',
      schema: {
        name: 'browser_click',
        title: 'Click',
        description: 'Perform click on a web page',
        inputSchema: clickSchema,
        type: 'destructive',
      },
  • src/tools.ts:38-56 (registration)
    Registers the browser_click tool by including the snapshot module's tools (via ...snapshot) in the allTools array, which is filtered into _tools used by BrowserServerBackend for MCP listTools().
    export const allTools: Tool<any>[] = [
      ...common,
      ...console,
      ...dialogs,
      ...evaluate,
      ...files,
      ...form,
      ...install,
      ...keyboard,
      ...navigate,
      ...network,
      ...mouse,
      ...pdf,
      ...screenshot,
      ...snapshot,
      ...tabs,
      ...wait,
      ...verify,
    ];
  • In BrowserServerBackend constructor, sets this._tools = filteredTools(config), which includes browser_click, used for dispatching calls and listing in MCP.
    constructor(config: FullConfig, factory: BrowserContextFactory) {
      this._config = config;
      this._browserContextFactory = factory;
      this._tools = filteredTools(config);
    }
  • BrowserServerBackend.listTools() converts tool schemas including browser_click to MCP Tool format for registration with the MCP server.
    async listTools(): Promise<mcpServer.Tool[]> {
      return this._tools.map(tool => toMcpTool(tool.schema));
    }
Behavior3/5

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

Annotations indicate destructiveHint=true and readOnlyHint=false, which already signal this is a write operation that can change page state. The description adds no behavioral context beyond this, such as potential side effects (e.g., navigation, form submission) or error conditions. It doesn't contradict annotations, but offers minimal extra insight.

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, efficient sentence with no wasted words. It's front-loaded with the core action, making it easy to scan and understand quickly. Every word earns its place by conveying the essential purpose.

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 complexity (interactive, destructive) and lack of output schema, the description is minimal. It covers the basic action but omits details like return values, error handling, or dependencies on other tools (e.g., browser_snapshot for ref). With annotations providing safety cues, it's adequate but leaves gaps for effective use.

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%, so the schema fully documents all parameters (doubleClick, element, ref). The description adds no additional meaning about parameters, such as explaining the relationship between element and ref or when to use doubleClick. This meets the baseline for high schema coverage.

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 ('Perform click') and resource ('on a web page'), which is specific and unambiguous. However, it doesn't distinguish this from sibling tools like browser_hover or browser_drag, which also involve element interactions, so it doesn't reach the highest score for sibling differentiation.

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. For example, it doesn't mention when to choose browser_click over browser_double_click (implied via parameter) or browser_hover, nor does it specify prerequisites like needing a browser session or element reference from browser_snapshot.

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