Skip to main content
Glama
andresolbach

nodriver-mcp-server

Query CSS selector

query_selector
Read-only

Find elements by CSS selector and get a compact listing of their tag, text, href, id, and class. Efficiently extract repeated page structures like search results or product tiles.

Instructions

Find elements by CSS selector; list their tag, text, href, id and class.

The efficient way to pull a repeated structure off a page — search results, product tiles, table rows — without paying for a full snapshot.

Returns a compact listing only. It yields no uids, so it cannot drive clicks: take a snapshot when you need to interact, or operate on the elements directly via evaluate_script.

Element text is truncated to 200 characters.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
limitNoMaximum number of matching elements to return.
selectorYesA CSS selector, e.g. "a.result", "#nav li", "input[type=file]". Standard querySelectorAll syntax — no jQuery extensions such as :contains().

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior5/5

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

The description discloses key behavioral traits beyond the annotations: returns a compact listing only, yields no uids and therefore cannot drive clicks, and truncates element text to 200 characters. These details are not captured by readOnlyHint/destructiveHint and add significant value.

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 compact and well-structured: one sentence on purpose, one on use case, one on limitations, and one on truncation. Every sentence earns its place with no redundancy or fluff.

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

Completeness5/5

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

For a read-only query tool with a present output schema, the description covers purpose, use cases, limitations, and return format succinctly. It fully equips the agent to decide when to invoke it and what to expect.

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 fully documents both selector and limit. The description adds no additional parameter-specific semantics, though it does clarify output characteristics. Baseline 3 is appropriate given full schema coverage.

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 opens with a specific verb+resource: 'Find elements by CSS selector; list their tag, text, href, id and class.' It clearly identifies what the tool returns and is distinct from sibling tools like take_snapshot by emphasizing its efficient, focused scope.

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

Usage Guidelines5/5

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

It provides explicit when-to-use guidance: 'The efficient way to pull a repeated structure off a page — search results, product tiles, table rows — without paying for a full snapshot.' It also states when not to use it: 'take a snapshot when you need to interact, or operate on the elements directly via evaluate_script,' naming concrete alternatives.

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/andresolbach/nodriver-mcp-server'

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