Status: Implemented | Module: trip
List available transportation providers for a created trip. Returns provider names and IDs so you can hand off to assign_provider. Use AFTER confirm_trip to find the correct provider (e.g. Mileage Reimbursement Virginia for MR trips). Accepts trip UUID (from confirm_trip trip_ids) or friendly_id. The set of tp_ids returned is cached (10 min TTL) so assign_provider can validate that the caller is picking from a current result set.
| Hint |
Value |
| readOnlyHint |
true |
| Field |
Type |
Required |
Description |
session_id |
string |
yes |
Active session ID from verify_member |
trip_id |
string |
yes |
Trip UUID (from confirm_trip trip_ids) or friendly_id |
| Field |
Type |
Description |
trip_id |
string |
Resolved trip UUID |
providers |
TripProvider[] |
Available TP candidates |
count |
int |
Number of providers returned |
| Field |
Type |
Description |
tp_id |
string |
Provider UUID (pass to assign_provider) |
name |
string |
Provider display name (e.g. Mileage Reimbursement Virginia) |
status |
string |
Provider status |
is_rate |
bool |
Whether a rate has been computed |
selected |
bool |
Whether this provider is currently assigned to the trip |
rate_amount |
string |
Rate amount (when available) |
estimated_distance_miles |
float |
Estimated distance |
estimated_duration_seconds |
int |
Estimated duration |
pickup_distance_miles |
float |
Pickup leg distance |
pickup_duration_seconds |
int |
Pickup leg duration |
- Loads session + validates trip ownership against
org_id.
- Caches the returned
tp_id set in the TP candidate cache keyed by session_id + trip_id (10 min TTL). Cache write failure is non-fatal.
- Emits a HIPAA audit entry
mcp.list_trip_providers with provider_count and the selected_tp_id (when any) as metadata. Rate amounts and provider names are not logged.
- Source:
internal/app/trip/usecases/list_trip_providers.go, internal/app/trip/adapters/mcp/handlers/list_trip_providers.go
- Prerequisite: confirm_trip
- Next: assign_provider