Skip to main content
Glama

query_selector

Fetch any web page and extract specific content using CSS selectors. Retrieve text, HTML, or attribute values from matched elements, limiting results as needed.

Instructions

抓取页面并按 CSS 选择器提取内容

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
urlYes
modeNotext
selectorYes
attributeNo可选:要提取的属性(如 href)
maxResultsNo最大返回条数

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

B3.3/5.0
Behavior2/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure, but it only says it fetches and extracts. It does not mention output format, pagination/truncation, error behavior, JavaScript rendering, or authentication needs.

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?

A single, front-loaded Chinese sentence with no filler. Every word contributes to the core meaning of fetching and selector-based extraction.

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 five parameters, no output schema, and no annotations, this description is too thin for reliable invocation. An agent cannot infer return shape, how maxResults applies, or whether it returns matching HTML or text.

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

Parameters2/5

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

Schema description coverage is only 40%, and the description adds little beyond restating the CSS-selector concept. It does not clarify url, mode, attribute, or maxResults beyond what the schema already provides.

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 states a clear operation: fetch a page and extract content by CSS selector. This distinctive mechanism separates it from the sibling tools fetch_html and extract_readable, making the tool's role evident.

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 usage when a specific page element needs to be extracted via a CSS selector, but it gives no explicit conditions, exclusions, or guidance on choosing between this and the sibling tools.

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