Workflow Flows
The NEMT MCP Service supports nine primary workflow flows. Each flow documents the exact tool sequence, inputs, outputs, error scenarios, and recovery paths.
Flow Summary
Section titled “Flow Summary”| Flow | Tools Used | Description |
|---|---|---|
| Booking | verify_member, resolve_address, set_booking_details, review_trip, confirm_trip | Full trip booking from verification to confirmation |
| Trip Estimation | verify_member, resolve_address, estimate_trip | Pre-booking route + weather + optimal pickup time |
| Cancellation | verify_member, get_active_trips, cancel_trip (two-step) | Cancel an existing trip — single-tool two-step pattern |
| Will-Call | verify_member, get_active_trips, activate_will_call | Activate a will-call return leg for pickup |
| Standing Orders | verify_member, set_booking_details (RRULE), review_trip, confirm_trip | Create (via confirm_trip), list, and cancel recurring trips |
| Address Validation | resolve_address | 4-source address cascade with ranked candidates |
| Member Lookup | search_members, verify_member, get_member_profile, get_member_email/phone/addresses | Pre-verification search, full profile, and contact reads |
| Driver Enrollment | verify_member, enroll_driver, setup_payee | Onboard an MR driver and configure payment |
| Trip Confirmation | verify_member, confirm_trip, send_confirmation | Email a single-trip or standing-order confirmation with PDFs |
Master Flow Diagram
Section titled “Master Flow Diagram”
graph TD
V["verify_member"] --> B["Booking Flow"]
V --> C["Cancel Flow"]
V --> W["Will-Call Flow"]
V --> SO["Standing Orders"]
V --> P["Member Profile"]
B --> VA["resolve_address"]
B --> SBD["set_booking_details"]
SBD --> RT["review_trip"]
RT --> CT["confirm_trip"]
C --> GAT["get_active_trips"]
GAT --> CANCEL1["cancel_trip (no reason)"]
CANCEL1 --> CANCEL["cancel_trip (with reason)"]
W --> GAT2["get_active_trips"]
GAT2 --> AWC["activate_will_call"]
style V fill:#48bb78,color:#fff
style CT fill:#e53e3e,color:#fff
style CANCEL fill:#e53e3e,color:#fff
style AWC fill:#ed8936,color:#fff
Common Pattern
Section titled “Common Pattern”Most flows start with verify_member, which creates a session (1h TTL) and a booking draft (24h TTL). The session_id returned is required for all subsequent tool calls within the flow.
graph LR
V["verify_member"] --> F["Flow-specific tools"] --> C["Cleanup
(session + draft deleted)"] style V fill:#48bb78,color:#fff style C fill:#e53e3e,color:#fff
(session + draft deleted)"] style V fill:#48bb78,color:#fff style C fill:#e53e3e,color:#fff
Sessions and drafts are automatically cleaned up after successful terminal operations (confirm_trip, create_standing_order). For abandoned flows, sessions expire after 1 hour and drafts after 24 hours.