Skip to main content
Glama
AIMLPM

AIMLPM/markcrawl

extract_data

Pull structured fields from crawled pages using LLM analysis. Extract specific data like pricing or API endpoints, or use auto-discovery to build datasets from unstructured web content for competitive research.

Instructions

Extract structured fields from crawled pages using an LLM.

Analyzes each crawled page and pulls out specific data fields you define
(e.g. company_name, pricing, features, api_endpoints). If no fields are
specified, the LLM automatically discovers relevant fields by sampling
pages from the crawl.

This tool makes external API calls to OpenAI (requires OPENAI_API_KEY
environment variable). Results are saved to extracted.jsonl and include
LLM attribution metadata.

Use this for competitive research, API documentation analysis, or building
structured datasets from unstructured web content.

Args:
    jsonl_path: Full path to the pages.jsonl file. If empty, defaults to
        <WEBCRAWLER_OUTPUT_DIR>/pages.jsonl.
    fields: Comma-separated field names to extract. Example:
        "company_name,pricing,features,api_endpoints". Leave empty to
        let the LLM auto-discover the most relevant fields.
    context: Description of your analysis goal. Improves auto-field
        discovery quality. Example: "competitor pricing analysis" or
        "API documentation review". Ignored when fields are specified.
    sample_size: Number of pages to sample for auto-field discovery.
        Default: 3. Higher values give better field suggestions but
        cost more tokens.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
jsonl_pathNo
fieldsNo
contextNo
sample_sizeNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior4/5

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

With no annotations provided, the description carries full disclosure burden and succeeds well: warns about external OpenAI API dependency, required OPENAI_API_KEY environment variable, output file location ('extracted.jsonl'), and cost implications ('cost more tokens'). Could improve by mentioning error handling or rate limiting behavior.

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-structured with logical flow: purpose → mechanism → behavioral warnings → use cases → detailed args. The Args section is necessary given zero schema coverage. Slightly verbose in the opening but every section adds distinct value not present in structured fields.

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?

Given 0% schema coverage, no annotations, and presence of output schema, the description successfully covers: input file handling, output file destination (extracted.jsonl), authentication requirements, and the dual-mode operation (manual fields vs. auto-discovery). Adequately complete for safe invocation.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema has 0% description coverage (only titles provided). The Args section compensates comprehensively: documents all 4 parameters with types, defaults, format examples (comma-separated fields), and behavioral notes (context is ignored when fields specified, sample_size tradeoffs). Fully bridges the schema gap.

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?

Opens with specific verb ('Extract'), clear resource ('structured fields from crawled pages'), and mechanism ('using an LLM'). The LLM-based extraction clearly distinguishes this from siblings like read_page or list_pages which presumably handle raw content rather than structured extraction.

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?

Provides explicit use cases ('competitive research, API documentation analysis, or building structured datasets') that clarify when to use extraction over simple reading. Documents the conditional logic for auto-discovery vs. specified fields. Lacks explicit comparison to sibling alternatives (e.g., 'use this instead of read_page when...').

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/AIMLPM/markcrawl'

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