Skip to main content
Glama

distill_webpage

Read-onlyIdempotent

Fetch a public HTTP(S) web page (or accept raw HTML) and distill its main prose into clean Markdown, stripping 85-97% of HTML/JS/CSS boilerplate. WHEN TO USE: Call this tool to read full or query-filtered article and documentation text; call recon_webpage_skeleton first to preview headings and token counts on unfamiliar pages, or extract_structured_data when you need JSON-LD, HTML tables, or code blocks. WHEN NOT TO USE: Do not use for binary PDFs, images, or login-walled pages. PARAMETER INTERACTIONS: Provide either url or html (when html is supplied, url is not fetched and only labels the cache key). When mode='markdown' (default), query and max_tokens are ignored; set mode='budget' to rank sections by query (BM25) and cap output at max_tokens. Omit agent_id and tx_hash during your 5 free calls. Read-only and idempotent; results are cached for 1 hour (<5ms cache hit). $0.001 per call ($0.0005 cached). Pricing: the first 5 calls per agent_id are free and failed calls are never charged. After 5 calls, the tool returns a payment-required quote (not a fatal error) with a $2 Stripe top-up link and Base/Solana USDC addresses; complete payment, then retry with your agd_pass_ key in agent_id or pass tx_hash. Example: distill_webpage(url='https://docs.stripe.com/api')

Input Schema

NameRequiredDescriptionDefault
urlYesTarget public HTTP(S) webpage URL to fetch (or builtin://stripe-docs for a built-in benchmark page). Private/loopback IPs are blocked.
htmlNoOptional raw HTML string (up to ~1.9MB) to process directly without network fetching. When provided, url is not fetched and only labels the cache entry.
modeNoExtraction mode: 'markdown' (default) returns the full cleaned page; 'budget' returns only sections matching query within max_tokens.markdown
queryNoBM25 relevance keywords used to rank and filter page sections. Required for focused filtering when mode='budget'; ignored when mode='markdown'.
tx_hashNoOptional on-chain Base Mainnet (0x...) or Solana SPL USDC transaction hash. Omit unless settling an individual call directly on-chain instead of using an agd_pass_ key in agent_id.
agent_idNoOptional agent identifier or prepaid agd_pass_ session key. Omit during your 5 free trial calls to use an ID automatically derived from your client IP, or pass your agd_pass_ key after topping up.
max_tokensNoMaximum output token ceiling (50-16000, default 400). Enforced only when mode='budget'; ignored when mode='markdown'.

Output Schema

NameRequiredDescriptionDefault
dataNoStructured tool output payload.
statusYesExecution status ('ok' or 'payment_required').
roi_proofNoToken compression and cost-savings verification metrics.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • addedInput schema / examples
      Added value: +[
      +  {
      +    "url": "https://docs.stripe.com/api"
      +  }
      +]
  2. Changed15 schema fields changed
    • changedInput schema / additionalProperties
      Previous value: -trueNew value: +false
    • changedInput schema / properties / agent_id / description
      Previous value: -"Your agent ID, or the agd_pass_ key you got from a payment. It tracks your free calls and credit, so treat it like a password. Omit it to use an ID derived from your IP and client."New value: +"Optional agent identifier or prepaid agd_pass_ session key. Omit during your 5 free trial calls to use an ID automatically derived from your client IP, or pass your agd_pass_ key after topping up."
    • addedInput schema / properties / agent_id / maxLength
      Added value: +256
    • addedInput schema / properties / agent_id / minLength
      Added value: +1
    • changedInput schema / properties / html / description
      Previous value: -"Raw HTML (up to ~1.9MB) to process instead of fetching url. When set, url only labels the cache entry."New value: +"Optional raw HTML string (up to ~1.9MB) to process directly without network fetching. When provided, url is not fetched and only labels the cache entry."
    • changedInput schema / properties / max_tokens / description
      Previous value: -"Output token cap for mode=budget (50-16000, default 400)."New value: +"Maximum output token ceiling (50-16000, default 400). Enforced only when mode='budget'; ignored when mode='markdown'."
    • changedInput schema / properties / mode / description
      Previous value: -"markdown (default) = whole page; budget = only sections relevant to query."New value: +"Extraction mode: 'markdown' (default) returns the full cleaned page; 'budget' returns only sections matching query within max_tokens."
    • changedInput schema / properties / query / description
      Previous value: -"Keywords used to rank sections (BM25). Used only when mode=budget."New value: +"BM25 relevance keywords used to rank and filter page sections. Required for focused filtering when mode='budget'; ignored when mode='markdown'."
    • changedInput schema / properties / tx_hash / description
      Previous value: -"Use only after paying on-chain: the Base (0x...) or Solana USDC transfer hash. It is verified on-chain before the call runs, and any overpayment is returned as an agd_pass_ credit key."New value: +"Optional on-chain Base Mainnet (0x...) or Solana SPL USDC transaction hash. Omit unless settling an individual call directly on-chain instead of using an agd_pass_ key in agent_id."
    • addedInput schema / properties / tx_hash / maxLength
      Added value: +256
    • addedInput schema / properties / tx_hash / minLength
      Added value: +10
    • changedInput schema / properties / url / description
      Previous value: -"Public http(s) URL to fetch, or builtin://stripe-docs for a demo page. Private and metadata IPs are blocked."New value: +"Target public HTTP(S) webpage URL to fetch (or builtin://stripe-docs for a built-in benchmark page). Private/loopback IPs are blocked."
    • addedOutput schema / properties / data / description
      Added value: +"Structured tool output payload."
    • addedOutput schema / properties / roi_proof / description
      Added value: +"Token compression and cost-savings verification metrics."
    • addedOutput schema / properties / status / description
      Added value: +"Execution status ('ok' or 'payment_required')."
  3. Changed1 schema field changed
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "properties": {
      +    "data": {
      +      "type": "object"
      +    },
      +    "roi_proof": {
      +      "type": "object"
      +    },
      +    "status": {
      +      "type": "string"
      +    }
      +  },
      +  "required": [
      +    "status"
      +  ],
      +  "type": "object"
      +}
  4. Changed12 schema fields changed
    • changedInput schema / properties / agent_id / description
      Previous value: -"Optional Agent ID or Session Pass (agd_pass_...)"New value: +"Your agent ID, or the agd_pass_ key you got from a payment. It tracks your free calls and credit, so treat it like a password. Omit it to use an ID derived from your IP and client."
    • changedInput schema / properties / html / description
      Previous value: -"Optional raw HTML string"New value: +"Raw HTML (up to ~1.9MB) to process instead of fetching url. When set, url only labels the cache entry."
    • changedInput schema / properties / html / maxLength
      Previous value: -99999New value: +1900000
    • changedInput schema / properties / max_tokens / description
      Previous value: -"Token cap for budget mode"New value: +"Output token cap for mode=budget (50-16000, default 400)."
    • addedInput schema / properties / mode / description
      Added value: +"markdown (default) = whole page; budget = only sections relevant to query."
    • changedInput schema / properties / mode / enum
      Previous value: -[
      -  "markdown",
      -  "structured",
      -  "skeleton",
      -  "budget"
      -]New value: +[
      +  "markdown",
      +  "budget"
      +]
    • removedInput schema / properties / mode / maxLength
      Removed value: -99999
    • removedInput schema / properties / mode / minLength
      Removed value: -1
    • changedInput schema / properties / query / description
      Previous value: -"BM25 focus query for budget mode"New value: +"Keywords used to rank sections (BM25). Used only when mode=budget."
    • changedInput schema / properties / tx_hash / description
      Previous value: -"Optional Base (0x...) or Solana USDC tx hash"New value: +"Use only after paying on-chain: the Base (0x...) or Solana USDC transfer hash. It is verified on-chain before the call runs, and any overpayment is returned as an agd_pass_ credit key."
    • changedInput schema / properties / url / description
      Previous value: -"Target URL (or builtin://stripe-docs)"New value: +"Public http(s) URL to fetch, or builtin://stripe-docs for a demo page. Private and metadata IPs are blocked."
    • changedInput schema / properties / url / maxLength
      Previous value: -99999New value: +2048
  5. Changed3 schema fields changed
    • changedInput schema / additionalProperties
      Previous value: -falseNew value: +true
    • addedInput schema / properties / agent_id
      Added value: +{
      +  "description": "Optional Agent ID or Session Pass (agd_pass_...)",
      +  "type": "string"
      +}
    • addedInput schema / properties / tx_hash
      Added value: +{
      +  "description": "Optional Base (0x...) or Solana USDC tx hash",
      +  "type": "string"
      +}
  6. Changed12 schema fields changed
    • addedInput schema / additionalProperties
      Added value: +false
    • addedInput schema / properties / html / maxLength
      Added value: +99999
    • addedInput schema / properties / html / minLength
      Added value: +1
    • addedInput schema / properties / max_tokens / default
      Added value: +400
    • addedInput schema / properties / max_tokens / maximum
      Added value: +16000
    • addedInput schema / properties / max_tokens / minimum
      Added value: +50
    • addedInput schema / properties / mode / maxLength
      Added value: +99999
    • addedInput schema / properties / mode / minLength
      Added value: +1
    • addedInput schema / properties / query / maxLength
      Added value: +99999
    • addedInput schema / properties / query / minLength
      Added value: +1
    • addedInput schema / properties / url / maxLength
      Added value: +99999
    • addedInput schema / properties / url / minLength
      Added value: +1
  7. First observed

TDQS

A4.8/5.0
Behavior5/5

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

Goes well beyond the annotations, which only declare read-only/idempotent/open-world/destructive=false. The description discloses 1-hour caching with <5ms hits, the 5-free-call trial, per-call and cached pricing, that failed calls are never charged, and that the payment-required response is a quote rather than a fatal error. These are exactly the operational traits an agent needs and cannot get from structured fields.

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-loads the core purpose in one sentence and uses labeled sections for routing and parameter interactions, which is easy to scan. The payment/pricing block is verbose and repeats the free-call and agd_pass_/tx_hash guidance already implied elsewhere, so a little trimming is possible, but the density is justified for a paid tool.

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?

With an output schema present, return values need no explanation, and the description still covers everything an agent must know before calling: authentication/payment flow, caching, mode-dependent behavior, input limits, and failure semantics. Nothing required for correct invocation is missing.

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 PARAMETER INTERACTIONS section adds cross-parameter meaning the per-field schema text does not consolidate: url is not fetched when html is supplied, and mode='markdown' silently ignores query and max_tokens while mode='budget' applies BM25 ranking. This prevents misconfiguration rather than merely restating field docs.

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?

States a specific verb and resource ('Fetch a public HTTP(S) web page ... distill its main prose into clean Markdown') plus a quantified outcome (stripping 85-97% boilerplate). It explicitly differentiates itself from both siblings by naming recon_webpage_skeleton and extract_structured_data, so an agent can route without opening a schema.

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?

Contains explicit WHEN TO USE and WHEN NOT TO USE sections that name the alternatives and the conditions selecting them: recon_webpage_skeleton for heading previews on unfamiliar pages, extract_structured_data for JSON-LD/tables/code, and an exclusion for PDFs, images, and login-walled pages. Nothing is left to inference.

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