{"uid":"cap_znFKQrvYgTYAi1qLPvMZd","slug":"agentdiet-token-optimizer-eeee847c","name":"AgentDiet Token Optimizer","description":"Deterministic B2A/A2A/MCP/x402/MPP/L402 execution and intelligence node at https://mcp-gateway.agentdiet.dev settling in USDC on Base.","url":"https://mcp-gateway.agentdiet.dev/v1/token-optimizer?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":{"url":{"type":"string"},"mode":{"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.001","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.001/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.001","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.001","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_nOlI1pkPd2qunab2JpaVg","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.001","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Compresses and optimizes token payloads for MCP/x402/A2A calls, returning a compression ratio proof","exampleAgentPrompt":"Optimize and compress the token payload for this GET request to https://api.example.com/data?mode=fast and show me the compression ratio proof so I know how much I'm saving.","exampleUseCases":[{"title":"Pre-flight token compression for agent calls","prompt":"Before my agent calls this MCP server endpoint at https://mcp.example.com/tool, can you run the token optimizer on it as a GET request and tell me the compression ratio so I can decide if it's worth batching?"},{"title":"Cost audit for x402 API workflow","prompt":"I'm spending too much on x402 API calls — run the token optimizer on my GET request to https://x402.example.com/infer?mode=verbose and give me the ROI proof showing how much I'd save."},{"title":"Payload size check before A2A handoff","prompt":"Before handing off this GET request to another agent at https://agent.example.com/task?mode=stream, run it through the token optimizer and show me the compression percentage so I know how lean the payload is."}],"resultDescription":"Returns a JSON object with status 'ok', a data field containing the optimized/compressed output, and a roi_proof object showing the compression_ratio_pct (e.g. 91.4%), allowing the caller to verify efficiency gains from the optimization.","failureModes":["Missing required 'input' object returns validation error","Invalid HTTP method enum value (not GET or POST) causes rejection","Unreachable or invalid target URL may yield empty or error data","Malformed queryParams structure returns schema validation failure","Payment settlement failure on Base/USDC may block the call"],"whenToPreferThis":"Choose this endpoint when you need a deterministic, metered proof of token compression efficiency for HTTP-based MCP, x402, or A2A agent calls settled in USDC on Base. It is especially useful when cost-auditing agent workflows or proving ROI on token reduction before committing to high-volume API call patterns.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-22T12:41:04.874Z","isFirstParty":false,"canonicalSlug":"agentdiet-token-optimizer-eeee847c"}