Skip to main content
Glama

Extract Structured Data

extractStructuredData
Read-onlyIdempotent

Extracts structured JSON data from any webpage or PDF using an AI prompt and optional JSON Schema.

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>",
      "prompt": "<prompt>"
    },
    "name": "extractStructuredData"
  }
}

Input Schema

NameRequiredDescriptionDefault
urlYesTarget web page or PDF URL to extract data from.
pagesNoOptional PDF page range (e.g. '1-5').
promptYesNatural-language extraction instructions.
schemaNoOptional JSON Schema to constrain the extracted output structure.

Output Schema

NameRequiredDescriptionDefault
extractedNoExtracted structured JSON payload.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A3.6/5.0
Behavior3/5

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

Annotations already declare this is a read-only, idempotent, non-destructive, open-world fetch, so the safety profile is covered. The description adds that extraction works across both HTML pages and PDFs and that the schema only constrains (does not require) output shape, but says nothing about AI inference cost, latency, timeouts, or what happens when no schema is supplied.

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?

A single sentence that front-loads the action and resource, then qualifies it with the two levers (prompt, optional schema). No filler, no restatement of the title beyond what carries meaning.

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 an output schema present, the description does not need to explain return values, and all four parameters are covered in-schema. What remains thin is operational context for an open-world AI call on arbitrary URLs — page-range applicability, cost, or failure modes — which keeps it from being fully complete.

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% and each of the four parameters is documented in-schema with its role. The description restates that the prompt is natural-language instructions and the schema is optional, adding no format, syntax, or constraint detail beyond what the schema already supplies.

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 opens with a specific verb ('Extracts') plus the exact resource ('structured JSON data from any webpage or PDF') and names the mechanism (AI prompt, optional JSON Schema). An agent can immediately tell this differs from a plain scrape, though no sibling is named explicitly to sharpen the contrast.

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?

Use is only implied: the mention of an AI prompt plus JSON Schema signals 'reach for this when you need structured output rather than raw page content.' There is no explicit when-to-use, when-not-to-use, or named alternative such as a plain scrape or batch tool.

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