Skip to main content
Glama
RapierCraft

alterlab-mcp-server

alterlab_extract

Extract structured product, article, or custom fields from raw HTML, text, or Markdown using profiles, schemas, or prompts, returning JSON without scraping a URL.

Instructions

Extract product data, scrape prices, get structured data from any page content, or pull specific fields like names, emails, and ratings from HTML. Runs AlterLab's extraction pipeline on raw HTML, text, or markdown you already have — does NOT scrape a URL. For scraping + extraction in one step, use alterlab_scrape with extraction_schema instead. Profiles: 'product' (price, title, reviews), 'article' (title, author, body), 'job_posting', 'faq', 'recipe', 'event', 'ecommerce_homepage', 'directory_listing'. Returns JSON data. Use extraction_prompt for natural language extraction (LLM-powered). Use cache='only' to retrieve a previously cached result without calling the LLM.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
cacheNoCache control for LLM extraction results. 'auto': return cached result if available (default). 'skip': bypass cache lookup, always call LLM (result is still stored). 'only': return cached result or 404 if not cached — never calls the LLM.auto
contentYesRaw content to extract from — HTML, text, or markdown. Bring your own pre-fetched content; this endpoint does NOT scrape a URL.
formatsNoOutput formats for content transformation. 'json' is best for structured extraction. 'content' returns filtered/cleaned content. 'raw' returns the unprocessed response body.
evidenceNoInclude field provenance/evidence for extracted fields (which part of the content each field came from)
cache_ttlNoTTL for caching this extraction result, in seconds. Defaults to server setting (3600s). Max 86400s (24 hours).
source_urlNoOriginal URL of the content (for context only — not fetched). Helps the extractor understand the content's domain.
content_typeNoType of the provided contenthtml
extraction_modelNoPer-request LLM model override in provider-specific format (e.g. 'gpt-4o', 'claude-opus-4-5-20251101', 'llama3-70b-8192'). Overrides the model saved in your BYOK key settings for this request only.
extraction_promptNoNatural language instructions for LLM extraction (e.g., 'Extract all product prices and ratings'). Charged at LLM extraction rate when provided.
extraction_schemaNoCustom JSON Schema for extraction. Fields are mapped from content. Overrides extraction_profile when provided
extraction_profileNoPre-defined extraction profile. 'product' extracts price/title/reviews, 'article' extracts title/author/body, etc. 'auto' detects the page type. Mutually exclusive with extraction_template.
extraction_providerNoLLM provider to use for extraction. Selects the matching BYOK key registered at /dashboard/settings/llm-keys. When omitted, the most recently used registered key is used.
extraction_templateNoShorthand alias for extraction_profile — selects the same pre-built schema template. Mutually exclusive with extraction_profile.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changedv1.9.0
    • addedInput schema / properties / content / maxLength
      Added value: +500000
    • addedInput schema / properties / extraction_model / anyOf
      Added value: +[
      +  {
      +    "maxLength": 256,
      +    "type": "string"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
    • removedInput schema / properties / extraction_model / type
      Removed value: -[
      -  "string",
      -  "null"
      -]
  2. First observedv1.5.0

TDQS

A4.3/5.0
Behavior4/5

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

With no annotations, the description carries the full burden and does disclose key traits: it does not fetch URLs, it returns JSON data, and cache='only' never invokes the LLM. It does not mention auth/BYOK requirements or rate limits, but those are partially covered by the schema's extraction_provider description.

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?

Front-loaded with the core purpose and the negative scope early, then terse routing sentences. Slightly redundant opening with three synonymous phrasings ('extract product data, scrape prices, get structured data'), but overall efficient.

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 13-parameter tool with a nested extraction_schema and no output schema, the description covers the essential calling context: it must receive pre-fetched content, returns JSON, and lists available profiles. Minor gaps remain around provider/model selection behavior, but the schema covers those.

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 schema already documents all 13 parameters including profiles, cache modes, and evidence. The description restates profile contents ('product' (price, title, reviews)) and cache behavior already present in the schema, adding little new meaning beyond the scraping-vs-extraction distinction.

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?

Specific verb+resource with concrete examples of extractable fields (names, emails, ratings, prices), plus an explicit negative scope: 'Runs AlterLab's extraction pipeline on raw HTML, text, or markdown you already have — does NOT scrape a URL.' It clearly distinguishes itself from the alterlab_scrape sibling by naming it directly.

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?

Explicit when-to-use alternatives: 'For scraping + extraction in one step, use alterlab_scrape with extraction_schema instead,' plus routing guidance for extraction_prompt (natural language/LLM) and cache='only' (retrieve cached result without LLM). The conditions that select each path are stated, not implied.

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