Skip to main content
Glama
afshawnlotfi

Configurable Puppeteer MCP Server

by afshawnlotfi

puppeteer_click

Automate browser interactions by clicking elements on web pages using CSS selectors for precise control in Puppeteer-based automation workflows.

Instructions

Click an element on the page

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
selectorYesCSS selector for element to click

Implementation Reference

  • Handler function for the puppeteer_click tool. Clicks the element specified by the CSS selector and returns success or error message.
    case "puppeteer_click":
      try {
        await page.click(args.selector);
        return {
          content: [{
            type: "text",
            text: `Clicked: ${args.selector}`,
          }],
          isError: false,
        };
      } catch (error) {
        return {
          content: [{
            type: "text",
            text: `Failed to click ${args.selector}: ${(error as Error).message}`,
          }],
          isError: true,
        };
      }
  • Tool schema definition including name, description, and input schema requiring a 'selector' property.
    {
      name: "puppeteer_click",
      description: "Click an element on the page",
      inputSchema: {
        type: "object",
        properties: {
          selector: { type: "string", description: "CSS selector for element to click" },
        },
        required: ["selector"],
      },
    },
  • index.ts:410-412 (registration)
    Registration of all tools including puppeteer_click via the ListToolsRequestHandler returning the TOOLS array.
    server.setRequestHandler(ListToolsRequestSchema, async () => ({
      tools: TOOLS,
    }));
Behavior2/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. It states the action but lacks critical details: it doesn't specify if this triggers page navigation, requires the element to be visible/clickable, handles errors (e.g., if selector not found), or has side effects like waiting for network requests. This is inadequate for a mutation tool with zero annotation coverage.

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 zero waste. It's front-loaded with the core action and target, making it easy to parse quickly.

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?

Given the complexity (a mutation tool interacting with web pages), lack of annotations, and no output schema, the description is incomplete. It doesn't cover behavioral aspects like error handling, prerequisites, or what happens post-click (e.g., page changes), leaving significant gaps for an AI agent to use it correctly.

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?

The schema description coverage is 100%, with the parameter 'selector' fully documented in the schema as 'CSS selector for element to click'. The description adds no additional meaning beyond this, such as selector syntax examples or constraints. Baseline 3 is appropriate when the schema does the heavy lifting.

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 ('click') and target ('an element on the page'), providing a specific verb+resource combination. However, it doesn't explicitly distinguish this tool from sibling tools like 'puppeteer_hover' or 'puppeteer_select', which also interact with page elements, so it doesn't reach the highest score.

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 prerequisites (e.g., needing a page to be loaded), exclusions, or comparisons to siblings like 'puppeteer_hover' for non-click interactions or 'puppeteer_select' for dropdowns.

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

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/afshawnlotfi/mcp-configurable-puppeteer'

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