{"uid":"cap_oC7WMIg_imM72ZnrAHzvf","slug":"agentdiet-mcp-compiler-context-window-distiller-0fde81ff","name":"AgentDiet MCP Compiler — 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-compiler?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":{"target":{"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_o0JRVcv10XzTpaytJYwiB","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 by compiling MCP-formatted inputs, returning de-bloated output with up to 91% token compression ratio.","exampleAgentPrompt":"Can you run this GET request through AgentDiet's MCP compiler to compress my context window — pass the target URL as a query param and give me back the distilled output along with the compression ratio?","exampleUseCases":[{"title":"Shrink RAG output before LLM call","prompt":"I'm getting huge chunks back from my RAG retrieval pipeline and blowing my context budget — can you compress that output using AgentDiet's MCP compiler before sending it to the model?"},{"title":"Reduce token cost for long document agent","prompt":"I need to run a long document through my agent but I'm worried about token costs — can you distill it first using AgentDiet's context window compressor and tell me how much it shrank?"},{"title":"Optimize MCP tool response for downstream agent","prompt":"My MCP tool is returning way too much data for the next agent node to handle — can you pass it through AgentDiet's MCP compiler via GET to strip the bloat before routing it downstream?"}],"resultDescription":"Returns a JSON object with a 'data' field containing the compressed output, a 'status' field indicating success, and a 'roi_proof' object showing the compression_ratio_pct (e.g. 91.4%) achieved by the distillation process.","failureModes":["Missing required 'input' object with 'type' and 'method' fields returns a validation error","Invalid HTTP method enum value (not GET or POST) causes schema rejection","Malformed target query parameter may result in empty or errored data response","Payment failure via x402/USDC on Base blocks execution before compression occurs","Unreachable target URL in query params may result in empty distillation output"],"whenToPreferThis":"Choose this endpoint when an AI agent needs to reduce its context window size before passing data to a downstream LLM or agent node, especially when token costs are a concern or context limits are at risk of being exceeded. It is particularly useful in RAG pipelines, MCP tool chains, or multi-agent orchestration where intermediate outputs are verbose. Prefer this over manual summarization when deterministic, measurable compression with a provable ratio is required.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-22T12:43:59.949Z","isFirstParty":false,"canonicalSlug":"agentdiet-mcp-compiler-context-window-distiller-0fde81ff"}