{"uid":"cap_FcHJk_TsBVgVcsazfUB4C","slug":"mcp-security-agentdiet-dev-agentdiet-web-url-distiller-99fe90d6","name":"AgentDiet Web URL Distiller","description":"Distill a URL or raw HTML payload with BM25 budget control (Live x402 v2, IETF MPP & MCP endpoint at https://mcp-security.agentdiet.dev/api/diet)","url":"https://mcp-security.agentdiet.dev/api/diet?utm_source=zero.xyz","method":"GET","headers":{},"bodySchema":{"type":"object","required":["url"],"properties":{"url":{"type":"string","minLength":1,"description":"Target webpage URL to fetch and distill (or builtin://stripe-docs)"},"html":{"type":"string","description":"Optional raw HTML string to distill directly without fetching"},"mode":{"enum":["markdown","structured","skeleton","budget"],"type":"string","default":"markdown","description":"Distillation mode"},"query":{"type":"string","description":"BM25 focus query when mode=budget"},"max_tokens":{"type":"integer","minimum":20,"description":"Strict token budget ceiling when mode=budget"}}},"responseSchema":{"type":"object","required":["status","roi_proof","data"],"properties":{"data":{"type":"object","description":"Distilled Markdown, structured JSON tables/metadata, skeleton outline, or BM25 budget excerpt."},"cache":{"type":"object","properties":{"status":{"enum":["HIT","MISS"],"type":"string"},"cache_key":{"type":"string"},"latency_ms":{"type":"number"}}},"status":{"type":"string","description":"Execution status ('ok')"},"billing":{"type":"object","properties":{"agent_id":{"type":"string"},"payment_method":{"type":"string"},"fee_charged_usd":{"type":"number"}}},"roi_proof":{"type":"object","properties":{"raw_tokens":{"type":"integer"},"tokens_saved":{"type":"integer"},"roi_multiplier":{"type":"number"},"distilled_tokens":{"type":"integer"},"llm_cost_saved_usd":{"type":"number"},"compression_ratio_pct":{"type":"number"}}}}},"example":null,"exampleRequest":null,"tags":[],"displayCostAmount":"0.001","displayCostAsset":"USD","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"probe","requiresHandshake":false,"reviewCount":0,"rating":{"score":"0.00","successRate":"0.00","reviews":0,"stars":null,"state":"unrated"},"availabilityStatus":"unknown","priceObserved":null,"sessionDeposit":null,"pricing":{"kind":"static","summary":"$0.001/call","primary":{"kind":"static","protocol":"mpp","network":"tempo","amountUsd":"0.001","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"mpp","network":"tempo","amountUsd":"0.001","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_INpYGZLeU_g_snJwfhN1c","protocol":"mpp","methodType":"crypto","chain":"tempo","mode":"charge","costAmount":"0.001","costPer":"request","priority":0,"asset":"0x833589fcd6edb6e08f4c7c32d4f71b54bda02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":"mcp-security.agentdiet.dev","brandSlug":"mcp-security-agentdiet-dev-mpp","brandBaseUrl":"https://mcp-security.agentdiet.dev","brandDocsUrl":null,"whatItDoes":"Fetches a webpage URL (or raw HTML) and compresses it into compact, agent-ready tokens using BM25 budget control and multiple distillation modes","exampleAgentPrompt":"Grab the content from https://stripe.com/docs/payments and distill it into compact markdown, keeping it under 500 tokens and focusing on 'payment intents'.","exampleUseCases":[{"title":"Token-budget research for AI agent","prompt":"Fetch https://arxiv.org/abs/2401.00001 and distill it into under 300 tokens in budget mode, focusing on 'transformer attention mechanism' so I can include it in my LLM context without blowing up my cost."},{"title":"Structured extraction of a product page","prompt":"Pull the content from https://www.notion.so/pricing and give it back to me in structured mode so I can get clean tables and metadata about their pricing tiers."},{"title":"Skeleton outline of documentation","prompt":"Distill https://docs.openai.com/api-reference into a skeleton outline so I can quickly see the high-level structure without reading the whole thing."}],"resultDescription":"Returns a status field, distilled content in the requested format (Markdown, structured JSON, skeleton, or BM25 excerpt), optional cache hit/miss metadata, billing info, and an ROI proof object showing raw vs distilled token counts, tokens saved, compression ratio percentage, LLM cost saved in USD, and the ROI multiplier.","failureModes":["URL is unreachable or returns non-200 — distillation fails with an error status","max_tokens set too low (below 20) — rejected by schema validation","mode=budget used without a query parameter — may return unfiltered or degraded output","Raw HTML too large — may hit upstream processing limits","Payment not processed — 402 response if x402 micropayment fails","Invalid URL format — request rejected before fetch","Rate limiting or bot-blocking on target site — content not retrievable"],"whenToPreferThis":"Choose this endpoint when you need to include live web content in an LLM prompt but must control token costs — especially when the target page is large or verbose. Prefer it over generic scrapers when you need BM25-focused budget extraction (mode=budget with a query), structured JSON table extraction, or skeleton outlines. Ideal for agents that repeatedly fetch documentation, news, or research pages and need deterministic token ceilings to stay within context windows.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-21T07:23:38.453Z","isFirstParty":false,"canonicalSlug":"mcp-security-agentdiet-dev-agentdiet-web-url-distiller-a3547835"}