fleetmind-dispatch-ai / MCP_TOOLS_SUMMARY.md
mashrur950's picture
Implement migrations for assignments management and testing framework
5b558e5
|
raw
history blame
4.52 kB

FleetMind MCP Tools - Quick Reference

Geocoding & Routing (3 tools)

  1. geocode_address - Convert address to GPS coordinates
  2. calculate_route - Calculate route with vehicle-specific optimization (motorcycle/car/bicycle), toll avoidance, traffic data
  3. calculate_intelligent_route - Advanced routing with weather + traffic + vehicle type analysis

Order Management (8 tools)

  1. create_order - Create new delivery order
  2. count_orders - Count orders by status (pending/assigned/in_transit/delivered)
  3. fetch_orders - Get list of orders with filters and pagination
  4. get_order_details - Get full details of specific order by ID
  5. search_orders - Search orders by customer name, address, or order ID
  6. get_incomplete_orders - Get all pending/assigned/in_transit orders
  7. update_order - Update order status, driver, location, notes (with assignment cascading)
  8. delete_order - Delete order (with active assignment checks)

Driver Management (8 tools)

  1. create_driver - Register new driver with name, phone, vehicle type
  2. count_drivers - Count drivers by status (active/busy/offline)
  3. fetch_drivers - Get list of drivers with filters and pagination
  4. get_driver_details - Get full details of specific driver by ID
  5. search_drivers - Search drivers by name, phone, or driver ID
  6. get_available_drivers - Get all active drivers ready for assignment
  7. update_driver - Update driver status, phone, vehicle type, location (with assignment validation)
  8. delete_driver - Delete driver (with assignment safety checks)

Assignment Management (6 tools)

  1. create_assignment - Assign order to driver (validates status, calculates route, saves all data)
  2. get_assignment_details - Get assignment details by assignment ID, order ID, or driver ID
  3. update_assignment - Update assignment status with cascading updates to orders/drivers
  4. unassign_order - Unassign order from driver (reverts statuses, requires confirmation)
  5. complete_delivery - Mark delivery complete and auto-update driver location to delivery address
  6. fail_delivery - Mark delivery as failed with MANDATORY driver location and failure reason

Bulk Operations (2 tools)

  1. delete_all_orders - Bulk delete all orders (or by status filter, blocks if active assignments exist)
  2. delete_all_drivers - Bulk delete all drivers (or by status filter, blocks if assignments exist)

Total: 27 MCP Tools

Routing Tools: 3 (with Google Routes API integration) Order Tools: 8 (full CRUD + search + cascading) Driver Tools: 8 (full CRUD + search + cascading) Assignment Tools: 6 (complete assignment lifecycle + delivery completion + failure handling) Bulk Operations: 2 (efficient mass deletions with safety checks)

Key Features:

  • βœ… Real-time traffic & weather-aware routing
  • βœ… Vehicle-specific optimization (motorcycle/bicycle/car/van/truck)
  • βœ… Toll detection & avoidance
  • βœ… Complete fleet management (orders + drivers + assignments)
  • βœ… Assignment system with automatic route calculation
  • βœ… Automatic driver location updates on delivery completion
  • βœ… Mandatory location + reason tracking for failed deliveries
  • βœ… Structured failure reasons for analytics and reporting
  • βœ… Cascading status updates (order β†’ assignment β†’ driver)
  • βœ… Safety checks preventing invalid deletions/updates
  • βœ… PostgreSQL database with foreign key constraints
  • βœ… Search & filtering capabilities
  • βœ… Status tracking & validation

Assignment System Capabilities:

  • Manual assignment with validation (pending orders + active drivers only)
  • Automatic route calculation from driver location to delivery address
  • Delivery completion with automatic driver location update to delivery address
  • Delivery failure handling with mandatory GPS location and failure reason
  • Structured failure reasons: customer_not_available, wrong_address, refused_delivery, damaged_goods, payment_issue, vehicle_breakdown, access_restricted, weather_conditions, other
  • Status management with cascading updates across orders/drivers/assignments
  • Safety checks preventing deletion of orders/drivers with active assignments
  • Assignment lifecycle: active β†’ in_progress β†’ completed/failed/cancelled
  • Database integrity via FK constraints (ON DELETE CASCADE/RESTRICT/SET NULL)