Skip to main content
Glama
fix-a-lot

Crawl4ai Local

by fix-a-lot

crawl_structured

Extract specific data fields from repeated HTML elements using CSS selectors, converting web content into clean JSON for targeted scraping.

Instructions

CSS 셀렉터로 반복 요소를 잡아 지정한 필드만 JSON으로 추출한다.

Args: url: 크롤링할 URL. selector: 반복 요소를 잡는 CSS 셀렉터 (예: "table tr.item", "div.product-card"). fields: 추출할 필드. 키=필드명, 값=추출 지정 문자열. - 텍스트: "td" 또는 "td:text" - 속성: "a@href" (요소@속성명), 요소 자체 속성은 "@data-value" - N번째 요소는 CSS 문법 "td:nth-of-type(1)" 사용 (":eq()" 미지원) 예: {"이름": "td:nth-of-type(1):text", "링크": "a@href"} wait_seconds: HTML을 받기 전 대기 시간(초). JS 동적 로딩 페이지에 사용. wait_selector: 이 CSS 셀렉터가 나타날 때까지 대기. 지정 시 wait_seconds보다 우선.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
urlYes
fieldsYes
selectorYes
wait_secondsNo
wait_selectorNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.5/5.0
Behavior4/5

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

With no annotations, the description carries the behavioral disclosure burden. It discloses that wait_selector takes precedence over wait_seconds, that :eq() is not supported, and how attribute extraction works. It does not cover edge cases like missing elements or error behavior, but the output schema presumably handles return-value details.

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 one-sentence purpose is front-loaded, followed by a well-organized Args block where each line contributes actionable detail. The syntax examples and precedence note are dense but avoid redundant or promotional language. Nothing in the description is wasted.

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?

The description covers all five parameters, including the important wait_selector precedence and field extraction grammar, which is sufficient for invoking the tool. Given that an output schema exists, return values need not be described. Minor gaps such as behavior on empty selections or pagination prevent a 5.

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 description coverage is 0%, so the description fully compensates. Every parameter is documented with concrete examples: url, selector with illustrative patterns, fields with text/attribute/Nth-child syntax and a JSON example, plus wait_seconds and wait_selector with usage guidance. This goes far beyond the bare schema.

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 and resource: using CSS selectors to capture repeating elements and extract only designated fields into JSON. This clearly distinguishes it from sibling tools crawl_markdown and crawl_screenshot, which produce different output formats.

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 gives clear context on how to use the tool, including examples of selectors and field extraction syntax, and notes that wait_seconds is for JS-dynamic pages. However, it does not explicitly state when to prefer this over crawl_markdown or crawl_screenshot, so it lacks explicit exclusions and alternative routing.

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

Deploy Server

Other Tools