Skip to main content
Glama

Extract Data

extract_data
Read-only

Extract structured JSON from a web page, PDF or text: name the fields you want (up to 25, with types) and get each value with the exact quote from the page that states it. Every quote is checked against the page itself (verified, quoted, unverified or not_found), so values are never invented. Charged only when at least one field is found. Costs USD 0.005 per call, paid with x402 (USDC on Base); calls that fail are not charged.

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": {
      "fields": "<fields>"
    },
    "name": "extract_data"
  }
}

Input Schema

NameRequiredDescriptionDefault
urlNoA public http(s) URL
textNoText to read instead of a URL (up to 60,000 characters)
fieldsYesField name -> "type: what it is" (types: string, number, integer, boolean), e.g. {"price": "number: the current price"}; a JSON Schema with properties also works
renderNoOpen the page in a real headless Chrome first, for pages built with JavaScript (slower; default false)

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • addedInput schema / properties / render
      Added value: +{
      +  "description": "Open the page in a real headless Chrome first, for pages built with JavaScript (slower; default false)",
      +  "type": "boolean"
      +}
  2. Added

TDQS

A4.1/5.0
Behavior5/5

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

Goes well beyond the readOnly/openWorld annotations: it discloses the 25-field cap, that every value carries a verified/quoted/unverified/not_found status, the anti-hallucination guarantee, and the full billing model (USD 0.005 per call via x402/USDC on Base, charged only on success, failures free). These are material behaviors an agent cannot derive from the annotations.

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 output contract, then verification guarantees, then cost. Five sentences, all load-bearing; the billing clause in particular prevents an agent from making surprise paid calls.

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?

For a 4-parameter tool with a nested fields object and no output schema, the description covers output semantics (the four verification statuses) and cost well. It stops short of saying how url and text combine or what the response envelope looks like when zero fields are found, which the absent output schema leaves slightly open.

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 coverage is 100%, so the baseline is 3, but the description adds meaning the schema lacks: the hard cap of 25 fields and the fact that types must accompany field names. The url/text mutual exclusivity and render behavior are left entirely to the schema.

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?

States a specific verb (extract) plus the resource types (web page, PDF, text) and the concrete output shape (structured JSON with per-field quotes and verification statuses). It clearly distinguishes itself from read_url/url_to_markdown by output format, but never names the obvious sibling extract_free, so the agent must infer the free/paid split.

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?

Usage is implied through the workflow ('name the fields you want') and a conditional hint for render ('for pages built with JavaScript'), and 'text ... instead of a URL' hints at input choice. However, there is no explicit statement of when to prefer this over extract_free, read_url, or url_to_markdown, and no exclusions or prerequisites beyond the payment note.

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