> ## Documentation Index
> Fetch the complete documentation index at: https://help.bodharouteplanner.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Tools Reference

> Complete reference for all 14 MCP tools — parameters, return fields, scopes, and example questions.

# Tools Reference

The Bodha Route Planner MCP server exposes **14 read-only tools** that AI assistants can call. Each tool queries your fleet data and returns structured results that the assistant turns into plain-language answers.

> [!NOTE]
>
> All tools are **read-only**. They cannot create, modify, or delete any data in your account. Write capabilities are planned for a future release.

***

## Routes

### `list_routes`

List routes filtered by date, status, or driver.

| Parameter | Type | Required | Description |
| - | - | - | - |
| `date` | string | No | ISO date (e.g. `2026-10-29`). Defaults to today. |
| `status` | string | No | Filter by status: `planned`, `optimized`, `dispatched`, `in_progress`, `completed`. |
| `driverId` | string | No | Filter to a specific driver's routes. |
| `limit` | number | No | Max results (default 25, max 100). |
| `offset` | number | No | Pagination offset. |

**Returns:** Array of routes with id, name, date, status, driver count, stop count, distance, duration, and completion percentage.

**Scope required:** `routes:read`

**Example questions:**

* *"What routes do we have today?"*
* *"Show me all completed routes from last week"*
* *"Which routes are still in progress?"*

***

### `get_route`

Get full details for a single route, including all stops.

| Parameter | Type | Required | Description |
| - | - | - | - |
| `routeId` | string | **Yes** | The route ID. |

**Returns:** Complete route object with name, date, status, assigned drivers, all stops (with sequence, address, status, ETAs, completion details), total distance, total duration, and optimization metadata.

**Scope required:** `routes:read`

**Example questions:**

* *"Show me the details of route R-2024-0142"*
* *"What stops are on the morning route?"*

***

### `get_route_summary`

Get a quick statistical summary of a route without listing every stop.

| Parameter | Type | Required | Description |
| - | - | - | - |
| `routeId` | string | **Yes** | The route ID. |

**Returns:** Stop count, completed/failed/pending counts, total distance, total duration, estimated finish time, completion percentage.

**Scope required:** `routes:read`

**Example questions:**

* *"Is the afternoon route on track?"*
* *"What's the completion rate for route X?"*

***

## Stops

### `list_stops`

List stops across routes with filters.

| Parameter | Type | Required | Description |
| - | - | - | - |
| `routeId` | string | No | Filter to stops on a specific route. |
| `status` | string | No | Filter by status: `pending`, `completed`, `failed`, `skipped`. |
| `date` | string | No | ISO date. Defaults to today. |
| `dateFrom` | string | No | Start of date range (ISO date). |
| `dateTo` | string | No | End of date range (ISO date). |
| `limit` | number | No | Max results (default 50, max 200). |
| `offset` | number | No | Pagination offset. |

**Returns:** Array of stops with id, sequence, address, recipient name, status, scheduled time, actual arrival/departure, completion notes, failure reason (if failed), proof of delivery status.

**Scope required:** `stops:read`

**Example questions:**

* *"Which stops failed today?"*
* *"Show me all completed stops from this week"*
* *"List pending stops on route X"*

***

### `get_stop`

Get complete details for a single stop.

| Parameter | Type | Required | Description |
| - | - | - | - |
| `stopId` | string | **Yes** | The stop ID. |

**Returns:** Full stop object with address, recipient, phone (masked), notes, delivery instructions, time window, scheduled/actual times, status, failure reason, proof of delivery details (signature, photos, notes), custom properties.

**Scope required:** `stops:read`

**Example questions:**

* *"What happened at stop #7?"*
* *"Show me the delivery details for the Baker Street stop"*

***

### `search_stops`

Search for stops by name, address, reference number, or notes.

| Parameter | Type | Required | Description |
| - | - | - | - |
| `query` | string | **Yes** | Search text (name, address, reference, or notes). |
| `dateFrom` | string | No | Start of date range. |
| `dateTo` | string | No | End of date range. |
| `limit` | number | No | Max results (default 20, max 50). |

**Returns:** Matching stops with route name, date, and full stop details.

**Scope required:** `stops:read`

**Example questions:**

* *"Find the delivery for John Smith"*
* *"Search for orders going to 123 Oak Street"*
* *"Look up reference REF-2024-0099"*

***

## Drivers

### `list_drivers`

Get your driver roster with today's assignment status.

| Parameter | Type | Required | Description |
| - | - | - | - |
| `status` | string | No | Filter: `active`, `inactive`, `all`. Default `active`. |
| `includeToday` | boolean | No | Include today's route assignment info (default true). |

**Returns:** Array of drivers with id, name, email, phone (masked), vehicle type, active status, and (if includeToday) today's route name, stop count, and completion percentage.

**Scope required:** `drivers:read`

**Example questions:**

* *"Who are my active drivers?"*
* *"Who's on the road today?"*
* *"Which drivers don't have a route today?"*

***

### `get_driver_performance`

Get performance metrics for one or all drivers over a period.

| Parameter | Type | Required | Description |
| - | - | - | - |
| `driverId` | string | No | Specific driver ID. Omit for all drivers. |
| `dateFrom` | string | **Yes** | Start of period (ISO date). |
| `dateTo` | string | **Yes** | End of period (ISO date). |

**Returns:** Per-driver metrics: routes completed, stops completed, stops failed, completion rate, on-time rate, average stops per route, total distance, total driving time.

**Scope required:** `drivers:read`

**Example questions:**

* *"How did each driver perform this month?"*
* *"Compare driver Alex vs driver Sam over the last 30 days"*
* *"Who has the highest completion rate this quarter?"*

***

## Orders

### `list_orders`

List orders in the inbox with filters.

| Parameter | Type | Required | Description |
| - | - | - | - |
| `status` | string | No | Filter: `ready`, `needs_review`, `assigned`, `completed`, `cancelled`. |
| `source` | string | No | Filter by integration source (e.g. `method_crm`, `google_sheets`, `api`, `manual`). |
| `dateFrom` | string | No | Created after this date. |
| `dateTo` | string | No | Created before this date. |
| `limit` | number | No | Max results (default 50, max 200). |
| `offset` | number | No | Pagination offset. |

**Returns:** Array of orders with id, reference, recipient, address, status, source, created date, assigned route (if any), custom fields.

**Scope required:** `orders:read`

**Example questions:**

* *"Are there any new orders?"*
* *"How many orders came in from Method CRM this week?"*
* *"Show me orders that need review"*

***

### `get_order`

Get complete details for a single order.

| Parameter | Type | Required | Description |
| - | - | - | - |
| `orderId` | string | **Yes** | The order ID. |

**Returns:** Full order object with reference, recipient, address, phone (masked), email (masked), notes, delivery instructions, time window, parcel details (weight, volume, count), source, status, assigned route, custom fields.

**Scope required:** `orders:read`

**Example questions:**

* *"Show me order REF-1234"*
* *"What's the status of order 67890?"*

***

## Analytics

### `get_analytics`

Get a dashboard summary for a date range.

| Parameter | Type | Required | Description |
| - | - | - | - |
| `dateFrom` | string | **Yes** | Start of period (ISO date). |
| `dateTo` | string | **Yes** | End of period (ISO date). |

**Returns:** Summary metrics: total routes, total stops, completion rate, on-time rate, average stops per route, total distance, total driving time, failed stop count, top failure reasons.

**Scope required:** `analytics:read`

**Example questions:**

* *"Give me this week's summary"*
* *"What was our completion rate in October?"*
* *"How many stops did we deliver this month?"*

***

### `compare_periods`

Compare two date ranges side by side.

| Parameter | Type | Required | Description |
| - | - | - | - |
| `period1From` | string | **Yes** | Start of first period. |
| `period1To` | string | **Yes** | End of first period. |
| `period2From` | string | **Yes** | Start of second period. |
| `period2To` | string | **Yes** | End of second period. |

**Returns:** Both periods' metrics (same as `get_analytics`) plus calculated deltas: absolute difference and percentage change for each metric.

**Scope required:** `analytics:read`

**Example questions:**

* *"Compare this week to last week"*
* *"How did October compare to September?"*
* *"Are we improving month over month?"*

***

## Depots

### `list_depots`

List all depots in your organization.

| Parameter | Type | Required | Description |
| - | - | - | - |
| — | — | — | No parameters. Returns all depots. |

**Returns:** Array of depots with id, name, address, coordinates, shift hours, break schedule, return-to-depot setting.

**Scope required:** `depots:read`

**Example questions:**

* *"Where are our depots?"*
* *"List all depot locations"*

***

### `get_depot`

Get details for a single depot.

| Parameter | Type | Required | Description |
| - | - | - | - |
| `depotId` | string | **Yes** | The depot ID. |

**Returns:** Full depot object with name, address, coordinates, shift hours, break schedule, return-to-depot setting, assigned drivers count.

**Scope required:** `depots:read`

**Example questions:**

* *"Show me the Main Warehouse depot details"*
* *"What are the shift hours for the East depot?"*

***

## Tool discovery

When an AI assistant connects to the MCP server, it automatically discovers all tools the API key has access to. Tools outside the key's scopes are hidden — the assistant never sees them.

If you connect with a **Read-only** key (all scopes), all 14 tools are available. With a custom-scoped key, only tools matching the granted scopes appear.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.