Skip to main content
Glama

extract

Read-onlyIdempotent

Read repeated non-tabular structures such as product cards, list items, or search results as one record per item by matching an item selector and mapping fields.

Instructions

Read repeated non-tabular structures — product cards, list items, search results — as one record per item: item_selector matches the repeating block, fields map output names to selectors relative to it. Read-only, deterministic, parsed server-side from the main-document HTML. Default output: total and shown, then one tab-separated row per item under the field names; a field with no match is empty (null in json).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
fieldsYesfield name → {selector, attr}
formatNolines is compact; json keeps one object per recordlines
tab_idNoTarget tab; omitted = last tab navigated in this session, else the active one
save_toNoAbsolute path: write the records as JSON there and return the path instead of the content
max_itemsNoCap on records returned, in document order
max_lengthNoMax output chars
item_selectorYesCSS selector matching each item

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv1.11.0
    • addedInput schema / properties / save_to
      Added value: +{
      +  "description": "Absolute path: write the records as JSON there and return the path instead of the content",
      +  "type": "string"
      +}
  2. Changed3 schema fields changedv1.10.0
    • addedInput schema / properties / format / description
      Added value: +"lines is compact; json keeps one object per record"
    • addedInput schema / properties / max_items / description
      Added value: +"Cap on records returned, in document order"
    • addedInput schema / properties / tab_id / description
      Added value: +"Target tab; omitted = last tab navigated in this session, else the active one"
  3. First observedv1.8.0

TDQS

A4.5/5.0
Behavior4/5

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

Annotations already cover the safety profile (readOnly, idempotent, non-destructive), yet the description adds meaningful traits: deterministic execution, server-side parsing restricted to the main-document HTML, and the default output shape with null semantics for unmatched fields. That parsing-scope limitation is genuinely useful given siblings like get_frames.

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?

One tightly packed paragraph that is front-loaded with purpose, then mechanics, then output semantics. Every clause carries information; there is no filler or redundancy.

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

Completeness5/5

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

With no output schema, the description carries the return-value burden and does so (total/shown header, tab-separated rows, empty field → null in json). All 7 params are schema-documented and the two core ones are explained, so nothing needed to call it correctly is missing.

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 100%, so baseline is 3, but the description adds a conceptual model beyond the schema: item_selector marks the repeating block and fields are resolved relative to it, with item_selector/fields being the required pair. It clarifies how the two key params compose rather than merely restating them.

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?

States a specific verb (read/extract) and resource (repeated non-tabular structures) with concrete examples (product cards, list items, search results). The qualifier 'non-tabular' implicitly and usefully separates it from the sibling extract_table, so an agent can route between them without opening a schema.

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?

Gives clear positive context via examples of what this tool is for, and 'non-tabular' implies tables belong to extract_table. However, no explicit alternative is named and no when-not-to-use condition (e.g., single elements, iframes/shadow DOM) is stated, so it stops short of full routing guidance.

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