Skip to main content
Glama

fetch_structured

Extract structured data (title, author, price, etc.) from a URL using a JSON Schema. Reads JSON-LD, Open Graph, and Schema.org markup deterministically.

Instructions

Fetch a URL and extract structured data matching a JSON Schema — title, author, date, price, description, rating, image, and more. Reads JSON-LD, Open Graph, Twitter Cards, and Schema.org microdata embedded in the page; returns only the extracted JSON object. No LLM required: extraction is deterministic. Returns an empty object if the page has no matching semantic markup. Returns an error if the URL is unreachable or the schema parameter is not valid JSON. Has no side effects. Ideal for articles, products, recipes, and events with semantic markup. Do NOT use for pages without structured markup — use fetch_extract or html_to_markdown instead.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
urlYesURL to fetch and extract data from.
schemaYesJSON Schema (as a JSON string) describing the fields to extract. E.g. {"type":"object","properties":{"title":{"type":"string"},"price":{"type":"number"}}}
Behavior5/5

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

With no annotations, the description fully discloses behavior: no side effects, returns empty object if no matching markup, returns error if URL unreachable or schema invalid, and deterministic extraction. This is comprehensive.

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 appropriately sized; every sentence adds value. It is front-loaded with the main action, followed by details, error cases, side effects, and alternatives. No unnecessary words.

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?

Given the complexity of URL fetching, schema-based extraction, and multiple markup formats, the description covers inputs, expected output, error handling, side effects, and alternatives. It is complete without needing an output schema.

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?

Input schema has 100% coverage. Description adds extra context: specifies schema must be a JSON string, gives an example, and clarifies the schema describes fields to extract. While the schema already describes parameters, the description adds useful guidance beyond the schema.

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 clearly states it fetches a URL and extracts structured data matching a JSON Schema. It specifies the types of data (title, author, etc.) and sources (JSON-LD, Open Graph, etc.). It also distinguishes from siblings by noting deterministic extraction and explicitly naming alternatives like fetch_extract and html_to_markdown for pages without structured markup.

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?

The description explicitly states when to use (pages with semantic markup) and when not to (pages without structured markup, directing to fetch_extract or html_to_markdown). It also mentions ideal use cases: articles, products, recipes, and events.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/icosaedro-git/toolsnap-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server