Skip to main content
Glama

Structured Data Extract

structured_data_extract
Read-onlyIdempotent

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.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "url": "<url>"
    },
    "name": "structured_data_extract"
  }
}

Input 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.4/5.0
Behavior4/5

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

Annotations already declare readOnly, idempotent, openWorld and non-destructive, so the safety profile is covered; the description adds meaningful behavior beyond that by stating no LLM is involved, that parsing is pure CSS-selector HTML parsing, that results are exact matches only, and that JSON-LD blocks are validated against schema.org required fields. It does not cover fetch failure modes, timeouts, or rate limits, which keeps it just 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.

Conciseness5/5

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

Front-loaded with the core action and its outputs, then the determinism caveat, then the sibling routing, then the excluded behavior. Every clause carries information; the parentheticals are illustrative rather than filler.

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 output schema, the description still conveys return shape (JSON-LD blocks, meta tags, arrays of matched values) and validation behavior, which is sufficient for an agent to consume results. Minor gaps remain around error handling and response envelope structure.

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 coverage is 100%, so the schema already documents url, attr, and selectors in detail, making 3 the baseline. The description reinforces the selectors parameter with a usage example and clarifies output shape (arrays of whitespace-normalized values in the schema), but adds little about the attr parameter beyond what the schema states.

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 and resource ('Fetch a URL and extract structured data deterministically') and enumerates the exact artifacts returned: JSON-LD blocks, OpenGraph/meta tags, and caller-supplied CSS-selector fields. It explicitly distinguishes itself from seo_audit, so an agent can route 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 Guidelines5/5

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

Names a concrete alternative ('For a whole-page SEO audit ... use seo_audit instead') with the condition that selects it. It also implicitly scopes usage by stating that results are exact matches only, not summarized or inferred, which tells the agent when this tool is the wrong fit.

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.