Flight Discovery Decoder and Rate Limiter
Created: 2/14/2026
This tool decodes Base64-encoded JSON flight offers, enforces rate limiting via a token bucket algorithm, and can update circuit breaker state. It accepts _init (Base64 string containing JSON offers, required when mode=decode), _token_bucket (JSON string token bucket state, required when mode=check_limit), _circuit_state (JSON string circuit breaker state, mainly used when mode=update_circuit), mode (decode, check_limit, or update_circuit), and optional date, origin, and destination filters. The JSON state inputs _token_bucket and _circuit_state are supplied as raw strings by the caller and must be handled carefully so their contents are preserved and only changed when the logic requires it. The tool produces decoded and optionally filtered offers plus any updated rate-limit or circuit state. All outputs must strictly validate against the system-provided structured output schema, which is auto-produced and not included in this definition.