{"openapi":"3.1.0","info":{"title":"Uber for Orchet — REST tool surface","version":"0.1.0","description":"Three tools that wrap Uber's Riders API under the @orchet/agent-sdk contract. Surfaces estimates, ride requests, and history to the Orchet orchestrator.","contact":{"name":"Lumo Rentals","email":"prasanth.kalas@lumo.rentals"}},"servers":[{"url":"{base}/tools","variables":{"base":{"default":"https://uber.orchet.ai"}}}],"components":{"securitySchemes":{"bearer":{"type":"http","scheme":"bearer","description":"User-scoped Uber OAuth2 access token, attached by the Orchet router after resolving the user's connection. Never set by the LLM."}},"schemas":{"Location":{"type":"object","required":["latitude","longitude"],"properties":{"latitude":{"type":"number","format":"double"},"longitude":{"type":"number","format":"double"},"address":{"type":"string","description":"Optional human-readable address for display."}}},"Estimate":{"type":"object","required":["product_id","product_name","low_estimate","high_estimate","currency_code","pickup_estimate_minutes"],"properties":{"product_id":{"type":"string","description":"Uber product UUID — pass back into uber_request_ride."},"product_name":{"type":"string","enum":["UberX","UberXL","Comfort","Black","UberX Priority","Electric"]},"low_estimate":{"type":"number"},"high_estimate":{"type":"number"},"currency_code":{"type":"string","description":"ISO-4217."},"pickup_estimate_minutes":{"type":"integer","description":"Minutes until vehicle arrives at pickup."},"duration_seconds":{"type":"integer","description":"Estimated trip duration."},"distance_meters":{"type":"integer","description":"Estimated trip distance."},"surge_multiplier":{"type":"number","description":"1.0 = no surge. >1.0 = active surge pricing."}}},"RequestedRide":{"type":"object","required":["request_id","status","product_id"],"properties":{"request_id":{"type":"string"},"status":{"type":"string","enum":["processing","no_drivers_available","accepted","arriving","in_progress","driver_canceled","rider_canceled","completed"]},"product_id":{"type":"string"},"eta_minutes":{"type":"integer"},"surge_multiplier":{"type":"number"},"vehicle":{"type":"object","properties":{"make":{"type":"string"},"model":{"type":"string"},"license_plate":{"type":"string"},"color":{"type":"string"}}},"driver":{"type":"object","properties":{"name":{"type":"string"},"rating":{"type":"number"},"phone_number":{"type":"string","description":"Masked. Tap-to-call only."}}}}},"HistoryRide":{"type":"object","required":["request_id","status","request_time","product_id"],"properties":{"request_id":{"type":"string"},"status":{"type":"string","enum":["completed","rider_canceled","driver_canceled"]},"request_time":{"type":"string","format":"date-time"},"start_time":{"type":"string","format":"date-time"},"end_time":{"type":"string","format":"date-time"},"product_id":{"type":"string"},"start_address":{"type":"string"},"end_address":{"type":"string"},"distance_meters":{"type":"integer"},"duration_seconds":{"type":"integer"},"fare":{"type":"object","properties":{"total":{"type":"number"},"currency_code":{"type":"string"}}}}}}},"paths":{"/uber_get_estimates":{"post":{"operationId":"uber_get_estimates","summary":"Get fresh price + ETA across Uber product types for an origin→destination pair.","description":"Read-only. Returns one Estimate object per Uber product available in the pickup region (UberX, XL, Comfort, Black, etc.). Surge multipliers are included. The orchestrator renders these in the chat as a tier-list card and the user picks one to request.","security":[{"bearer":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["origin","destination"],"properties":{"origin":{"$ref":"#/components/schemas/Location"},"destination":{"$ref":"#/components/schemas/Location"},"seat_count":{"type":"integer","minimum":1,"maximum":6,"default":1}}}}}},"responses":{"200":{"description":"Array of fresh estimates, one per available product type.","content":{"application/json":{"schema":{"type":"object","required":["offers"],"properties":{"offers":{"type":"array","items":{"$ref":"#/components/schemas/Estimate"}}}}}}},"401":{"description":"Bearer token missing/invalid — user must reconnect Uber."}}}},"/uber_request_ride":{"post":{"operationId":"uber_request_ride","summary":"Request a ride. Money tool — gated by Orchet's two-step confirmation.","description":"MONEY TOOL. Surfaces the orchestrator's confirmation protocol: pass simulate=true to preview the request without billing the user; pass simulate=false (after the user explicitly confirms) to actually request the ride. The Orchet router enforces that simulate=false is only allowed after a user 'Yes, book it' confirmation in chat. If the offer's surge_multiplier on the LIVE Uber request comes back higher than the estimate we ran two steps earlier, we emit a confirmation_mismatch frame and re-surface a fresh price for re-confirmation.","security":[{"bearer":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["product_id","origin","destination","simulate"],"properties":{"product_id":{"type":"string","description":"From a recent uber_get_estimates result."},"origin":{"$ref":"#/components/schemas/Location"},"destination":{"$ref":"#/components/schemas/Location"},"simulate":{"type":"boolean","description":"true = dry-run preview (no billing); false = real request (only after confirmation)."},"fare_id":{"type":"string","description":"If the estimate returned an upfront fare ID, pass it here to pin the price."}}}}}},"responses":{"200":{"description":"Ride requested. status='processing' transitions to 'accepted'/'arriving' as drivers respond.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RequestedRide"}}}},"409":{"description":"confirmation_mismatch — surge has moved since the estimate. Re-confirm with the new fresh estimate in the response body."}}}},"/uber_get_ride_history":{"post":{"operationId":"uber_get_ride_history","summary":"List the user's recent Uber rides.","description":"Read-only. Returns up to `limit` most-recent rides (default 10, max 50). Used by the orchestrator to inform suggestions ('You usually take Comfort at this hour — want me to book one?').","security":[{"bearer":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"limit":{"type":"integer","minimum":1,"maximum":50,"default":10},"offset":{"type":"integer","minimum":0,"default":0}}}}}},"responses":{"200":{"description":"Most-recent rides first.","content":{"application/json":{"schema":{"type":"object","required":["rides","count"],"properties":{"rides":{"type":"array","items":{"$ref":"#/components/schemas/HistoryRide"}},"count":{"type":"integer"},"has_more":{"type":"boolean"}}}}}}}}}}}