> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.nvidia.com/nemo/labs-voice-agent/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.nvidia.com/nemo/labs-voice-agent/_mcp/server.

# nemo_voice_agent.evaluation.tools.eva_airline_tools

## Module Contents

### Classes

| Name                                                                                                            | Description                                                                         |
| --------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- |
| [`AddBaggageAllowanceTool`](#nemo_voice_agent-evaluation-tools-eva_airline_tools-AddBaggageAllowanceTool)       | Add checked baggage (0-5 bags) to a flight segment.                                 |
| [`AddMealRequestTool`](#nemo_voice_agent-evaluation-tools-eva_airline_tools-AddMealRequestTool)                 | Add or update a special meal request for a passenger on a flight segment.           |
| [`AddToStandbyTool`](#nemo_voice_agent-evaluation-tools-eva_airline_tools-AddToStandbyTool)                     | Add passenger(s) to standby list for a flight.                                      |
| [`AssignSeatTool`](#nemo_voice_agent-evaluation-tools-eva_airline_tools-AssignSeatTool)                         | Assign a seat (window/aisle/middle/no\_preference) on a specific flight segment.    |
| [`CancelReservationTool`](#nemo_voice_agent-evaluation-tools-eva_airline_tools-CancelReservationTool)           | Cancel a flight booking (single journey within a reservation).                      |
| [`GetDisruptionInfoTool`](#nemo_voice_agent-evaluation-tools-eva_airline_tools-GetDisruptionInfoTool)           | Get IRROPS disruption details (cause, fee waiver, refund eligibility).              |
| [`GetFlightStatusTool`](#nemo_voice_agent-evaluation-tools-eva_airline_tools-GetFlightStatusTool)               | Get current status of a specific flight (delays, cancellations, gate).              |
| [`GetReservationTool`](#nemo_voice_agent-evaluation-tools-eva_airline_tools-GetReservationTool)                 | Retrieve flight reservation using confirmation number and passenger last name.      |
| [`IssueHotelVoucherTool`](#nemo_voice_agent-evaluation-tools-eva_airline_tools-IssueHotelVoucherTool)           | Issue a hotel voucher (1-3 nights) for IRROPS overnight situations.                 |
| [`IssueMealVoucherTool`](#nemo_voice_agent-evaluation-tools-eva_airline_tools-IssueMealVoucherTool)             | Issue a meal voucher for delays/cancellations that qualify per policy.              |
| [`IssueTravelCreditTool`](#nemo_voice_agent-evaluation-tools-eva_airline_tools-IssueTravelCreditTool)           | Issue a travel credit (future-flight voucher) to a passenger.                       |
| [`ProcessRefundTool`](#nemo_voice_agent-evaluation-tools-eva_airline_tools-ProcessRefundTool)                   | Process a refund. Call once per refund type (fare and ancillary fees are separate). |
| [`RebookFlightTool`](#nemo_voice_agent-evaluation-tools-eva_airline_tools-RebookFlightTool)                     | Rebook passenger(s) to a new flight (voluntary, IRROPS, partial).                   |
| [`SearchRebookingOptionsTool`](#nemo_voice_agent-evaluation-tools-eva_airline_tools-SearchRebookingOptionsTool) | Search available flights (origin/destination/date) filtered by seat availability.   |
| [`TransferToAgentTool`](#nemo_voice_agent-evaluation-tools-eva_airline_tools-TransferToAgentTool)               | Transfer the call to a live human agent (recordable terminal action).               |
| [`WriteAirlineTool`](#nemo_voice_agent-evaluation-tools-eva_airline_tools-WriteAirlineTool)                     | Eva-airline subclass that binds `ACTION_TYPES` to `AIRLINE_ACTION_TYPES`.           |

### Functions

| Name                                                                                                                | Description                                                                      |
| ------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- |
| [`_carried_ancillaries`](#nemo_voice_agent-evaluation-tools-eva_airline_tools-_carried_ancillaries)                 | Return the ancillaries a rebooked segment inherits from the booking it replaces. |
| [`_db_not_initialized`](#nemo_voice_agent-evaluation-tools-eva_airline_tools-_db_not_initialized)                   | Returned when shared\_state\['db'] is missing — fixture didn't load.             |
| [`_find_booking_journey`](#nemo_voice_agent-evaluation-tools-eva_airline_tools-_find_booking_journey)               | Find a booking journey entry within a reservation.                               |
| [`_find_booking_segment`](#nemo_voice_agent-evaluation-tools-eva_airline_tools-_find_booking_segment)               | Find flight segment(s) within a booking journey.                                 |
| [`_get_booking_total_fare`](#nemo_voice_agent-evaluation-tools-eva_airline_tools-_get_booking_total_fare)           | Return total fare for a booking journey.                                         |
| [`_get_journey_available_seats`](#nemo_voice_agent-evaluation-tools-eva_airline_tools-_get_journey_available_seats) | Compute effective available seats for a journey.                                 |
| [`_get_journey_fares`](#nemo_voice_agent-evaluation-tools-eva_airline_tools-_get_journey_fares)                     | Return journey-level fares dict.                                                 |
| [`_journey_not_found`](#nemo_voice_agent-evaluation-tools-eva_airline_tools-_journey_not_found)                     | -                                                                                |
| [`_lookup_reservation`](#nemo_voice_agent-evaluation-tools-eva_airline_tools-_lookup_reservation)                   | Find a reservation by confirmation number.                                       |
| [`_reservation_not_found`](#nemo_voice_agent-evaluation-tools-eva_airline_tools-_reservation_not_found)             | -                                                                                |

### Data

[`AIRLINE_ACTION_TYPES`](#nemo_voice_agent-evaluation-tools-eva_airline_tools-AIRLINE_ACTION_TYPES)

### API

```python
class nemo_voice_agent.evaluation.tools.eva_airline_tools.AddBaggageAllowanceTool(
    shared_state: typing.Optional[dict] = None,
    description: typing.Optional[str] = None
)
```

**Bases:** [WriteAirlineTool](#nemo_voice_agent-evaluation-tools-eva_airline_tools-WriteAirlineTool)

Add checked baggage (0-5 bags) to a flight segment.

**`DESCRIPTION`**

---

**`properties`**

---

**`required_properties`**

---

**`state`**

---

```python
nemo_voice_agent.evaluation.tools.eva_airline_tools.AddBaggageAllowanceTool._execute(
    kwargs: typing.Any = {}
) -> typing.Dict[str, typing.Any]
```

async

```python
class nemo_voice_agent.evaluation.tools.eva_airline_tools.AddMealRequestTool(
    shared_state: typing.Optional[dict] = None,
    description: typing.Optional[str] = None
)
```

**Bases:** [WriteAirlineTool](#nemo_voice_agent-evaluation-tools-eva_airline_tools-WriteAirlineTool)

Add or update a special meal request for a passenger on a flight segment.

**`DESCRIPTION`**

---

**`properties`**

---

**`required_properties`**

---

**`state`**

---

```python
nemo_voice_agent.evaluation.tools.eva_airline_tools.AddMealRequestTool._execute(
    kwargs: typing.Any = {}
) -> typing.Dict[str, typing.Any]
```

async

```python
class nemo_voice_agent.evaluation.tools.eva_airline_tools.AddToStandbyTool(
    shared_state: typing.Optional[dict] = None,
    description: typing.Optional[str] = None
)
```

**Bases:** [WriteAirlineTool](#nemo_voice_agent-evaluation-tools-eva_airline_tools-WriteAirlineTool)

Add passenger(s) to standby list for a flight.

**`DESCRIPTION`**

---

**`properties`**

---

**`required_properties`**

---

**`state`**

---

```python
nemo_voice_agent.evaluation.tools.eva_airline_tools.AddToStandbyTool._execute(
    kwargs: typing.Any = {}
) -> typing.Dict[str, typing.Any]
```

async

```python
class nemo_voice_agent.evaluation.tools.eva_airline_tools.AssignSeatTool(
    shared_state: typing.Optional[dict] = None,
    description: typing.Optional[str] = None
)
```

**Bases:** [WriteAirlineTool](#nemo_voice_agent-evaluation-tools-eva_airline_tools-WriteAirlineTool)

Assign a seat (window/aisle/middle/no\_preference) on a specific flight segment.

**`DESCRIPTION`**

---

**`properties`**

---

**`required_properties`**

---

**`state`**

---

```python
nemo_voice_agent.evaluation.tools.eva_airline_tools.AssignSeatTool._execute(
    kwargs: typing.Any = {}
) -> typing.Dict[str, typing.Any]
```

async

```python
class nemo_voice_agent.evaluation.tools.eva_airline_tools.CancelReservationTool(
    shared_state: typing.Optional[dict] = None,
    description: typing.Optional[str] = None
)
```

**Bases:** [WriteAirlineTool](#nemo_voice_agent-evaluation-tools-eva_airline_tools-WriteAirlineTool)

Cancel a flight booking (single journey within a reservation).

**`DESCRIPTION`**

---

**`properties`**

---

**`required_properties`**

---

**`state`**

---

```python
nemo_voice_agent.evaluation.tools.eva_airline_tools.CancelReservationTool._execute(
    kwargs: typing.Any = {}
) -> typing.Dict[str, typing.Any]
```

async

```python
class nemo_voice_agent.evaluation.tools.eva_airline_tools.GetDisruptionInfoTool(
    shared_state: typing.Optional[dict] = None,
    description: typing.Optional[str] = None
)
```

**Bases:** [StandardSchemaTool](/nemo/labs-voice-agent/nemo-voice-agent/nemo_voice_agent/utils/tool_calling/base#nemo_voice_agent-utils-tool_calling-base-StandardSchemaTool)

Get IRROPS disruption details (cause, fee waiver, refund eligibility).

**`DESCRIPTION`**

---

**`properties`**

---

**`required_properties`**

---

**`state`**

---

```python
nemo_voice_agent.evaluation.tools.eva_airline_tools.GetDisruptionInfoTool._execute(
    kwargs: typing.Any = {}
) -> typing.Dict[str, typing.Any]
```

async

```python
class nemo_voice_agent.evaluation.tools.eva_airline_tools.GetFlightStatusTool(
    shared_state: typing.Optional[dict] = None,
    description: typing.Optional[str] = None
)
```

**Bases:** [StandardSchemaTool](/nemo/labs-voice-agent/nemo-voice-agent/nemo_voice_agent/utils/tool_calling/base#nemo_voice_agent-utils-tool_calling-base-StandardSchemaTool)

Get current status of a specific flight (delays, cancellations, gate).

**`DESCRIPTION`**

---

**`properties`**

---

**`required_properties`**

---

**`state`**

---

```python
nemo_voice_agent.evaluation.tools.eva_airline_tools.GetFlightStatusTool._execute(
    kwargs: typing.Any = {}
) -> typing.Dict[str, typing.Any]
```

async

```python
class nemo_voice_agent.evaluation.tools.eva_airline_tools.GetReservationTool(
    shared_state: typing.Optional[dict] = None,
    description: typing.Optional[str] = None
)
```

**Bases:** [StandardSchemaTool](/nemo/labs-voice-agent/nemo-voice-agent/nemo_voice_agent/utils/tool_calling/base#nemo_voice_agent-utils-tool_calling-base-StandardSchemaTool)

Retrieve flight reservation using confirmation number and passenger last name.

Authentication entry point — typically the first tool called per scenario.

**`DESCRIPTION`**

---

**`properties`**

---

**`required_properties`**

---

**`state`**

---

```python
nemo_voice_agent.evaluation.tools.eva_airline_tools.GetReservationTool._execute(
    kwargs: typing.Any = {}
) -> typing.Dict[str, typing.Any]
```

async

```python
class nemo_voice_agent.evaluation.tools.eva_airline_tools.IssueHotelVoucherTool(
    shared_state: typing.Optional[dict] = None,
    description: typing.Optional[str] = None
)
```

**Bases:** [WriteAirlineTool](#nemo_voice_agent-evaluation-tools-eva_airline_tools-WriteAirlineTool)

Issue a hotel voucher (1-3 nights) for IRROPS overnight situations.

**`DESCRIPTION`**

---

**`properties`**

---

**`required_properties`**

---

**`state`**

---

```python
nemo_voice_agent.evaluation.tools.eva_airline_tools.IssueHotelVoucherTool._execute(
    kwargs: typing.Any = {}
) -> typing.Dict[str, typing.Any]
```

async

```python
class nemo_voice_agent.evaluation.tools.eva_airline_tools.IssueMealVoucherTool(
    shared_state: typing.Optional[dict] = None,
    description: typing.Optional[str] = None
)
```

**Bases:** [WriteAirlineTool](#nemo_voice_agent-evaluation-tools-eva_airline_tools-WriteAirlineTool)

Issue a meal voucher for delays/cancellations that qualify per policy.

**`DESCRIPTION`**

---

**`properties`**

---

**`required_properties`**

---

**`state`**

---

```python
nemo_voice_agent.evaluation.tools.eva_airline_tools.IssueMealVoucherTool._execute(
    kwargs: typing.Any = {}
) -> typing.Dict[str, typing.Any]
```

async

```python
class nemo_voice_agent.evaluation.tools.eva_airline_tools.IssueTravelCreditTool(
    shared_state: typing.Optional[dict] = None,
    description: typing.Optional[str] = None
)
```

**Bases:** [WriteAirlineTool](#nemo_voice_agent-evaluation-tools-eva_airline_tools-WriteAirlineTool)

Issue a travel credit (future-flight voucher) to a passenger.

**`DESCRIPTION`**

---

**`properties`**

---

**`required_properties`**

---

**`state`**

---

```python
nemo_voice_agent.evaluation.tools.eva_airline_tools.IssueTravelCreditTool._execute(
    kwargs: typing.Any = {}
) -> typing.Dict[str, typing.Any]
```

async

```python
class nemo_voice_agent.evaluation.tools.eva_airline_tools.ProcessRefundTool(
    shared_state: typing.Optional[dict] = None,
    description: typing.Optional[str] = None
)
```

**Bases:** [WriteAirlineTool](#nemo_voice_agent-evaluation-tools-eva_airline_tools-WriteAirlineTool)

Process a refund. Call once per refund type (fare and ancillary fees are separate).

**`DESCRIPTION`**

---

**`properties`**

---

**`required_properties`**

---

**`state`**

---

```python
nemo_voice_agent.evaluation.tools.eva_airline_tools.ProcessRefundTool._execute(
    kwargs: typing.Any = {}
) -> typing.Dict[str, typing.Any]
```

async

```python
class nemo_voice_agent.evaluation.tools.eva_airline_tools.RebookFlightTool(
    shared_state: typing.Optional[dict] = None,
    description: typing.Optional[str] = None
)
```

**Bases:** [WriteAirlineTool](#nemo_voice_agent-evaluation-tools-eva_airline_tools-WriteAirlineTool)

Rebook passenger(s) to a new flight (voluntary, IRROPS, partial).

**`DESCRIPTION`**

---

**`properties`**

---

**`required_properties`**

---

**`state`**

---

```python
nemo_voice_agent.evaluation.tools.eva_airline_tools.RebookFlightTool._execute(
    kwargs: typing.Any = {}
) -> typing.Dict[str, typing.Any]
```

async

```python
class nemo_voice_agent.evaluation.tools.eva_airline_tools.SearchRebookingOptionsTool(
    shared_state: typing.Optional[dict] = None,
    description: typing.Optional[str] = None
)
```

**Bases:** [StandardSchemaTool](/nemo/labs-voice-agent/nemo-voice-agent/nemo_voice_agent/utils/tool_calling/base#nemo_voice_agent-utils-tool_calling-base-StandardSchemaTool)

Search available flights (origin/destination/date) filtered by seat availability.

**`DESCRIPTION`**

---

**`properties`**

---

**`required_properties`**

---

**`state`**

---

```python
nemo_voice_agent.evaluation.tools.eva_airline_tools.SearchRebookingOptionsTool._execute(
    kwargs: typing.Any = {}
) -> typing.Dict[str, typing.Any]
```

async

```python
class nemo_voice_agent.evaluation.tools.eva_airline_tools.TransferToAgentTool(
    shared_state: typing.Optional[dict] = None,
    description: typing.Optional[str] = None
)
```

**Bases:** [WriteAirlineTool](#nemo_voice_agent-evaluation-tools-eva_airline_tools-WriteAirlineTool)

Transfer the call to a live human agent (recordable terminal action).

**`DESCRIPTION`**

---

**`properties`**

---

**`required_properties`**

---

**`state`**

---

```python
nemo_voice_agent.evaluation.tools.eva_airline_tools.TransferToAgentTool._after_result(
    params: pipecat.services.llm_service.FunctionCallParams
) -> None
```

async

Emit `&lt;exit&gt;` once the successful transfer result has been delivered.

Ordering matters: pipecat must commit the tool-call record before the
bridge tears the session down, which is exactly what this post-delivery
hook guarantees. Only fires when `_execute` reached its success path —
an error response leaves the conversation running.

```python
nemo_voice_agent.evaluation.tools.eva_airline_tools.TransferToAgentTool._execute(
    kwargs: typing.Any = {}
) -> typing.Dict[str, typing.Any]
```

async

```python
class nemo_voice_agent.evaluation.tools.eva_airline_tools.WriteAirlineTool()
```

**Bases:** [WriteScenarioTool](./_write_tool_base.mdx#nemo_voice_agent-evaluation-tools-_write_tool_base-WriteScenarioTool)

Eva-airline subclass that binds `ACTION_TYPES` to `AIRLINE_ACTION_TYPES`.

Inherits `_record_action` (validates `action_type` against ACTION\_TYPES,
appends to `shared_state["actions"]`) and `_next_call_index` (per-scenario
monotonic counter for tools that mint unique IDs) from the shared base.

Read-only tools subclass `StandardSchemaTool` directly — only writes record.

```python
nemo_voice_agent.evaluation.tools.eva_airline_tools._carried_ancillaries(
    old_segments: typing.List[dict],
    replaced_segment: typing.Optional[dict],
    index: int
) -> dict
```

Return the ancillaries a rebooked segment inherits from the booking it replaces.

Rule of thumb for which fields carry: **carry what the dataset gives no availability
model for, re-select what it does.** `seat` is re-selected — segments carry
`available_seat_types` and `AssignSeatTool` can fail with `no_seats_available`, so a
seat is meaningful only against a specific aircraft. `bags_checked` and `meal_request`
have no such model: they are passenger-level entitlements that survive a change of flight
number, so they carry.

`bags_checked` — this is what eva's `expected_scenario_db` encodes for all 25 rebooking
scenarios in the packaged dataset, including `7.2.1` where the rebook *downgrades*
main\_cabin → basic\_economy and the gold still keeps `bags_checked: 1`. The agent policy
says nothing about baggage at all, so with the previous hard-coded `0` the gold for 17 of
the 50 scenarios was reachable only by also calling `AddBaggageAllowanceTool` with the
original count — a write nothing in those scenarios asks for, and which no model made in
150 recorded runs.

`meal_request` — every eva fixture leaves this `None` (and every passenger's
`meal_preference` is `"none"`), so carrying it is a no-op against the packaged data and
changes no hash. It is here so that a dietary request is not silently dropped across a
rebook if a future fixture ever sets one — the same defect class as the baggage one, caught
before it can bite.

Both are defaults, not locks: `AddBaggageAllowanceTool` and `AddMealRequestTool` still
override afterwards, which is how a caller who actually wants a change gets one.

Deliberate divergence from upstream: ServiceNow/eva's `rebook_flight` hard-codes
`"bags_checked": 0` and `"meal_request": None` at `0.1.3` (the version ported here)
and still does at `2.1.0`, while its gold expects the carried-over bag count. Revisit if
upstream fixes it.

Source segment, in order of preference:

1. `replaced_segment` — set only for a partial (single-segment) rebook, where every
   new segment descends from that one leg.
2. `old_segments[index]` — positional match for a whole-journey rebook.
3. `old_segments[0]` — fallback when the new journey has more legs than the old one
   (e.g. a nonstop replaced by a one-stop); these ancillaries are per-booking in this
   dataset, so all segments of a booking always carry the same values.

```python
nemo_voice_agent.evaluation.tools.eva_airline_tools._db_not_initialized() -> dict
```

Returned when shared\_state\['db'] is missing — fixture didn't load.

```python
nemo_voice_agent.evaluation.tools.eva_airline_tools._find_booking_journey(
    reservation: dict,
    journey_id: str
) -> typing.Optional[dict]
```

Find a booking journey entry within a reservation.

When multiple bookings share the same journey\_id (e.g. after a partial rebook
creates a 'kept' booking alongside the cancelled original), the first
non-cancelled booking is returned in preference to a cancelled one.

```python
nemo_voice_agent.evaluation.tools.eva_airline_tools._find_booking_segment(
    booking: dict,
    journey_id: str,
    flight_number: str = ''
) -> tuple[typing.List[dict], typing.Optional[dict]]
```

Find flight segment(s) within a booking journey.

If flight\_number is provided, returns only that segment.
If omitted and booking has one segment, returns that segment.
If omitted and booking has multiple segments, returns an error dict.

**Returns:** `List[dict]`

(targets, error) — targets is a list of matching segments,

```python
nemo_voice_agent.evaluation.tools.eva_airline_tools._get_booking_total_fare(
    booking: dict
) -> float
```

Return total fare for a booking journey.

Uses journey-level fare\_paid if present, otherwise sums segment-level fare\_paid.

```python
nemo_voice_agent.evaluation.tools.eva_airline_tools._get_journey_available_seats(
    journey: dict
) -> dict
```

Compute effective available seats for a journey.

For multi-segment journeys, the constraining factor is the segment
with the fewest seats in each fare class (min across segments).

```python
nemo_voice_agent.evaluation.tools.eva_airline_tools._get_journey_fares(
    journey: dict
) -> dict
```

Return journey-level fares dict.

Fares are stored at the journey level as the total price for all segments combined.

```python
nemo_voice_agent.evaluation.tools.eva_airline_tools._journey_not_found(
    journey_id: str
) -> dict
```

```python
nemo_voice_agent.evaluation.tools.eva_airline_tools._lookup_reservation(
    db: dict,
    confirmation_number: str
) -> typing.Optional[dict]
```

Find a reservation by confirmation number.

```python
nemo_voice_agent.evaluation.tools.eva_airline_tools._reservation_not_found(
    confirmation_number: str
) -> dict
```

```python
nemo_voice_agent.evaluation.tools.eva_airline_tools.AIRLINE_ACTION_TYPES: List[str] = ['rebook_flight', 'cancel_reservation', 'process_refund', 'issue_meal_voucher', ...
```