Skip to main content
Glama

Extract structured data from a URL

extract_structured
Read-onlyIdempotent

Extract structured data (JSON-LD, OpenGraph, Twitter cards, microdata) from any web page to retrieve product prices, article metadata, or recipe details as clean fields.

Instructions

Pull JSON-LD, OpenGraph, Twitter cards, and microdata from a web page.

Best for:
- Product pages (price, currency, availability, brand, rating).
- Article pages (author, publish date, image, headline).
- Recipe / event / video pages where rich metadata IS the answer.
- Cases where `fetch` returns prose but you need fields.

Not recommended for:
- Just reading a page -> use `fetch`.
- PDFs / DOCX -> use `read_doc`.
- Pages that don't publish schema.org metadata (most blogs): you'll get
  empty lists; fall back to `fetch`.

Returns:
- json: {url, json_ld:[], microdata:[], opengraph:[], rdfa:[]}. Twitter
  card meta tags are surfaced inside the `opengraph` list.
- markdown (default): a flattened key/value view with each block printed
  as a JSON code block under its syntax heading.

Common mistakes:
- Calling on every URL "just in case": most sites have no structured
  data, and `fetch` is what you actually want.

Args:
    url: Absolute http(s) URL.
    format: "markdown" (default) or "json".

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
urlYes
formatNomarkdown

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.12.0
    • changedOutput schema / (root)
      Previous value: -{
      -  "properties": {
      -    "result": {
      -      "anyOf": [
      -        {
      -          "type": "string"
      -        },
      -        {
      -          "additionalProperties": true,
      -          "type": "object"
      -        }
      -      ],
      -      "title": "Result"
      -    }
      -  },
      -  "required": [
      -    "result"
      -  ],
      -  "title": "extract_structuredOutput",
      -  "type": "object"
      -}New value: +null
  2. Addedv0.2.0

TDQS

A4.6/5.0
Behavior4/5

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

Annotations already declare readOnlyHint, openWorldHint, and idempotentHint. The description adds value beyond these: it discloses the return format details (JSON key structure, markdown flattening behavior), the Twitter-card-inside-opengraph quirk, and the open-world caveat that most pages yield empty lists. No contradiction with annotations.

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-organized with clear section headers (Best for, Not recommended, Returns, Common mistakes, Args). It is longer than minimal, but each section earns its place and the core purpose is front-loaded. Slightly verbose but purposefully structured.

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?

Complete for a multi-format extraction tool with no output schema. The description carries the return-format burden itself, listing the JSON keys, the markdown default behavior, and parameter meanings. It also sets expectations about empty results. An agent has everything needed to call it correctly.

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 description coverage is 0%, so the description must compensate — and it does. The Args section clarifies that url must be an 'Absolute http(s) URL' (a constraint not in the schema) and explains format's options and default. This adds real meaning beyond the bare schema definitions.

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?

The description states a specific verb-resource pair: 'Pull JSON-LD, OpenGraph, Twitter cards, and microdata from a web page.' It lists the exact data formats extracted, and distinguishes itself from siblings by name (fetch, read_doc), making the tool's identity unambiguous.

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?

Exceptionally explicit. It provides 'Best for' scenarios (product, article, recipe/event/video pages), 'Not recommended for' cases with named alternatives (use fetch, use read_doc), and a 'Common mistakes' warning that most sites lack structured data and fetch is preferred. Nothing is left to inference.

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