Imperium RAG-Diet — Web & Document Context Distiller (85-97% Token Savings)

v7.0.17
dev.agentdiet/rag-diet Checked 1 day ago Published 1 month ago

Strips 85-97% of HTML/DOM boilerplate into clean Markdown, skeletons, or BM25-ranked RAG chunks.

These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.

distill_webpage

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 ca…

ParameterTypeDescription
url *stringTarget public HTTP(S) webpage URL to fetch (or builtin://stripe-docs for a built-in benchmark page). Private/loopback IPs are blocked.
agent_idstringOptional 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.
htmlstringOptional 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.
max_tokensintegerMaximum output token ceiling (50-16000, default 400). Enforced only when mode='budget'; ignored when mode='markdown'.
modestringExtraction mode: 'markdown' (default) returns the full cleaned page; 'budget' returns only sections matching query within max_tokens.
querystringBM25 relevance keywords used to rank and filter page sections. Required for focused filtering when mode='budget'; ignored when mode='markdown'.
tx_hashstringOptional 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.

recon_webpage_skeleton

Extract an ultra-compact structural outline (under ~200 tokens) of a web page listing its H1-H4 headings and exact token count per section without returning body prose. WHEN TO USE: Call this tool first on long or unfamiliar pages to inspect structure and token cost before calling distill_webpage (with mode='budget' and a focused query). WHEN NOT TO USE: Do not use when you already need full Markdown prose (use distill_webpage) or structured tables and JSON-LD (use extract_structured_data). PARAMETER INTERACTIONS: Provide either url or html (when html is supplied, url is not fetched and only l…

ParameterTypeDescription
url *stringTarget public HTTP(S) webpage URL to fetch (or builtin://stripe-docs for a built-in benchmark page). Private/loopback IPs are blocked.
agent_idstringOptional 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.
htmlstringOptional 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.
tx_hashstringOptional 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.

extract_structured_data

Extract machine-readable structured data from a web page: Schema.org JSON-LD objects, OpenGraph metadata, HTML tables parsed as JSON row arrays, fenced code blocks, section headings, and links. WHEN TO USE: Call this tool for pricing tables, API specifications, product metadata, or code snippets; use distill_webpage for narrative Markdown or recon_webpage_skeleton for a lightweight heading outline. WHEN NOT TO USE: Do not use for narrative prose extraction or binary files. PARAMETER INTERACTIONS: Provide either url or html (when html is supplied, url is not fetched and only labels the cache ke…

ParameterTypeDescription
url *stringTarget public HTTP(S) webpage URL to fetch (or builtin://stripe-docs for a built-in benchmark page). Private/loopback IPs are blocked.
agent_idstringOptional 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.
htmlstringOptional 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.
tx_hashstringOptional 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.

get_agent_wallet_status

Inspect an agent's account ledger: remaining free trial calls (out of 5), prepaid USD balance, cumulative spend, total API calls, and total LLM tokens saved. WHEN TO USE: Call before a batch of paid tool executions or after completing a Stripe or USDC top-up to confirm your balance. WHEN NOT TO USE: Do not use to process web content, execute marketplace tools, or submit payments; use the other tools on this server for execution. PARAMETER INTERACTIONS: Omit agent_id to inspect the default trial account derived from your client IP, or pass your explicit agent_id or agd_pass_ session key to chec…

ParameterTypeDescription
agent_idstringOptional Agent ID or agd_pass_ session key to inspect. Omit to check the default wallet derived from your client IP.