geofence_report
ChatGPTThe complete Geofence Violations report for a period, computed in one step: total, entered and exited; every branch, geofence and vehicle ranked with its entered/exited split; vehicle-and-geofence pairs with repeated events; busiest days and hours; and the timezone used. ALWAYS use this for a geofence violations/incidents report instead of several run_query calls, and take every figure from it - never add numbers up yourself. Entries and exits are observations, not confirmed violations.
get_account_settings
ChatGPTThe account's configured timezone, which every date and time in a report is read in.
get_dimensions
ChatGPTList the groupings a given metric supports, and every filter it accepts with the filter key, its type, and whether ids must come from resolve_entity first.
list_entities
ChatGPTList the vehicles, drivers or branches themselves, with ids — whether or not they have any activity. Use this, never a metric, for "list the drivers", "which vehicles are in branch X", "how many drivers", "extract the ids". Metrics only count activity, so a metric grouped by driver lists just the drivers that did something. Returns total plus one page; if hasMore is true, call again with the next offset.
list_geofence_events
ChatGPTThe individual geofence entry/exit events for a period, newest first, each with its timestamp (UTC ISO and local time), incident type, geofence, vehicle plate and branch. Paged: if hasMore is true, call again with the next offset. Use for the raw event list.
list_saved_reports
ChatGPTList this company's saved reports.
render_last_result
ChatGPTRe-present the result of the most recent run_query in this conversation — a different chart type, a different language, or both — without running the query again. Call this, never retype a table by hand, whenever the user asks to see the SAME numbers another way ("as a table", "as a line chart", "in English", "بالعربي"). Translating a table yourself corrupts the data: vehicle, branch and driver names are stored per language and cannot be translated by guessing. If the numbers themselves should change — different metric, dimension or date range — call run_query instead.
resolve_entity
ChatGPTTurn a name the user typed ("Riyadh", "Truck 204") into a real id. NEVER invent or guess ids — always resolve them here first. Returns typed candidates; if needsDisambiguation is true, ask the user which one they mean.
run_query
ChatGPTExecute a report. Supply a definition built from catalog metric keys and ids from resolve_entity. Never include a company id — scoping is automatic. If the call is rejected, the error lists what is valid; fix the definition and retry.
run_saved_report
ChatGPTRe-run a saved report, optionally overriding its filters (new date range, branch, vehicle). Overrides are merged onto the saved definition and re-validated.
save_report
ChatGPTSave the definition of the report just run, so the user can re-run it later with different filters. Only call after the user confirms the result is what they wanted.
search_metrics
ChatGPTFind which metrics can answer a question. ALWAYS call this before run_query. Returns matching metric keys with descriptions, units, and an ambiguity flag — if a match reports needsDisambiguation, ask the user which definition they mean instead of guessing.