Skip to content

get_trip_status

Status: Implemented | Module: trip

Get detailed status and information for a specific trip by its UUID or friendly_id. Returns stop-level detail, scheduled times, transportation provider info, leg breakdown, notes, and an editable flag derived from the trip’s status. Use the stop IDs returned here when calling edit_trip to change pickup/dropoff addresses or times.

Hint Value
readOnlyHint true
Field Type Required Description
session_id string yes Active session ID from verify_member
trip_id string yes Trip UUID or friendly_id (e.g. 04-21-2026-91-B)

Friendly IDs are auto-resolved to UUIDs via the trip repository.

Field Type Description
trip TripDetail Full trip record (see below)
editable bool True when the trip’s status is in the active set
Field Type Description
trip_id string Trip UUID
friendly_id string Friendly display ID
status string Current status (scheduled, tp_assigned, in_progress, etc.)
appointment_time string Appointment datetime
distance_miles float Route distance
duration_minutes int Scheduled duration
note string Trip note/instructions
driver_note string Driver-specific note
stops StopDetail[] Pickup/dropoff/waypoint stops with stop_id (needed by edit_trip)
transportation_provider TPDetail Current TP (name + driver_confirmed flag)
legs LegDetail[] Multi-leg breakdown (standing orders, roundtrips)
service_type string Service type (e.g. ambulatory)
eta string Estimated arrival

A trip is editable when its status is one of: scheduled, needs_review, pending_eligibility, draft, tp_assigned, driver_assigned, en_route, arrived, in_progress (case-insensitive). Terminal statuses (cancelled, finished, denied, deleted) return editable=false.

The use case resolves the trip’s status via tripenums.StringToTripStatus() to keep the editable set aligned with the canonical enum from nemt-proto rather than duplicating string literals — adding a new active status upstream automatically flows through.

  • Loads session and refreshes TTL.
  • Validates trip ownership against the session’s org_id (defense in depth — misses classify as trip_not_found).
  • Emits a HIPAA audit entry mcp.get_trip_status with trip_id, friendly_id, and status metadata only.