# Routific MCP

> Routific MCP Server solves complex vehicle routing problems and manages entire dispatch operations through natural language chat. It lets your AI client plan multi-stop routes, audit pending delivery jobs across the platform, and push finalized manifests directly to driver mobile apps.

## Overview
- **Category:** productivity
- **Price:** Free
- **Tags:** route-optimization, last-mile-delivery, fleet-dispatch, logistics-management, delivery-tracking, api-integration

## Description

You're connecting your AI client straight up to **Routific**. This isn't some gimmick; it turns your chat interface into a full-blown dispatch manager. You can build multi-stop routes, audit every outstanding order in the system, and push finalized manifests right into the driver’s mobile app—all without ever leaving the chat window.

When you need to figure out where things are going, **Routific** handles the complex routing math for you. If you've got a small cluster of stops that just need optimizing, you can run it immediately with `solve_standalone_vrp`, which calculates an optimized route right away. But what if you’re dealing with dozens of stops across multiple depots? You launch that massive job using `solve_async_vrp_long`. This starts the Vehicle Routing Problem calculation in the background, giving you a unique ID; you gotta use that ID to check its status later by calling `poll_async_solution` until it's done. Before you even solve anything, you can generate an initial plan for the whole system using `create_platform_route`. 

To manage the actual deliveries—the jobs themselves—you've got total control. You start a new delivery order in the platform by calling `create_saas_job`, where you feed it structured JSON with all the necessary order details. If an existing job changes, don't sweat it; you can modify or change details for any active record using `update_saas_job`. Need to see what's pending? You run `list_platform_jobs` and get a comprehensive list of every outstanding delivery job on file. And if a job gets canceled before it even starts, you hit the kill switch with `cancel_saas_job`, which deletes and cancels that delivery job from the platform—just be warned, that action is irreversible.

Once the route is solved and the jobs are in place, you need to know the timeline. You retrieve a detailed, stop-by-stop schedule including estimated arrival times for any completed or planned run using `get_route_timeline`. When everything's locked down and the plan is set, you send that final manifest directly into the targeted driver’s mobile application with one command: `publish_route_to_driver`.

It's a simple flow. Your agent handles the complexity. You tell it what needs to happen—whether it's creating the job via structured data (`create_saas_job`), solving the logistics puzzle (`solve_standalone_vrp`), checking on its progress (`poll_async_solution`), or pushing the final directions out (`publish_route_to_driver`). You don't write complicated API calls; you just chat, and your agent does the heavy lifting.

## Tools

### cancel_saas_job
Deletes and cancels a delivery job from the platform. This action cannot be undone.

### create_platform_route
Generates a new, initial route plan within the Routific system.

### create_saas_job
Creates an entirely new delivery job in the platform by providing structured order details (JSON).

### get_route_timeline
Retrieves a detailed, stop-by-stop timeline for any given route.

### list_platform_jobs
Lists all outstanding delivery jobs currently recorded in the Routific platform.

### poll_async_solution
Checks and retrieves the current status of a large, background Vehicle Routing Problem (VRP) calculation by its job ID.

### publish_route_to_driver
Sends the final route plan directly to the targeted driver's mobile application for immediate action.

### solve_async_vrp_long
Starts a massive Vehicle Routing Problem calculation in the background, returning an ID you must poll later.

### solve_standalone_vrp
Calculates an optimized route for a small set of visits right away without needing to run it on the whole platform.

### update_saas_job
Modifies or changes details for an existing delivery job that is already in the system.

## Prompt Examples

**Prompt:** 
```
List all current delivery jobs pending in the platform right now.
```

**Response:** 
```
I requested the job details leveraging the `list_platform_jobs` command natively. Your portal correctly specifies 25 outstanding order elements natively. Let me know if you would like to begin inserting these naturally via `solve_async_vrp_long` to assemble your fleet dispatch timeline operations safely.
```

**Prompt:** 
```
Generate a standalone route resolving 4 pending visits.
```

**Response:** 
```
I've successfully generated a standalone route for the 4 pending visits using the `solve_standalone_vrp` solver. The total estimated driving time is 45 minutes, covering 12 miles. Would you like me to publish this route directly to the assigned driver?
```

**Prompt:** 
```
Publish the finalized route to the designated driver's mobile app.
```

**Response:** 
```
The finalized route has been successfully pushed to the designated driver's Routific mobile app. They should receive a notification and see the updated manifest shortly.
```

## Capabilities

### Plan and Solve Routes
Calculates optimized driving routes for specific addresses or large groups of visits.

### Manage Delivery Jobs
Creates, updates, lists, or cancels the status of delivery orders within the platform.

### Review Timelines and ETAs
Retrieves a detailed, stop-by-stop schedule including estimated arrival times for any completed route.

### Dispatch Routes to Drivers
Sends the final, calculated manifest directly into a designated driver's mobile application.

## Use Cases

### The last-minute detour
A dispatcher notices an order needs to be rerouted due to traffic. Instead of manually editing the route on a dashboard, they ask their agent to run `update_saas_job` first, then use `get_route_timeline` to check the new ETAs before telling the driver with `publish_route_to_driver`. The job is corrected in three steps.

### End-of-day audit
The operations lead needs to know exactly what deliveries were left undone overnight. They run `list_platform_jobs` to get a full inventory, identify the missing pieces, and then use `create_saas_job` to inject them back into the system for tomorrow.

### Solving a large batch problem
The regional manager has 50 new stops across three depots. They can't solve it all at once. They use `solve_async_vrp_long` to submit the big job, and then repeatedly call `poll_async_solution` until the result is ready for final review.

### Testing a quick fix
A driver reports an issue with 3 stops on their current manifest. The agent can't wait for the full system update, so it runs `solve_standalone_vrp` immediately to generate a temporary, optimized path that can be sent right away.

## Benefits

- Real-time job visibility. Use `list_platform_jobs` to see every outstanding order in one command, eliminating the need to jump between different tracking dashboards.
- Instant small-scale planning. If you just need a quick route for four stops, use `solve_standalone_vrp`. You get an immediate result without submitting it to the main platform queue.
- Massive capacity solving. For multi-depot or week-long routes, run background calculations with `solve_async_vrp_long` and monitor progress using `poll_async_solution`.
- Full dispatch control. Once a route is calculated, use `publish_route_to_driver` to push the final manifest directly into the driver's hands instantly.
- Dynamic job lifecycle management. You can create new jobs with constraints (`create_saas_job`) or fix errors by running `update_saas_job`, all without logging into a web GUI.

## How It Works

The bottom line is: You talk to your agent, it talks to Routific, and you get an actionable delivery plan back without touching any web forms.

1. Install the Routific operations module into your active MCP network architecture.
2. Sign in to your Routific backend console using administrator permissions and get an API Bearer Token.
3. Paste the generated `Routific API Token` into the secure variables, then issue a plain text command (e.g., 'Solve route for 5 visits and publish it').

## Frequently Asked Questions

**How do I list all pending jobs using list_platform_jobs?**
You simply ask your agent to run `list_platform_jobs`. This tool returns an immediate snapshot of every active delivery job ID and its current status in the Routific platform.

**What is the difference between solve_standalone_vrp and solve_async_vrp_long?**
`solve_standalone_vrp` solves a small, immediate route synchronously (right now). `solve_async_vrp_long` handles massive routing problems that take time; it kicks off the job in the background and returns an ID you must poll.

**Can I send a finished route to the driver using publish_route_to_driver?**
Yes. After calculating the optimal path, you use `publish_route_to_driver` to push the final manifest directly into the designated mobile app for the driver.

**How do I update an old job after it's been created?**
Use the `update_saas_job` tool. You need to provide the existing job ID and a JSON object containing only the fields you want to change.

**When using `create_saas_job`, what specific fields must I include to ensure the job respects order constraints?**
You must provide a JSON object that explicitly lists all required details, including any priority flags and physical constraints. If critical information is missing, the API call fails validation immediately.

**After running `solve_async_vrp_long`, how do I check if the large routing job has finished using `poll_async_solution`?**
You repeatedly query the status endpoint. The response will cycle through states (like PENDING or PROCESSING) until it returns a final result object or an explicit error code.

**Using `get_route_timeline`, what exact metrics do I get for every stop on the completed route?**
The tool provides sequential, detailed data points. This includes the estimated time of arrival (ETA), necessary service time at the location, and the distance to the next point.

**What happens if my bearer token is invalid when I try to run `create_platform_route`?**
The system immediately throws an authorization error. You'll need to verify your API key in the Routific backend console and ensure it has owner-level permissions.

**Can the AI push routes dynamically to drivers' smartphones automatically?**
Yes! Activating the `publish_route_to_driver` function dynamically interacts with the saas infrastructure, natively pushing an authorized manifest to the delivery team's active Routific phone apps flawlessly.

**Does `solve_standalone_vrp` handle extremely large thousands of stops simultaneously efficiently?**
For very large batches, use `solve_async_vrp_long` instead. It processes the request asynchronously and you can poll for results with `poll_async_solution`. The standalone solver is best for smaller, real-time requests.

**Can the integration update a delivery job after it has been created?**
Yes. Use `update_saas_job` to modify constraints, priorities, or delivery details on an existing job without having to delete and recreate it.