Skip to main content
Glama

extract_structured

Read-only

Extract repeated list items such as product cards as JSON by mapping CSS selectors to fields, including text and attribute values.

Instructions

Extract repeated items (e.g. product cards) as JSON. fields maps name -> 'css' (inner text), 'css@attr' (attribute) or '@attr' (attribute of the item itself). Example: item_selector='li.card', fields={'name':'h2','price':'.price','url':'a@href'}

Input Schema

NameRequiredDescriptionDefault
limitNo
fieldsYes
item_selectorYes

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.2/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=true, openWorldHint=true, and destructiveHint=false, so the safety profile is covered. The description adds the extraction spec format ('css', 'css@attr', '@attr'), which is useful, but says nothing about pagination, the limit default, or what happens with zero matches.

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 three lines long, front-loads the core purpose, and uses the remaining space for an immediately usable example. Every sentence earns its place.

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?

With an output schema present, the description needn't explain return values, and it covers the two required parameters thoroughly. The only omission is the optional 'limit' parameter and any note on behavior when no items match.

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 description coverage is 0%, so the description must carry parameter meaning; it does so well for 'fields' and 'item_selector' via the syntax rules and a full example. The 'limit' parameter (default 50) is not mentioned anywhere in the description or schema, leaving one gap.

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 specific verb and resource ('Extract repeated items ... as JSON') and gives a concrete example (product cards), which differentiates it from sibling extraction tools like extract_tables or extract_links without ambiguity.

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 phrase 'repeated items (e.g. product cards)' clearly signals when the tool applies, but it never names alternatives such as extract_tables or get_text, nor does it state exclusions. The context is clear though the routing guidance is left implicit.

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