Skip to main content
Glama
ceeyang-ai
by ceeyang-ai

extract_by_selector

Extract text, HTML, or attributes from web pages using CSS selectors. Specify a URL and selector to retrieve matching content.

Instructions

Extract content from a web page using CSS selectors.

Args: url: The URL to fetch css_selector: CSS selector (e.g. 'h1', '.article', '#main p') attribute: What to extract: 'text' (inner text), 'html' (inner HTML), or an attribute name like 'href', 'src', 'alt' timeout: Request timeout in seconds max_results: Maximum results to return (default 50, max 200)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
urlYes
css_selectorYes
attributeNotext
timeoutNo
max_resultsNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior3/5

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

No annotations provided, so description bears full burden. It explains parameters like timeout and max_results, but does not disclose potential failure modes, rate limiting, or nature of fetch operation. Return format is implied but not detailed, though output schema exists.

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?

Description is concise (5 lines), front-loaded with purpose, and lists arguments succinctly. No unnecessary words; every sentence adds value.

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 5 parameters and output schema exists, description covers all inputs adequately. Could mention return behavior on failure, but overall complete for the tool's complexity.

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

Parameters4/5

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

Schema coverage is 0%, so description must compensate. It adds meaning to all 5 parameters: e.g., attribute options ('text', 'html', or attribute name), defaults for timeout and max_results. Provides enough context for correct usage.

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?

Clearly states it extracts content from a web page using CSS selectors. Verb and resource are specific. It distinguishes from siblings like extract_links and fetch_clean_text by focusing on CSS selector-based extraction.

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

Usage Guidelines2/5

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

No explicit guidance on when to use this tool vs. siblings. The description does not mention alternatives or exclusion criteria, leaving the agent to infer usage context.

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/ceeyang-ai/webx-mcp-server'

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