Skip to main content
Glama
nbrain-mena-logistics-wasl-dispatch

nbrain-mena-logistics-wasl-dispatch

README.md
# `nbrain-mena-logistics-wasl-dispatch` — Saudi `TGA Wasl` Telematics, UK `TfL PHV` Private Hire Compliance, `WGS84 Vincenty` Geodesy & Last-Mile `COD` Ledger + MCP Server

[![License: MIT](https://img.shields.io/badge/License-MIT-emerald.svg)](./LICENSE)
[![Python 3.10+](https://img.shields.io/badge/Python-3.10%2B%20Zero--Dep-blue.svg)](./pyproject.toml)
[![MCP Registry](https://img.shields.io/badge/MCP-io.github.NBrain--Studio%2Fnbrain--mena--logistics--wasl--dispatch-purple.svg)](./server.json)

Engineered by **[Eng. Nadeem Mohamed Badr El-Din](https://nadeembadr.com)** at **[NBrain (`منظومة إن برين` — nbra.in)](https://nbra.in)** for commercial fleet telematics, cold-chain pharmaceutical delivery, UK private-hire dispatch, and MENA e-commerce COD couriers.

## Core Modules
1. **Saudi Transport General Authority (`TGA Wasl` — وصل)**: Validates 15-digit GPS tracker `IMEI` Luhn check digits, KSA spatial bounds, commercial speed caps, and **SFDA Cold-Chain cargo temperature regimes** (`2°C–8°C` chilled pharma, `<= -18°C` frozen, `15°C–25°C` controlled ambient).
2. **Iterative `WGS84 Vincenty` Ellipsoidal Distance (`0.5 mm` precision)**: Sub-millimeter oblate-spheroid geodesic distance + exact-`Decimal` dispatch fare and surge pricing.
3. **UK `TfL Private Hire (PHV)` Operator Compliance**: Enforces the post-2021 High Court **Operator-as-Principal** contract & 20% UK VAT rule, pre-booked dispatch timestamps (blocking illegal plying-for-hire), and driver/vehicle/operator badge validity.
4. **Last-Mile `COD` (Cash-on-Delivery) Manifest Reconciler**: Exact `Decimal` courier cash-in-hand variance, `RTO` (Return-to-Origin) fee handling, and merchant net settlement.

## Quick Verification
```bash
PYTHONPATH=src python -m unittest discover -s tests -v
```

TDQS

B3.2/5.0

Scored across 4 tools

Disambiguation5/5

Each tool targets a distinct jurisdiction and artifact: Saudi TGA Wasl telemetry validation, WGS84/Vincenty fare computation, UK TfL PHV booking audit, and COD/RTO manifest reconciliation. Despite all being logistics-compliance operations, the region and object qualifiers make misselection unlikely.

Naming Consistency4/5

All four names are snake_case and verb-first (validate_, calculate_, audit_, reconcile_), which is a predictable pattern. The names are extremely long and heavily over-qualified, but the convention itself is consistent.

Tool Count4/5

Four tools is on the thin side but each covers a genuinely separate compliance/calculation concern, so none feels redundant. For a narrow regulatory-dispatch utility, this is a reasonable scoping.

Completeness3/5

The surface is entirely stateless validators/calculators with no create/get/update operations for bookings, shipments, or drivers, so agents hit dead ends for lifecycle work like creating a dispatch or tracking status. Core regulatory checks are covered, but the dispatch domain itself is only partially represented.

Maintenance

ActivityMaintained
ResponsivenessNo recent community issues