AgentDiet AI Token Diet & Context Window Distiller

Strips 85-97% of HTML/DOM bloat into clean Markdown or JSON with cryptographic ROI proof.

我该使用它吗

质量与安全性

A
描述质量
100%
模式完整度
97%
命名质量
85%
投毒风险
100%
权限匹配度
100%
协议合规性
100%

基于对工具定义和协议合规性的自动分析。

上下文开销

~2,471token 数(工具定义)
~4.0 KB典型响应大小
对注意力有中等影响(占 128k 上下文窗口的 1.93%)

这是每次将服务器的工具加载到模型上下文窗口时所消耗的大致 token 数。数值越高,可用于其他任务的注意力就越少。

安装

一键安装

将以下内容添加到你的 `claude_desktop_config.json` 文件中:

{
  "mcpServers": {
    "agentdiet": {
      "url": "https://agentdiet.dev/mcp"
    }
  }
}

远程端点

https://agentdiet.dev/mcpstreamable-http

它能做什么

工具清单

工具(4)

🟢 只读🟡 写入🔴 删除⚪ 未知
🟢distill_webpage(url, html, mode, query, max_tokens, ...)

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')

输入模式

{
  "type": "object",
  "properties": {
    "url": {
      "minLength": 1,
      "maxLength": 2048,
      "type": "string",
      "description": "Target public HTTP(S) webpage URL to fetch (or builtin://stripe-docs for a built-in benchmark page). Private/loopback IPs are blocked."
    },
    "html": {
      "minLength": 1,
      "maxLength": 1900000,
      "type": "string",
      "description": "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."
    },
    "mode": {
      "type": "string",
      "enum": [
        "markdown",
        "budget"
      ],
      "default": "markdown",
      "description": "Extraction mode: 'markdown' (default) returns the full cleaned page; 'budget' returns only sections matching query within max_tokens."
    },
    "query": {
      "minLength": 1,
      "maxLength": 99999,
      "type": "string",
      "description": "BM25 relevance keywords used to rank and filter page sections. Required for focused filtering when mode='budget'; ignored when mode='markdown'."
    },
    "max_tokens": {
      "type": "integer",
      "description": "Maximum output token ceiling (50-16000, default 400). Enforced only when mode='budget'; ignored when mode='markdown'.",
      "minimum": 50,
      "maximum": 16000,
      "default": 400
    },
    "agent_id": {
      "minLength": 1,
      "maxLength": 256,
      "type": "string",
      "description": "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."
    },
    "tx_hash": {
      "minLength": 10,
      "maxLength": 256,
      "type": "string",
      "description": "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."
    }
  },
  "required": [
    "url"
  ],
  "additionalProperties": false,
  "examples": [
    {
      "url": "https://docs.stripe.com/api"
    }
  ]
}

输出模式

{
  "type": "object",
  "properties": {
    "status": {
      "type": "string",
      "description": "Execution status ('ok' or 'payment_required')."
    },
    "data": {
      "type": "object",
      "description": "Structured tool output payload."
    },
    "roi_proof": {
      "type": "object",
      "description": "Token compression and cost-savings verification metrics."
    }
  },
  "required": [
    "status"
  ]
}
🟢recon_webpage_skeleton(url, html, agent_id, tx_hash)

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 labels the cache key). 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.0002 per call. 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: recon_webpage_skeleton(url='https://docs.stripe.com/api')

输入模式

{
  "type": "object",
  "properties": {
    "url": {
      "minLength": 1,
      "maxLength": 2048,
      "type": "string",
      "description": "Target public HTTP(S) webpage URL to fetch (or builtin://stripe-docs for a built-in benchmark page). Private/loopback IPs are blocked."
    },
    "html": {
      "minLength": 1,
      "maxLength": 1900000,
      "type": "string",
      "description": "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."
    },
    "agent_id": {
      "minLength": 1,
      "maxLength": 256,
      "type": "string",
      "description": "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."
    },
    "tx_hash": {
      "minLength": 10,
      "maxLength": 256,
      "type": "string",
      "description": "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."
    }
  },
  "required": [
    "url"
  ],
  "additionalProperties": false,
  "examples": [
    {
      "url": "https://docs.stripe.com/api"
    }
  ]
}

输出模式

{
  "type": "object",
  "properties": {
    "status": {
      "type": "string",
      "description": "Execution status ('ok' or 'payment_required')."
    },
    "data": {
      "type": "object",
      "description": "Structured tool output payload."
    },
    "roi_proof": {
      "type": "object",
      "description": "Token compression and cost-savings verification metrics."
    }
  },
  "required": [
    "status"
  ]
}
🟢extract_structured_data(url, html, agent_id, tx_hash)

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 key). 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: extract_structured_data(url='https://docs.stripe.com/api')

输入模式

{
  "type": "object",
  "properties": {
    "url": {
      "minLength": 1,
      "maxLength": 2048,
      "type": "string",
      "description": "Target public HTTP(S) webpage URL to fetch (or builtin://stripe-docs for a built-in benchmark page). Private/loopback IPs are blocked."
    },
    "html": {
      "minLength": 1,
      "maxLength": 1900000,
      "type": "string",
      "description": "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."
    },
    "agent_id": {
      "minLength": 1,
      "maxLength": 256,
      "type": "string",
      "description": "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."
    },
    "tx_hash": {
      "minLength": 10,
      "maxLength": 256,
      "type": "string",
      "description": "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."
    }
  },
  "required": [
    "url"
  ],
  "additionalProperties": false,
  "examples": [
    {
      "url": "https://docs.stripe.com/api"
    }
  ]
}

输出模式

{
  "type": "object",
  "properties": {
    "status": {
      "type": "string",
      "description": "Execution status ('ok' or 'payment_required')."
    },
    "data": {
      "type": "object",
      "description": "Structured tool output payload."
    },
    "roi_proof": {
      "type": "object",
      "description": "Token compression and cost-savings verification metrics."
    }
  },
  "required": [
    "status"
  ]
}
🟢get_agent_wallet_status(agent_id)

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 check a specific funded wallet. Free and read-only: never charges a fee or consumes a free trial call. Example: get_agent_wallet_status(agent_id='example')

输入模式

{
  "type": "object",
  "properties": {
    "agent_id": {
      "minLength": 1,
      "maxLength": 256,
      "type": "string",
      "description": "Optional Agent ID or agd_pass_ session key to inspect. Omit to check the default wallet derived from your client IP."
    }
  },
  "additionalProperties": false,
  "examples": [
    {
      "agent_id": "example"
    }
  ]
}

输出模式

{
  "type": "object",
  "properties": {
    "status": {
      "type": "string",
      "description": "Execution status ('ok' or 'payment_required')."
    },
    "data": {
      "type": "object",
      "description": "Structured tool output payload."
    },
    "roi_proof": {
      "type": "object",
      "description": "Token compression and cost-savings verification metrics."
    }
  },
  "required": [
    "status"
  ]
}

社区

评价此服务器

证据

最近观测

已验证未记录版本4 个工具