Skip to main content
Glama

extract

Scrape a webpage and extract structured data by defining a CSS-based JSON schema, returning parsed JSON in data.

Instructions

Scrape + structured extraction using a CSS-based JSON schema.

The schema is a JsonCssExtractionStrategy schema: { "name": "PageItems", "baseSelector": "div.item", "fields": [{"name": "title", "selector": "h2", "type": "text"}, ...] }

Returns parsed JSON in data.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
urlYes
preferNoauto
schemaYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.7.1

TDQS

A3.5/5.0
Behavior3/5

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

The description discloses the core behavioral contract: it performs scraping, applies a JsonCssExtractionStrategy schema, and returns parsed JSON in data. With no annotations, this is useful but incomplete; it does not cover failure behavior, execution time, or permissions/rate limits.

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 compact and every element earns its place: a one-line summary, a clear schema example, and an output note. Front-loading the core purpose before the example makes it scannable.

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?

For a tool with a complex schema parameter and no annotations, the description covers the main workflow and output, and the output schema covers return values. It is still incomplete because the optional prefer parameter is undocumented and there is no guidance on edge cases or interaction with siblings.

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?

The description adds critical meaning to the schema parameter by showing the exact JsonCssExtractionStrategy structure with an example, which the bare schema (additionalProperties: true) does not provide. It does not explain the prefer parameter or the url parameter further, and schema coverage is 0%, so the compensation is only partial.

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 names a specific function: scrape a page and extract structured data using a CSS-based JSON schema. It clearly explains what kind of schema is expected, which makes the generic tool name meaningful. It does not explicitly contrast with siblings like scrape or crawl, so it misses full differentiation.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Usage is implied: use this when you need structured extraction from a single page rather than raw scraping or multi-page crawling. There is no explicit when-to-use/when-not-to-use guidance or mention of sibling alternatives, but the 'structured extraction' phrasing does enough to suggest the primary use case.

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