Skip to main content
Glama

extract_structured

Extract structured data from repeating HTML containers using CSS selectors and attributes. Capture text, links, or other attributes from each container.

Instructions

Extract structured data from repeating containers.

fields: [{name: "title", selector: ".job-title", attribute: "text|href|src|..."}]
Only direct text nodes of element are captured for "text" (prevents child-field mixing).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
container_selectorYes
fieldsYes
limitNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior3/5

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

With no annotations provided, the description carries the full burden. It discloses one behavioral trait: for attribute 'text', only direct text nodes are captured, preventing child-field mixing. However, it does not describe other behaviors such as handling of missing selectors, return format (though output schema may cover this), or whether the tool is idempotent. The disclosure is partial.

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 extremely concise: two sentences and an inline example. It is front-loaded with the purpose and includes a practical example. Every sentence serves a clear purpose, and there is no redundant or filler content.

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

Completeness3/5

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

Given the tool has three parameters (one complex) and no annotations, the description is moderately complete. The fields parameter example and behavioral note are helpful. However, it lacks context on container_selector usage, limit behavior, and return value structure (though output schema may compensate). Overall, it covers the core but leaves gaps for an AI agent to interpret.

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 0%, so the description is critical. It explains the 'fields' parameter with an example object and clarifies the 'text' attribute behavior. However, it does not explain 'container_selector' (likely a CSS selector, but not stated) or 'limit' (default 100, but no elaboration). The description adds value for the most complex parameter but is incomplete for all three.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool extracts structured data from repeating containers, which is a specific and distinct purpose. The example with fields and selectors reinforces this. However, it does not explicitly differentiate from similar tools like extract_table or scrape_page, though the context of 'repeating containers' provides some distinction.

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 guidance is provided on when to use this tool versus alternatives. The description does not mention scenarios where this tool is preferred or not, nor does it list sibling tools or exclusion criteria. The example implies usage for repeating HTML structures, but explicit usage direction is absent.

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/RobithYusuf/mcp-stealth-chrome'

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