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

# Vehicle Tools

> MCP tools for querying fleet vehicles and their emissions (Scope 1)

# Vehicle Tools

Query your vehicle fleet — Scope 1 mobile combustion data. Each vehicle record includes type, fuel, ownership, license plate, and CO₂e emissions.

## `list_vehicles`

List vehicles in the fleet with fuel type, ownership, license plate, and CO₂e.

**Parameters:**

| Parameter          | Type    | Required | Default     | Description                               |
| ------------------ | ------- | -------- | ----------- | ----------------------------------------- |
| `organization_id`  | string  | No       | default org | Organization UUID                         |
| `status`           | string  | No       | —           | Status filter: `active`, `deleted`        |
| `ownership`        | string  | No       | —           | Ownership filter: `owned`, `leased`       |
| `search`           | string  | No       | —           | Search by name or license plate           |
| `include_children` | boolean | No       | false       | Include vehicles from child organizations |
| `page`             | integer | No       | 1           | Page number                               |
| `size`             | integer | No       | 50          | Results per page                          |

**Example response:**

```json theme={"theme":{"light":"github-light","dark":"github-dark"}}
{
  "items": [
    {
      "id": "55f8f4a8-...",
      "license_plate": "ABC-1234",
      "type": "passenger",
      "ownership": "owned",
      "vehicle_fuel": "gas_oil",
      "country": "ES",
      "status": "active",
      "co2e": 1378.12
    }
  ],
  "total": 69,
  "page": 1,
  "size": 50,
  "pages": 2
}
```

**Key response fields:**

| Field           | Description                            |
| --------------- | -------------------------------------- |
| `type`          | Vehicle type: `passenger` or `freight` |
| `ownership`     | `owned` or `leased`                    |
| `vehicle_fuel`  | Fuel type (see below)                  |
| `co2e`          | Calculated CO₂e emissions in kg        |
| `license_plate` | Vehicle registration plate             |

<Accordion title="Vehicle fuel types">
  | Value                      | Description                    |
  | -------------------------- | ------------------------------ |
  | `gas_oil`                  | Diesel                         |
  | `gasoline`                 | Petrol/gasoline                |
  | `battery_electric_vehicle` | Battery electric (BEV)         |
  | `plug_in_hybrid_gasoline`  | Plug-in hybrid (PHEV gasoline) |
  | `plug_in_hybrid_gas_oil`   | Plug-in hybrid (PHEV diesel)   |
  | `natural_gas`              | Natural gas (CNG/LNG)          |
  | `lpg`                      | Liquefied petroleum gas        |
</Accordion>

**Example prompts:**

```
"Show me our vehicle fleet"
"Which vehicles use diesel?"
"List leased vehicles"
"Search for vehicle with plate ABC-123"
"Show all vehicles including subsidiaries"
```

## `create_vehicle`

Create a new vehicle in the fleet. Vehicles track Scope 1 direct emissions from fuel combustion.

**Parameters:**

| Parameter                   | Type    | Required | Description                                                      |
| --------------------------- | ------- | -------- | ---------------------------------------------------------------- |
| `type`                      | string  | Yes      | Vehicle usage type: `passenger` or `freight`                     |
| `ownership`                 | string  | Yes      | Ownership type: `owned` or `rented`                              |
| `license_plate`             | string  | Yes      | Registration/license plate number                                |
| `unknown_vehicle_id`        | string  | Yes      | UUID of the vehicle type reference                               |
| `country`                   | string  | Yes      | ISO country code (e.g. `ES`, `FR`, `DE`)                         |
| `name`                      | string  | No       | Custom name or alias                                             |
| `registration_year`         | integer | No       | Year of registration (YYYY)                                      |
| `market_segment`            | string  | No       | Market segment (e.g. `mini`, `executive`, `sports`)              |
| `size`                      | string  | No       | Size category: `small_car`, `medium`, `large_car`, `average_car` |
| `vehicle_fuel_id`           | string  | No       | UUID of the fuel type                                            |
| `custom_emission_factor_id` | string  | No       | UUID of a custom emission factor                                 |
| `organization_id`           | string  | No       | Organization UUID (uses default if not set)                      |

<Note>
  Either `vehicle_fuel_id` or `custom_emission_factor_id` should be provided for emission calculations. Use `list_vehicles` to see existing vehicles and their type references.
</Note>

**Example prompts:**

```
"Create a new diesel passenger car with plate ABC-1234"
"Add a freight vehicle for our delivery fleet in Spain"
```

## `update_vehicle`

Update an existing vehicle. Only provided fields are changed (partial update).

**Parameters:**

| Parameter                   | Type    | Required | Description                                  |
| --------------------------- | ------- | -------- | -------------------------------------------- |
| `vehicle_id`                | string  | Yes      | UUID of the vehicle to update                |
| `type`                      | string  | No       | Vehicle usage type: `passenger` or `freight` |
| `ownership`                 | string  | No       | Ownership type: `owned` or `rented`          |
| `license_plate`             | string  | No       | New license plate                            |
| `country`                   | string  | No       | ISO country code                             |
| `status`                    | string  | No       | Status: `active`, `archived`, or `error`     |
| `name`                      | string  | No       | New name or alias                            |
| `vehicle_fuel_id`           | string  | No       | UUID of the fuel type                        |
| `custom_emission_factor_id` | string  | No       | UUID of a custom emission factor             |
| `registration_year`         | integer | No       | Year of registration                         |
| `market_segment`            | string  | No       | Market segment                               |
| `size`                      | string  | No       | Size category                                |
| `unknown_vehicle_id`        | string  | No       | UUID of the vehicle type reference           |
| `organization_id`           | string  | No       | Organization UUID (uses default if not set)  |

**Example prompts:**

```
"Archive vehicle ABC-1234"
"Change the fuel type of vehicle 55f8f4a8-..."
"Rename our delivery truck to 'Madrid Route'"
```

## Workflow

1. **List vehicles** — `list_vehicles` to explore the fleet by fuel type, ownership, or search
2. **Create vehicles** — `create_vehicle` to add new vehicles to the fleet
3. **Update vehicles** — `update_vehicle` to change fuel, rename, or archive vehicles
4. **View Scope 1 emissions** — `get_greenhouse_gas_emissions` with `category=transport` and `scope=1` for fleet emission totals
5. **Compare by vehicle** — `get_greenhouse_gas_emissions` with `vehicle_id` to see emissions for a specific vehicle

## Related

<CardGroup cols={2}>
  <Card title="API: List Vehicles" icon="code" href="/api-reference/vehicles/list">
    REST API equivalent with additional filters
  </Card>

  <Card title="Emissions" icon="smog" href="/mcp/emissions">
    Scope 1 fleet emissions by vehicle
  </Card>

  <Card title="CLI" icon="terminal" href="/cli/assets">
    Manage vehicles from the command line
  </Card>
</CardGroup>
