Skip to main content
Glama

dom_click

Click the first element matching a CSS selector by scrolling it into view first, enabling precise DOM interaction in a specified browser tab for debugging or automated testing.

Instructions

Click the first element matching a CSS selector (scrolls into view first).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
selectorYesCSS selector of the element to click
targetIdYesTarget ID of the tab

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.1.0

TDQS

A3.8/5.0
Behavior3/5

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

No annotations are provided, so the description carries the burden. It discloses that it scrolls into view and clicks only the first match, but it does not mention what happens if no element is found, whether it waits for the element, or what the return value is. Given the lack of annotations, this is a moderate disclosure.

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 sentence that front-loads the action and includes the key behavioral note about scrolling. No waste.

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

Completeness4/5

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

For a simple click operation with two well-documented parameters and no output schema, the description covers the essential behavior. It could mention error handling or return values, but for a click action this is adequate.

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?

Both parameters are fully described in the schema with 100% coverage. The description adds no additional semantics beyond the schema, so it meets the baseline of 3.

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 clearly states it clicks the first element matching a CSS selector and scrolls into view. This verb+resource specification distinguishes it from sibling tools like dom_query (which likely queries) and dom_input_value (which inputs).

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies it is for clicking elements but does not explicitly state when to use it instead of other DOM tools. No alternatives or exclusions are mentioned, so the guidance is only implied.

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