Skip to main content
Glama
Playwright MCP Server

Playwright MCP Server

by sohitmahato

playwright_click

Clicks a web page element using a CSS selector to automate interactions, with optional mouse button and click count for testing and scraping.

Instructions

Click an element on the page

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "selector": "<selector>"
    },
    "name": "playwright_click"
  }
}

Input Schema

NameRequiredDescriptionDefault
buttonNoMouse button to use
selectorYesCSS selector of element to click
clickCountNoNumber of clicks

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

C2.9/5.0
Behavior2/5

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

No annotations are supplied, so the description carries the full burden. It does not disclose that a Playwright click auto-waits for actionability, scrolls the element into view, or what happens if the selector matches nothing or multiple elements — all critical for a browser automation click. Only the bare action is stated.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

One short, front-loaded sentence with zero redundancy. It is efficient, though the brevity reflects under-specification rather than disciplined density, which keeps it from a 5.

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

Completeness2/5

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

This is a mutation-style browser action with no annotations and no output schema, yet the description says nothing about failure modes, waiting semantics, or what the tool returns. For a core automation primitive with three parameters, far more context is needed.

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%, and the schema documents selector, button, and clickCount with an enum for button, so the baseline is 3. The description adds no extra meaning such as selector syntax rules, default clickCount, or behavior on multiple matches.

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 states a specific verb and resource ('Click an element on the page'), which is unambiguous versus siblings like playwright_fill, playwright_hover, or playwright_type. It does not, however, distinguish generic element clicks from the specialized playwright_checkbox or playwright_select tools, so there is no 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?

There is no guidance on when to use this tool instead of alternatives, no prerequisites (e.g., page must be navigated, element must be visible/attached), and no exclusions. The agent must infer everything about applicability from the one-line purpose.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.