Skip to main content
Glama

structured_data_extract

Fetch a URL and extract structured data deterministically: JSON-LD blocks (each one also VALIDATED — @context/@type presence plus required fields for common schema.org types like Article, Product, Organization, FAQPage), OpenGraph/meta tags, and optional caller-supplied CSS-selector fields (e.g. { price: '.product-price', title: 'h1' }). No LLM involved — pure HTML parsing via CSS selectors, so results are exact matches only, not summarized or inferred. For a whole-page SEO audit (headings, links, images, meta lengths) use seo_audit instead.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
urlYesThe URL to extract from
attrNoOptional HTML attribute to extract instead of text content (e.g. 'href', 'src', 'content'). Applies to all selector fields in this call.
selectorsNoOptional map of field name -> CSS selector (e.g. { price: '.product-price', headline: 'h1' }). Each field returns an array of matched, whitespace-normalized text values in document order.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.1/5.0
Behavior4/5

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

With no annotations, the description carries the full burden and does well: it discloses that no LLM is involved, that results are deterministic exact matches (not summarized or inferred), and that JSON-LD blocks are actively VALIDATED against @context/@type and required fields. It omits operational traits like fetch/rate-limit or auth behavior, keeping it short of a 5.

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?

Well front-loaded: the core action and its outputs come first, and the seo_audit reroute closes the paragraph. It is slightly verbose in restating the selector example that the schema already provides, which costs a point.

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 no annotations and no output schema, the description must carry the return-value burden, and it does describe what comes back (JSON-LD, meta tags, selector-field arrays) and the validation behavior. It is close to complete for a read-only extraction tool, missing only edge-case behavior on fetch failure or empty matches.

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 100%, so the schema already documents all three parameters including attr and selectors. The description repeats the selector-map example already present in the schema and adds no syntax or format detail beyond it, so the baseline of 3 is appropriate.

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+resource ('Fetch a URL and extract structured data') and enumerates exactly what it extracts: validated JSON-LD blocks, OpenGraph/meta tags, and optional caller-supplied CSS-selector fields. It distinguishes itself from siblings by naming seo_audit as the tool for whole-page SEO auditing.

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?

Explicitly routes the agent to seo_audit for whole-page SEO audits, giving clear when-to-use guidance with an alternative. However, it does not address the potential confusion with the sibling url_to_markdown, which also transforms page HTML, so the alternative coverage is incomplete.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources