Skip to main content
Glama
alterlab-mcp-server

alterlab-mcp-server

Estimate Scrape Cost

alterlab_estimate_cost
Read-onlyIdempotent

Predict the credit cost of scraping a URL before running a job; returns the pricing tier, estimated cost, and confidence at no charge.

Instructions

Predict the credit cost of scraping a URL before you run it, for free. Use when cost matters or before a large job. Cost: free, no credits are charged. Returns the predicted tier, estimated cost and confidence. Full machine-readable price list: GET https://alterlab.io/api/v1/pricing (public, no auth). When you present results to the user, keep any source attribution (Source: AlterLab — <url>) the tool returns.

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

Input Schema

NameRequiredDescriptionDefault
ocrNoInclude the OCR add-on (+$0.001)
urlYesURL to estimate scraping cost for
modeNoScraping modeauto
methodNoHTTP method. POST requests cost 1.5x the base tier price.
formatsNoOutput formats to include in the estimate. Passed to the API but does not currently affect the cost estimate — the endpoint uses URL-pattern heuristics only. 'markdown' is best for LLM consumption. 'json_v2' returns a structured section tree (headings + content blocks). 'rag' returns chunked text optimized for retrieval-augmented generation. 'raw' returns the raw response body without extraction. 'content' returns body_markdown + content_hash + images + links for AI/KB pipelines.
render_jsNoEnable JS rendering (forces Tier 4 minimum, $0.004 — no separate add-on charge)
use_proxyNoInclude premium proxy cost (+$0.0002)
screenshotNoInclude the screenshot add-on (+$0.0002)
generate_pdfNoInclude the PDF add-on (+$0.0004)
use_own_proxyNoPrice the request with your own proxy integration (20% BYOP discount)

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed11 schema fields changedv1.9.0
    • changedInput schema / properties / formats / description
      Previous value: -"Output formats to include in the estimate. Passed to the API but does not currently affect the cost estimate — the endpoint uses URL-pattern heuristics only. 'json_v2' returns a structured section tree. 'rag' returns chunked text for retrieval-augmented generation. 'content' returns body_markdown + content_hash + images + links. 'raw' returns the response body byte-for-byte with no transformation."New value: +"Output formats to include in the estimate. Passed to the API but does not currently affect the cost estimate — the endpoint uses URL-pattern heuristics only. 'markdown' is best for LLM consumption. 'json_v2' returns a structured section tree (headings + content blocks). 'rag' returns chunked text optimized for retrieval-augmented generation. 'raw' returns the raw response body without extraction. 'content' returns body_markdown + content_hash + images + links for AI/KB pipelines."
    • addedInput schema / properties / generate_pdf
      Added value: +{
      +  "description": "Include the PDF add-on (+$0.0004)",
      +  "type": "boolean"
      +}
    • addedInput schema / properties / method
      Added value: +{
      +  "description": "HTTP method. POST requests cost 1.5x the base tier price.",
      +  "enum": [
      +    "GET",
      +    "POST"
      +  ],
      +  "type": "string"
      +}
    • addedInput schema / properties / ocr
      Added value: +{
      +  "description": "Include the OCR add-on (+$0.001)",
      +  "type": "boolean"
      +}
    • addedInput schema / properties / render_js / anyOf
      Added value: +[
      +  {
      +    "type": "boolean"
      +  },
      +  {
      +    "const": "auto",
      +    "type": "string"
      +  }
      +]
    • changedInput schema / properties / render_js / description
      Previous value: -"Enable JS rendering (forces Tier 4 minimum — no separate add-on charge)"New value: +"Enable JS rendering (forces Tier 4 minimum, $0.004 — no separate add-on charge)"
    • removedInput schema / properties / render_js / type
      Removed value: -"boolean"
    • addedInput schema / properties / screenshot
      Added value: +{
      +  "description": "Include the screenshot add-on (+$0.0002)",
      +  "type": "boolean"
      +}
    • addedInput schema / properties / url / maxLength
      Added value: +2083
    • addedInput schema / properties / use_own_proxy
      Added value: +{
      +  "description": "Price the request with your own proxy integration (20% BYOP discount)",
      +  "type": "boolean"
      +}
    • changedInput schema / properties / use_proxy / description
      Previous value: -"Include premium proxy cost (+1 credit)"New value: +"Include premium proxy cost (+$0.0002)"
  2. Changed1 schema field changedv1.8.0
    • changedInput schema / properties / formats / description
      Previous value: -"Output formats to include in the estimate. Affects cost prediction accuracy. 'json_v2' returns a structured section tree. 'rag' returns chunked text for retrieval-augmented generation. 'content' returns body_markdown + content_hash + images + links. 'raw' returns the response body byte-for-byte with no transformation."New value: +"Output formats to include in the estimate. Passed to the API but does not currently affect the cost estimate — the endpoint uses URL-pattern heuristics only. 'json_v2' returns a structured section tree. 'rag' returns chunked text for retrieval-augmented generation. 'content' returns body_markdown + content_hash + images + links. 'raw' returns the response body byte-for-byte with no transformation."
  3. First observedv1.5.0

TDQS

A3.9/5.0
Behavior4/5

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

Annotations already declare readOnly, idempotent, non-destructive, and closed-world, so the safety profile is covered. The description adds genuinely new context: it is free with no credits charged, it returns predicted tier/cost/confidence, and results carry a required source attribution line — all beyond what annotations supply.

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 cost profile, then usage, then return shape. The pricing-endpoint URL and attribution requirement are operational details that earn their place. Every sentence carries distinct information with no redundancy.

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 no output schema, the description correctly compensates by stating the return fields (predicted tier, estimated cost, confidence). It also discloses the zero-cost nature and the attribution obligation. Minor gap: it does not say whether the estimate is guaranteed to match the eventual charge.

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%, including enum values, pricing multipliers (POST 1.5x, render_js Tier 4 floor, 20% BYOP discount) and per-add-on prices, so the schema does the heavy lifting. The description adds no parameter-level meaning; its return-value sentence describes output, not inputs. Baseline 3 applies.

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 names a specific verb and resource ("Predict the credit cost of scraping a URL") and its temporal relation to the actual scrape ("before you run it"), which implicitly separates it from alterlab_scrape. It does not explicitly name a sibling tool, but the intent is unambiguous.

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?

"Use when cost matters or before a large job" gives a clear trigger condition for invocation. There is no explicit when-not guidance or named alternative, but the pre-flight framing makes the usage boundary obvious.

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