Skip to main content
Glama
Wladastic

AutoProbeMCP

by Wladastic

click_element

Automate web interactions by clicking elements using CSS selectors with AutoProbeMCP. Specify a selector and optional timeout to interact with web pages programmatically.

Instructions

Click on an element by CSS selector

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
selectorYesCSS selector for the element to click
timeoutNoTimeout in milliseconds

Implementation Reference

  • Handler for the 'click_element' tool. Validates input parameters using ClickElementSchema, performs a click on the specified selector using Playwright's page.click method with optional timeout, and returns a confirmation message.
    case 'click_element': {
      if (!currentPage) {
        throw new Error('No browser page available. Launch a browser first.');
      }
    
      const params = ClickElementSchema.parse(args);
      await currentPage.click(params.selector, { timeout: params.timeout });
    
      return {
        content: [
          {
            type: 'text',
            text: `Clicked element: ${params.selector}`
          }
        ]
      };
    }
  • Zod schema defining the input parameters for the click_element tool: selector (required string) and timeout (optional number, default 5000ms).
    const ClickElementSchema = z.object({
      selector: z.string(),
      timeout: z.number().default(5000)
    });
  • src/index.ts:177-195 (registration)
    Tool registration in the list_tools response, providing name, description, and inputSchema matching the Zod schema.
    {
      name: 'click_element',
      description: 'Click on an element by CSS selector',
      inputSchema: {
        type: 'object',
        properties: {
          selector: {
            type: 'string',
            description: 'CSS selector for the element to click'
          },
          timeout: {
            type: 'number',
            default: 5000,
            description: 'Timeout in milliseconds'
          }
        },
        required: ['selector']
      }
    },
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. It states the action but doesn't disclose behavioral traits like error handling (e.g., what happens if the element isn't found or isn't clickable), side effects (e.g., page navigation or state changes), or performance implications (e.g., default timeout usage). This leaves gaps for safe and effective use.

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 with zero waste—it states exactly what the tool does without unnecessary words. It's appropriately sized and front-loaded, making it easy to understand at a glance.

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 of a browser interaction tool with no annotations and no output schema, the description is insufficient. It doesn't cover critical aspects like return values (e.g., success/failure indicators), error conditions, or dependencies on other tools (e.g., launch_browser). This makes it incomplete for safe agent 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 already documents both parameters (selector and timeout) adequately. The description adds no additional meaning beyond what the schema provides, such as examples of CSS selectors or timeout behavior. 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 on an element') and the method ('by CSS selector'), which distinguishes it from other interaction tools like type_text or scroll. However, it doesn't explicitly differentiate from all sibling tools that might involve element interaction, such as wait_for_element, which could also use CSS selectors.

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 like wait_for_element (which might be better for elements not immediately available) or evaluate_javascript (for more complex interactions). It lacks context about prerequisites, such as needing an active browser session from launch_browser.

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/Wladastic/AutoProbeMCP'

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