Skip to main content
Glama

Extract structured data

extract
Read-onlyIdempotent

Pull named fields from a web page into JSON using CSS selectors, or convert HTML tables into row-object arrays, so you get targeted data instead of full-page prose.

Instructions

Extract specific values from a web page as JSON instead of markdown prose. Provide CSS selectors to pull named fields (text or an attribute, first match or all), and/or set tables:true to convert every HTML table to arrays of row objects. Use this when you need particular data (prices, lists, specs, tabular data) rather than the whole page. Honors per-domain auth and proxies.

Input Schema

NameRequiredDescriptionDefault
urlYesThe URL to extract from
tablesNoExtract all HTML tables as arrays of row objects (default true when no selectors are given)
selectorsNoMap of field name to CSS selector, e.g. {"title":"h1","price":".price","links":{"selector":"a.item","attr":"href","all":true}}
timeoutMsNoOverall retrieval deadline in milliseconds, including downloads (default 25000)

Output Schema

NameRequiredDescriptionDefault
urlYes
fieldsNo
tablesNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv6.0.0

TDQS

A4.3/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, openWorld), so the description's job is to add context — and it does: "Honors per-domain auth and proxies" discloses credentialed fetching behavior that no annotation conveys. It also notes the implicit tables:true default when no selectors are supplied, though it says nothing about failure behavior on non-200 pages or timeouts beyond the parameter itself.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Front-loaded with what it produces, then how, then when — a logical order with no filler sentences. It is dense in the selector sentence but every clause carries information; only mild tightening would be possible.

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, return values need no explanation, and the description covers mode selection, selector shape, table extraction, and credentialed/proxied fetching. For a 4-parameter tool with a nested selector object, that is close to complete; only error/empty-result behavior is unaddressed.

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 the baseline is 3; the description earns above that by explaining the semantics of the selector map in prose (named fields, text vs attribute, first match vs all) and clarifying the conditional default "tables:true when no selectors are given" — a cross-parameter interaction the schema only states one-sidedly.

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?

"Extract specific values from a web page as JSON instead of markdown prose" names a concrete verb and resource and immediately contrasts the output shape with the whole-page/markdown siblings (fetch, research). An agent can distinguish extract from fetch without opening either 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?

"Use this when you need particular data (prices, lists, specs, tabular data) rather than the whole page" gives a clear selection rule with concrete examples. It stops short of naming the alternative tool (fetch) explicitly or stating when not to use it, so it is strong but not fully routing-grade.

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