{"openapi":"3.0.0","info":{"title":"Rate Limit Manager","version":"1.0.0","description":"Manages agent request rate limiting with exponential backoff. Pay-per-request via x402 (USDC on Base).","guidance":"POST to /mcp with a JSON-RPC body calling 'check_rate_limit' with 'agentId', 'targetApi', and optional 'requestsPerMinute'. Include X-Payment-Tx header. Returns { allowed, retryAfterMs, queuePosition, backoffStrategy }."},"paths":{"/mcp":{"post":{"summary":"Check agent rate limit status","description":"MCP endpoint for check_rate_limit tool. Requires x402 payment (0.001 USDC on Base).","x-payment-info":{"protocols":["x402"],"pricingMode":"fixed","price":"0.001"},"parameters":[{"name":"X-Payment-Tx","in":"header","required":true,"description":"Transaction hash from USDC transfer on Base","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","method","params","id"],"properties":{"jsonrpc":{"type":"string","enum":["2.0"]},"method":{"type":"string","enum":["tools/call"]},"params":{"type":"object","required":["name","arguments"],"properties":{"name":{"type":"string","enum":["check_rate_limit"]},"arguments":{"type":"object","required":["agentId","targetApi"],"properties":{"agentId":{"type":"string","description":"Unique identifier for the agent"},"targetApi":{"type":"string","description":"The API endpoint being called"},"requestsPerMinute":{"type":"number","description":"Custom rate limit (default 60)"}}}}},"id":{"type":"number"}}}}}},"responses":{"200":{"description":"Rate limit check result","content":{"application/json":{"schema":{"type":"object","properties":{"allowed":{"type":"boolean"},"retryAfterMs":{"type":"number"},"queuePosition":{"type":"number"},"backoffStrategy":{"type":"string"}}}}}},"402":{"description":"Payment Required"}}}}}}