# Cedar AI MCP

> Cedar AI manages your entire rail logistics operation through conversation. This MCP connects directly to your railway management account, letting you track car movements, check waybill data, and manage work orders just by talking to your agent. Need to know where a train is? Want to update a car's status? You get the answer instantly without logging into five different dashboards.

## Overview
- **Category:** erp-operations
- **Price:** Free
- **Tags:** railway-management, logistics-optimization, freight-tracking, terminal-operations, asset-management

## Description

Coordinating rail operations used to mean juggling multiple screens: checking inventory in one tab, looking up shipping details in another, and then emailing a separate request just to change a work order status. Now, you can handle it all through natural conversation. You simply ask your agent what you need—like 'What cars are waiting at Track 3?' or 'Show me the next steps for waybill WB-88231.' The system pulls that data right from Cedar AI and gives you a clear answer. Whether you're using Claude, Cursor, or any other MCP-compatible client, your agent handles the complexity in the background. Connecting to this service via Vinkius means you get immediate access to all of these core functions without needing complex middleware. You manage everything from logging train arrivals to updating asset conditions—all while staying in your familiar chat interface.

## Tools

### arrive_train
Logs when an entire train enters the terminal facility.

### depart_train
Logs when a train leaves the terminal facility.

### get_railcar_details
Pulls specific metadata and status for one railcar you name.

### get_waybill_details
Retrieves the full shipment details, including origin and destination, for a specific waybill number.

### get_work_order_details
Shows all information related to one work order ID, including tasks and history.

### list_inventory
Presents a full list of every railcar currently registered in the yard.

### list_waybills
Lists all available waybill numbers for review.

### list_work_orders
Displays a list of active and completed work orders.

### pickup_cars
Records the removal of cars from their current location in the yard.

### setout_cars
Logs the placement of a group of cars into a specific track or customer spot.

### update_railcar_status
Changes the official condition tag (like 'Bad Order' or 'Loaded') for a railcar unit.

### update_work_order
Modifies the details or status of an existing work order.

## Prompt Examples

**Prompt:** 
```
List all railcars currently in the main yard inventory.
```

**Response:** 
```
I've retrieved the railcar inventory. You have 15 cars in the main yard including: TBOX 12345 (Loaded), BNSF 98765 (Empty), and GATX 5521 (Bad Order). Would you like detailed metadata for any of them?
```

**Prompt:** 
```
Record a setout of cars 'TBOX 101, TBOX 102' at 'Customer Track 4'.
```

**Response:** 
```
Placement recorded! I've logged the setout for railcars TBOX 101 and TBOX 102 at Customer Track 4. The inventory status has been updated successfully in Cedar AI.
```

**Prompt:** 
```
Show me the details for waybill 'WB-88231'.
```

**Response:** 
```
Fetching waybill details... WB-88231 is an active shipment for 'Lumber' from Portland to Houston via CONSIST-102. It contains 3 flatcars. Would you like to see the movement history?
```

## Capabilities

### Get Yard Inventory Status
List every railcar currently on site and pull up detailed information for any specific unit.

### Log Rail Movements
Record when cars are placed (setout) or removed (pickup) from a specific yard location or track.

### Review Shipping Documents
List and check the details of waybills to understand shipment routes, commodities, and instructions.

### Manage Work Order Lifecycle
View and update work orders, tracking tasks associated with a specific movement instruction.

### Track Train Arrivals and Departures
Record when an entire train enters or leaves the facility to keep your overall system count accurate.

## Use Cases

### The Yard Inventory Check
A manager needs to know how many empty cars are available for loading. Instead of running a report and cross-referencing sheets, they prompt their agent: 'List all railcars and filter by Empty.' The agent runs `list_inventory` and gives the precise count in seconds.

### Completing a Shipment
A coordinator finishes loading cars for a customer. They tell the agent to execute `setout_cars`, specifying the car numbers and track location. The system logs the placement, updating both the inventory records and associated work orders.

### Handling an Exception
A loaded railcar arrives but has damage. Instead of going to a tablet terminal, the ops staff tells their agent: 'Update status for BNSF 98765 to Bad Order.' The system runs `update_railcar_status` immediately.

### Investigating Shipment Issues
A team member finds a discrepancy in paperwork. They ask the agent to review waybill WB-231 and then follow up with 'Show me the car details for TBOX 456.' The agent runs `get_waybill_details` and then `get_railcar_details` sequentially.

## Benefits

- Instead of opening the inventory module and manually searching, you just ask your agent to `list_inventory` for everything. You get a real-time snapshot immediately.
- When cars move, don't rely on manual logging. Just tell your agent to execute `setout_cars` or `pickup_cars`, and it updates the yard status automatically.
- Need context on a shipment? Don't guess. Use `get_waybill_details` to pull up everything about that waybill, including its full route history.
- Managing work orders is easier than clicking through forms. Simply ask your agent to view details with `get_work_order_details`, and you know exactly what needs doing next.
- Keep your physical count matching the books. Use `arrive_train` or `depart_train` whenever a train crosses your yard limits, guaranteeing system accuracy.

## How It Works

The bottom line is, your agent translates complex rail commands into simple chat requests.

1. First, subscribe to this MCP and enter your Cedar AI API Key in the Vinkius platform.
2. Your agent connects using that key. You then tell it what you need—for example, 'List all cars at the main yard.'
3. The system executes the necessary tool calls and returns a plain language summary of the data (e.g., 'You have 15 units: X is loaded, Y is empty').

## Frequently Asked Questions

**How do I check a car's status with get_railcar_details?**
You give the agent the railcar number. It pulls all metadata for that specific unit, including its current condition and location history. This is useful if you only know the car ID but not where it is.

**Can I use list_inventory to see everything?**
Yes, `list_inventory` gives you a full roster of every railcar currently in your yard. You can then ask follow-up questions about specific units found in that list.

**Does setout_cars update the work orders?**
Yes, logging the placement of cars with `setout_cars` updates both the physical inventory record and helps keep associated work order tasks synchronized with the actual movement.

**What is the difference between list_waybills and get_waybill_details?**
`list_waybills` just gives you a rundown of all waybill numbers available. You must use `get_waybill_details` to pull up the actual content, like shipping routes or commodities.

**What credentials do I need before running `list_inventory`?**
You must provide a valid Cedar AI API key. This MCP authenticates using that key to connect to your specific railway management account. Don't worry about refreshing the key; Vinkius handles secure storage and passing it to the tool.

**What happens if I run `get_railcar_details` for a non-existent railcar ID?**
The system returns a specific error message indicating that no record was found. It won't crash your agent; it just tells you the identifier is invalid, allowing your workflow to continue or flag the issue.

**How does `arrive_train` handle logging a full train arrival?**
It logs the entire event as a single transaction. You supply the group of cars and the location, and it records the synchronized time stamp for every car in that consist.

**What fields must I provide when using `update_work_order`?**
You need the unique work order ID, along with the specific field you want to change (e.g., status or assigned task). You can also include a comment detailing the update reason.

**Can I record a railcar movement via AI?**
Yes! Use the `setout_cars` tool to record placement or `pickup_cars` for removal. Provide the location name and a list of railcar IDs to log the movement instantly.

**How do I see the latest waybills for my shipments?**
Run the `list_waybills` query. The agent will retrieve a history of active and completed shipping instructions, including route details and commodity info.

**Is it possible to check the status of a specific work order via AI?**
Absolutely. Use the `get_work_order_details` tool with the Work Order ID to retrieve the current status, assigned tasks, and completion progress.