Skip to main content
Glama

zen_query

Extract multiple fields from every element matching a CSS selector, avoiding per-element calls. Supports default fields (text, href, src) and custom attributes, bounds, or HTML.

Instructions

Extract multiple fields from every element matching a CSS selector.

Much faster and cheaper than calling zen_js per element. The default fields cover the common ones (text, href, value, src, alt, id, name); pass fields=["text","data-foo","bounds","attrs"] to get arbitrary attributes or bounds/attrs/html extras.

Args: selector: CSS selector. fields: Field names to extract per element. Defaults to a useful set. limit: Max elements to return (capped at 500). tab_id: Optional tab; defaults to active.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
selectorYes
fieldsNo
limitNo
tab_idNo
Behavior4/5

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

No annotations provided, so description carries full burden. It discloses speed/cost benefits, default fields, and a cap on limit (500). It implies read-only nature via 'extract', but doesn't explicitly state no side effects or error handling. Still, it's fairly transparent for a query tool.

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 well-structured: a one-line summary, a benefit statement, then an Args section. It is concise, with every sentence adding value. No filler or repetition.

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?

Given no output schema, the description could hint at return format (e.g., array of objects). It implies extraction but doesn't explicitly state output shape. However, the examples and context are sufficient for an agent to infer behavior. Slight gap in explicit output description.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 0%, but the description thoroughly explains each parameter: selector (CSS selector), fields (defaults and examples like 'data-foo', 'bounds'), limit (max 500), and tab_id (optional). This fully compensates for missing schema descriptions.

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 extracts multiple fields from elements matching a CSS selector, and explicitly contrasts with zen_js for efficiency. It lists default fields and how to get extras, distinguishing it from siblings like zen_links or zen_js.

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

Usage Guidelines4/5

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

The description explicitly says 'Much faster and cheaper than calling zen_js per element' and explains how to use the 'fields' parameter. It provides context for when to use this tool over alternatives, but could mention when to use zen_js instead (e.g., complex JavaScript evaluation).

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/JayQuan-McCleary/ZenLink-MCP'

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