{"uid":"cap_c8lNobJhhwvdeLLfaoC0e","slug":"agentdiet-mcp-gateway-context-window-distiller-52b25261","name":"AgentDiet MCP Gateway — Context Window Distiller","description":"Deterministic B2A/A2A/MCP/x402/MPP/L402 execution and intelligence node at https://rag-diet.agentdiet.dev settling in USDC on Base.","url":"https://rag-diet.agentdiet.dev/v1/mcp-gateway?utm_source=zero.xyz","method":"GET","headers":{},"bodySchema":{"type":"object","$schema":"https://json-schema.org/draft/2020-12/schema","required":["input"],"properties":{"input":{"type":"object","required":["type","method"],"properties":{"type":{"type":"string","const":"http"},"method":{"enum":["GET","POST"],"type":"string"},"queryParams":{"type":"object","properties":{"query":{"type":"string"}}}},"additionalProperties":false},"output":{"type":"object","required":["type"],"properties":{"type":{"type":"string"},"example":{"type":"object"}}}}},"responseSchema":{"type":"json","example":{"data":{},"status":"ok","roi_proof":{"compression_ratio_pct":91.4}}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.01","displayCostAsset":"USDC","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.01/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.01","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.01","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_f3cbkjZ_ezbUFrmb_0IJi","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.01","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Compresses and distills AI agent context windows via an MCP gateway, reducing token usage by up to 85-91% using RAG-based de-bloating techniques","exampleAgentPrompt":"Use AgentDiet's RAG distiller to compress this context window — I need to cut the token count by at least 85% before sending it to the LLM, and I want to see the compression ratio proof.","exampleUseCases":[{"title":"Trim oversized RAG retrieval context","prompt":"My RAG pipeline is pulling in way too much context and blowing past the model's token limit — can you run it through AgentDiet to distill it down and show me how much compression we got?"},{"title":"Reduce LLM API costs for agent fleet","prompt":"I'm running a fleet of agents that are burning through tokens because their context windows are huge — use AgentDiet to de-bloat each context before the LLM call so I can cut my API costs."},{"title":"Fit long document into model context","prompt":"This document is too long to fit in a single LLM call — can you run it through the AgentDiet context distiller with a GET query so it compresses it enough to fit within the context limit?"}],"resultDescription":"Returns a JSON object with a 'data' field containing the distilled/compressed context, a 'status' field ('ok'), and an 'roi_proof' object showing the compression_ratio_pct achieved (e.g. 91.4%). Payments settle in USDC on Base at $0.01 per call.","failureModes":["Missing required 'input' field returns validation error","Invalid 'type' (must be 'http') or unsupported 'method' value causes schema rejection","Empty or missing query param results in no compression performed","Payment failure (insufficient USDC balance on Base) blocks execution","Rate limiting or gateway timeout if context payload is too large","Non-JSON or malformed input body returns parse error"],"whenToPreferThis":"Choose this endpoint when your AI agent pipeline needs to reduce context window size before LLM calls, especially when dealing with large RAG retrievals, long documents, or multi-turn conversation histories that exceed token limits. It is particularly suited for cost-sensitive agentic workflows where you need verifiable compression ratios (ROI proof) and deterministic, pay-per-call pricing via x402/USDC on Base.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-22T12:43:20.785Z","isFirstParty":false,"canonicalSlug":"agentdiet-mcp-gateway-context-window-distiller-52b25261"}