Skip to main content
Glama

Extract structured data

extract_data
Read-only

Turn messy text or a web page into structured JSON by naming the fields you need; missing values return as null for scraping, leads, invoices, and forms.

Instructions

Turn messy text or a web page (first 12,000 characters) into clean JSON: name the fields you want ("company", "price: in USD", "emails") and get them back as a JSON object, with null for anything not found. Great for scraping, lead capture, invoices, job posts and forms. Costs $0.004 per call.

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 web page to read instead of text, e.g. a news article or blog post.
textNoText to process (first 12,000 characters are used). Use this or url.
fieldsYesFields to extract, optionally with a hint after a colon: ["company", "price: monthly price in USD", "emails: all email addresses"].

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.1/5.0
Behavior4/5

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

Beyond the readOnlyHint annotation, the description discloses meaningful behavior: a $0.004 per-call cost, use of only the first 12,000 characters, and null values for fields that are not found. It does not cover authentication, rate limits, or error behavior, but it adds solid operational context.

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 definition is front-loaded with the core transformation and then adds usage contexts and cost. It is appropriately sized, with no redundant sentences; each part contributes useful information.

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?

For a simple three-parameter extraction tool with full schema coverage and no output schema, the description is complete enough. It explains the transformation, field input pattern, null behavior, truncation, and cost, so an agent has what it needs to call it correctly.

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%, so the input schema already documents url, text, and fields in detail. The description reinforces the field-extraction pattern with examples and the null fallback, but adds little parameter meaning beyond what the schema already provides.

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 states a specific verb and resource: turn messy text or a web page into clean JSON by naming fields. It is clear what the tool does, but it does not explicitly distinguish itself from sibling tools such as data_convert or document_to_markdown.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

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

It gives clear use contexts: scraping, lead capture, invoices, job posts, and forms. However, it does not name alternatives or say when not to use this tool, so the routing guidance is contextual rather than exhaustive.

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