get_elements
Get information about elements matching a selector
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| selector | Yes | CSS selector of the elements | |
| sessionId | Yes | Session ID of the connected browser |
Get information about elements matching a selector
| Name | Required | Description | Default |
|---|---|---|---|
| selector | Yes | CSS selector of the elements | |
| sessionId | Yes | Session ID of the connected browser |
Changes observed during successful MCP inspections.
Input schema / properties / selector / descriptionPrevious value: -"Selector CSS de los elementos"New value: +"CSS selector of the elements"Input schema / properties / sessionId / descriptionPrevious value: -"ID de sesión del navegador conectado"New value: +"Session ID of the connected browser"Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations already declare readOnlyHint=true, destructiveHint=false, and openWorldHint=true, so the safety profile is carried. The description adds nothing beyond that — no note on whether a selector matching zero elements errors or returns empty, no indication of result cardinality or size for broad selectors on live pages.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
A single front-loaded sentence with zero filler, so nothing needs trimming. Brevity here is close to the useful limit; the only issue is that there is not enough content rather than too much.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
A read-only two-parameter lookup with full schema coverage needs only modest prose, and the annotations cover the safety profile. However, with no output schema, the description never says what 'information' is returned, leaving the agent unable to predict the response shape.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100%, so both selector and sessionId are already documented in the schema. The description restates only the selector concept and adds no extra semantics such as selector syntax support, scoping, or behavior for multi-match selectors. Baseline 3 applies when the schema does the work.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
States a generic verb ("Get information about") and resource ("elements") plus the selector-based filter, so the domain is identifiable. But "information" is undefined — attributes? text? bounding boxes? counts? — and nothing distinguishes it from the sibling get_page_content, which plausibly returns similar data.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No guidance on when to use this instead of get_page_content, click_element, or take_screenshot, and no stated prerequisites beyond the session. The agent must infer that this is for querying DOM elements by CSS selector rather than reading whole page content.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Add one secure layer between your agents and this server.