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

# buy_cancel_flight

> Cancel a flight the user previously booked, and refund them.

Connect to `https://mcp.agentcard.sh/mcp` with the **user's connection token** (or a `buy_token` for org-owned accounts).

**Behavior:** destructive.

<Note>Not in the default `tools/list`. It is still callable by exact name, and appears when the client sends the `x-expert-tools: 1` header.</Note>

## What it does

Cancel a flight the user previously booked, and refund them. TWO STEPS, like checkout: FIRST call with confirm:false (or omitted) to get the refund QUOTE — the airline's fare rules decide the refund (full, partial, or \$0 for non-refundable fares); the booking service fee is NOT refunded. SHOW the user the exact refund amount and get an explicit yes. THEN, in a LATER message, call again with confirm:true to actually cancel + refund. Cancels the most recent booked flight by default; pass `pnr` to target a specific one.

## Inputs

| Field     | Type    | Description                                                                                                                                                       |
| --------- | ------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `confirm` | boolean | Omit/false = refund quote only (no cancellation). true = cancel for real + refund — ONLY after the user has seen the refund amount and agreed in a later message. |
| `pnr`     | string  | Optional booking reference (PNR) to cancel a specific flight. Omit for the most recent booked flight.                                                             |

## Returns

None.

## Example call

```json theme={null}
{
  "tool": "buy_cancel_flight",
  "arguments": {}
}
```
