@gojinko/plugin 0.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.claude-plugin/plugin.json +13 -0
- package/.codex-plugin/plugin.json +30 -0
- package/.mcp.json +8 -0
- package/README.md +60 -0
- package/package.json +24 -0
- package/skills/account/SKILL.md +73 -0
- package/skills/book-trip/SKILL.md +175 -0
- package/skills/manage-booking/SKILL.md +55 -0
- package/skills/search-flights/SKILL.md +79 -0
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "jinko",
|
|
3
|
+
"description": "Search flights, book trips, and manage bookings with the Jinko Travel API. Connects to the Jinko MCP server for live flight pricing, trip management, and payment.",
|
|
4
|
+
"version": "0.4.0",
|
|
5
|
+
"author": {
|
|
6
|
+
"name": "Jinko",
|
|
7
|
+
"url": "https://gojinko.com"
|
|
8
|
+
},
|
|
9
|
+
"homepage": "https://builders.gojinko.com",
|
|
10
|
+
"repository": "https://github.com/gojinko/jinko-dev-tools",
|
|
11
|
+
"license": "MIT",
|
|
12
|
+
"keywords": ["travel", "flights", "booking", "mcp"]
|
|
13
|
+
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "jinko",
|
|
3
|
+
"description": "Search flights, book trips, and manage bookings with the Jinko Travel API. Connects to the Jinko MCP server for live flight pricing, trip management, and payment.",
|
|
4
|
+
"version": "0.4.0",
|
|
5
|
+
"author": {
|
|
6
|
+
"name": "Jinko",
|
|
7
|
+
"url": "https://gojinko.com"
|
|
8
|
+
},
|
|
9
|
+
"homepage": "https://builders.gojinko.com",
|
|
10
|
+
"repository": "https://github.com/gojinko/jinko-dev-tools",
|
|
11
|
+
"license": "MIT",
|
|
12
|
+
"keywords": ["travel", "flights", "booking", "mcp"],
|
|
13
|
+
"skills": "./skills/",
|
|
14
|
+
"mcpServers": "./.mcp.json",
|
|
15
|
+
"interface": {
|
|
16
|
+
"displayName": "Jinko Travel",
|
|
17
|
+
"shortDescription": "Flight search, booking, and trip management",
|
|
18
|
+
"longDescription": "Search flights, compare prices, book trips with ancillaries, and manage refunds using the Jinko Travel API. Supports live pricing from multiple airlines via Sabre and TravelFusion.",
|
|
19
|
+
"developerName": "Jinko",
|
|
20
|
+
"category": "Productivity",
|
|
21
|
+
"capabilities": ["Interactive", "Write"],
|
|
22
|
+
"websiteURL": "https://gojinko.com",
|
|
23
|
+
"defaultPrompt": [
|
|
24
|
+
"Find the cheapest flights from Paris to New York next month",
|
|
25
|
+
"Book a round-trip flight from London to Tokyo",
|
|
26
|
+
"Check my API usage and remaining quota"
|
|
27
|
+
],
|
|
28
|
+
"brandColor": "#2563EB"
|
|
29
|
+
}
|
|
30
|
+
}
|
package/.mcp.json
ADDED
package/README.md
ADDED
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
# Jinko Travel Plugin
|
|
2
|
+
|
|
3
|
+
Plugin for **Claude Code** and **OpenAI Codex** that enables flight search, trip booking, and booking management via the Jinko Travel API.
|
|
4
|
+
|
|
5
|
+
## What's included
|
|
6
|
+
|
|
7
|
+
- **4 skills**: search-flights, book-trip, manage-booking, account
|
|
8
|
+
- **MCP server config**: connects to `mcp.builders.gojinko.com`
|
|
9
|
+
- **Dual-platform support**: works with both Claude Code and Codex CLI
|
|
10
|
+
|
|
11
|
+
## Setup
|
|
12
|
+
|
|
13
|
+
### 1. Get an API key
|
|
14
|
+
|
|
15
|
+
Sign up at [builders.gojinko.com](https://builders.gojinko.com) and create an API key from the dashboard.
|
|
16
|
+
|
|
17
|
+
### 2. Set your API key
|
|
18
|
+
|
|
19
|
+
```bash
|
|
20
|
+
export JINKO_API_KEY=jnk_your_key_here
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
Or add it to your shell profile (`~/.zshrc`, `~/.bashrc`).
|
|
24
|
+
|
|
25
|
+
### 3. Install the plugin
|
|
26
|
+
|
|
27
|
+
**Claude Code:**
|
|
28
|
+
```bash
|
|
29
|
+
claude plugin install @gojinko/plugin
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
**Codex CLI:**
|
|
33
|
+
```bash
|
|
34
|
+
codex plugin install @gojinko/plugin
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
## Available skills
|
|
38
|
+
|
|
39
|
+
| Skill | Description | Example prompt |
|
|
40
|
+
|-------|-------------|---------------|
|
|
41
|
+
| `jinko:search-flights` | Find flights, explore destinations, compare prices | "Find flights from Paris to Tokyo in June" |
|
|
42
|
+
| `jinko:book-trip` | Book a flight with travelers and payment | "Book the cheapest flight and pay" |
|
|
43
|
+
| `jinko:manage-booking` | Check refund eligibility and process refunds | "Can I get a refund on booking ORD-123?" |
|
|
44
|
+
| `jinko:account` | Manage API keys and check usage | "How many API calls do I have left?" |
|
|
45
|
+
|
|
46
|
+
## Authentication
|
|
47
|
+
|
|
48
|
+
The plugin supports two auth methods:
|
|
49
|
+
|
|
50
|
+
- **API Key**: Set `JINKO_API_KEY` environment variable with your `jnk_*` key
|
|
51
|
+
- **OAuth**: If no API key is set, Codex will auto-discover OAuth and prompt you to sign in via browser
|
|
52
|
+
|
|
53
|
+
## MCP server
|
|
54
|
+
|
|
55
|
+
The plugin connects to the Jinko MCP server at:
|
|
56
|
+
```
|
|
57
|
+
https://mcp.builders.gojinko.com/mcp
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
This is the same server used by the Jinko CLI (`@gojinko/cli`) and SDK (`@gojinko/api-client`).
|
package/package.json
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@gojinko/plugin",
|
|
3
|
+
"version": "0.4.0",
|
|
4
|
+
"description": "Jinko Travel plugin for Claude Code and OpenAI Codex — flight search, booking, and trip management via MCP",
|
|
5
|
+
"private": false,
|
|
6
|
+
"license": "MIT",
|
|
7
|
+
"author": "Jinko <dev@gojinko.com>",
|
|
8
|
+
"homepage": "https://builders.gojinko.com",
|
|
9
|
+
"repository": {
|
|
10
|
+
"type": "git",
|
|
11
|
+
"url": "https://github.com/gojinko/jinko-dev-tools",
|
|
12
|
+
"directory": "packages/plugin"
|
|
13
|
+
},
|
|
14
|
+
"files": [
|
|
15
|
+
".claude-plugin/",
|
|
16
|
+
".codex-plugin/",
|
|
17
|
+
"skills/",
|
|
18
|
+
".mcp.json",
|
|
19
|
+
"README.md"
|
|
20
|
+
],
|
|
21
|
+
"publishConfig": {
|
|
22
|
+
"access": "public"
|
|
23
|
+
}
|
|
24
|
+
}
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: account
|
|
3
|
+
description: Manage your Jinko developer account — register, create and revoke API keys, check usage quotas. Use when the user asks about their API key, usage limits, or account setup.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Developer Account
|
|
7
|
+
|
|
8
|
+
Manage your Jinko developer platform account using the `dev_account` MCP tool.
|
|
9
|
+
|
|
10
|
+
## Actions
|
|
11
|
+
|
|
12
|
+
### Register — create a new account
|
|
13
|
+
|
|
14
|
+
```json
|
|
15
|
+
{
|
|
16
|
+
"action": "register",
|
|
17
|
+
"email": "dev@example.com",
|
|
18
|
+
"name": "Jane Developer"
|
|
19
|
+
}
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
New accounts start in `pending` status until approved. `email` is required, `name` is optional.
|
|
23
|
+
|
|
24
|
+
### List API keys
|
|
25
|
+
|
|
26
|
+
```json
|
|
27
|
+
{
|
|
28
|
+
"action": "list_keys"
|
|
29
|
+
}
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
Returns all keys with `id`, `name`, `prefix`, `status`, `key_type`, and `rate_limit`. Full key values are never shown after creation.
|
|
33
|
+
|
|
34
|
+
### Create a new API key
|
|
35
|
+
|
|
36
|
+
```json
|
|
37
|
+
{
|
|
38
|
+
"action": "create_key",
|
|
39
|
+
"key_name": "my-project-key"
|
|
40
|
+
}
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
**The full API key is only shown once in the response.** Tell the user to save it immediately — it cannot be retrieved later. Keys use the `jnk_` prefix.
|
|
44
|
+
|
|
45
|
+
### Revoke an API key
|
|
46
|
+
|
|
47
|
+
```json
|
|
48
|
+
{
|
|
49
|
+
"action": "delete_key",
|
|
50
|
+
"key_id": 42
|
|
51
|
+
}
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
`key_id` is the numeric ID from `list_keys`. This is irreversible — confirm with the user before proceeding.
|
|
55
|
+
|
|
56
|
+
### Check usage
|
|
57
|
+
|
|
58
|
+
```json
|
|
59
|
+
{
|
|
60
|
+
"action": "usage"
|
|
61
|
+
}
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
Returns `used`, `limit`, `remaining`, and `resets_at` for the current billing period.
|
|
65
|
+
|
|
66
|
+
## Getting started
|
|
67
|
+
|
|
68
|
+
If the user doesn't have a Jinko account yet, guide them through:
|
|
69
|
+
|
|
70
|
+
1. `register` with their email
|
|
71
|
+
2. Wait for account approval (or direct them to [builders.gojinko.com](https://builders.gojinko.com))
|
|
72
|
+
3. `create_key` to get an API key
|
|
73
|
+
4. Set `JINKO_API_KEY=jnk_...` in their environment
|
|
@@ -0,0 +1,175 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: book-trip
|
|
3
|
+
description: Book a flight trip end-to-end — live pricing, traveler details, ancillaries, and payment via the Jinko Travel API. Use when the user wants to book, price-check, or pay for a flight.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Book a Trip
|
|
7
|
+
|
|
8
|
+
Complete booking flow using Jinko MCP tools. Each step depends on the previous — do not skip steps.
|
|
9
|
+
|
|
10
|
+
## Booking Flow
|
|
11
|
+
|
|
12
|
+
```
|
|
13
|
+
flight_search → trip (add_item) → trip (upsert_travelers) → trip (select_ancillaries) → book (quote) → book (fulfillment) → book (confirm_payment)
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
## Step 1: Get live pricing — `flight_search`
|
|
17
|
+
|
|
18
|
+
Two modes (use exactly one):
|
|
19
|
+
|
|
20
|
+
**Direct search** (user has route + dates):
|
|
21
|
+
```json
|
|
22
|
+
{
|
|
23
|
+
"search": {
|
|
24
|
+
"origin": "PAR",
|
|
25
|
+
"destination": "NYC",
|
|
26
|
+
"departure_date": "2026-06-15",
|
|
27
|
+
"return_date": "2026-06-22",
|
|
28
|
+
"cabin_class": "economy",
|
|
29
|
+
"direct_only": false
|
|
30
|
+
},
|
|
31
|
+
"passengers": { "adults": 1, "children": 0, "infants": 0 }
|
|
32
|
+
}
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
**Price-check** (user has an `offer_token` from search-flights):
|
|
36
|
+
```json
|
|
37
|
+
{
|
|
38
|
+
"price_check": {
|
|
39
|
+
"offer_token": "es-abc123..."
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
**Response:** Flights with fare options. Each fare includes a `trip_item_token`. If status is `"flight_unavailable"`, show alternatives — do NOT proceed to booking.
|
|
45
|
+
|
|
46
|
+
**Rules:**
|
|
47
|
+
- Origin and destination must differ
|
|
48
|
+
- Departure date must be in the future
|
|
49
|
+
- Infants cannot exceed adults
|
|
50
|
+
- Total passengers max 9
|
|
51
|
+
|
|
52
|
+
## Step 2: Create trip — `trip` with `add_item`
|
|
53
|
+
|
|
54
|
+
```json
|
|
55
|
+
{
|
|
56
|
+
"add_item": {
|
|
57
|
+
"trip_item_token": "<from flight_search fare>"
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
Returns `trip_id`. Save it for all subsequent steps.
|
|
63
|
+
|
|
64
|
+
## Step 3: Set travelers — `trip` with `upsert_travelers`
|
|
65
|
+
|
|
66
|
+
**Never fabricate traveler data. Always ask the user for real passenger details.**
|
|
67
|
+
|
|
68
|
+
```json
|
|
69
|
+
{
|
|
70
|
+
"trip_id": "<from step 2>",
|
|
71
|
+
"upsert_travelers": {
|
|
72
|
+
"travelers": [
|
|
73
|
+
{
|
|
74
|
+
"first_name": "John",
|
|
75
|
+
"last_name": "Doe",
|
|
76
|
+
"date_of_birth": "1990-01-15",
|
|
77
|
+
"gender": "MALE",
|
|
78
|
+
"passenger_type": "ADULT"
|
|
79
|
+
}
|
|
80
|
+
],
|
|
81
|
+
"contact": {
|
|
82
|
+
"email": "john@example.com",
|
|
83
|
+
"phone": "+33612345678"
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
**Traveler fields:**
|
|
90
|
+
- `first_name`, `last_name`: as on travel document (required)
|
|
91
|
+
- `date_of_birth`: YYYY-MM-DD (required)
|
|
92
|
+
- `gender`: `"MALE"` or `"FEMALE"` (required)
|
|
93
|
+
- `passenger_type`: `"ADULT"` (12+), `"CHILD"` (2-11), `"INFANT"` (under 2) (required)
|
|
94
|
+
- `nationality`, `passport_number`, `passport_expiry`, `passport_country`: optional
|
|
95
|
+
|
|
96
|
+
**Contact:** `email` is required, `phone` is optional.
|
|
97
|
+
|
|
98
|
+
## Step 4 (optional): Add ancillaries — `trip` with `select_ancillaries`
|
|
99
|
+
|
|
100
|
+
Check the trip response from step 3 for `available_ancillaries` on each trip item. If available, offer them to the user.
|
|
101
|
+
|
|
102
|
+
```json
|
|
103
|
+
{
|
|
104
|
+
"trip_id": "<trip_id>",
|
|
105
|
+
"select_ancillaries": {
|
|
106
|
+
"item_id": "<trip item id>",
|
|
107
|
+
"selections": [
|
|
108
|
+
{
|
|
109
|
+
"offer_id": "<ancillary offer_id>",
|
|
110
|
+
"category": "BAGGAGE",
|
|
111
|
+
"quantity": 1
|
|
112
|
+
}
|
|
113
|
+
]
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
```
|
|
117
|
+
|
|
118
|
+
Categories: `BAGGAGE`, `SEAT`, `MEAL`, etc.
|
|
119
|
+
|
|
120
|
+
## Step 5: Quote — `book` with `quote`
|
|
121
|
+
|
|
122
|
+
```json
|
|
123
|
+
{
|
|
124
|
+
"quote": {
|
|
125
|
+
"trip_id": "<trip_id>"
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
```
|
|
129
|
+
|
|
130
|
+
Returns final pricing with all items and ancillaries. Trip must have items and travelers set.
|
|
131
|
+
|
|
132
|
+
## Step 6: Pay — `book` with `fulfillment`
|
|
133
|
+
|
|
134
|
+
```json
|
|
135
|
+
{
|
|
136
|
+
"fulfillment": {
|
|
137
|
+
"trip_id": "<trip_id>"
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
```
|
|
141
|
+
|
|
142
|
+
Returns `checkout_url` and `session_id`. The user completes payment in their browser at the checkout URL.
|
|
143
|
+
|
|
144
|
+
## Step 7: Confirm — `book` with `confirm_payment`
|
|
145
|
+
|
|
146
|
+
After the user completes payment:
|
|
147
|
+
|
|
148
|
+
```json
|
|
149
|
+
{
|
|
150
|
+
"confirm_payment": {
|
|
151
|
+
"trip_id": "<trip_id>",
|
|
152
|
+
"checkout_session_id": "cs_xxx"
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
```
|
|
156
|
+
|
|
157
|
+
Or with payment intent:
|
|
158
|
+
```json
|
|
159
|
+
{
|
|
160
|
+
"confirm_payment": {
|
|
161
|
+
"trip_id": "<trip_id>",
|
|
162
|
+
"payment_intent_id": "pi_xxx"
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
```
|
|
166
|
+
|
|
167
|
+
Returns booking confirmation with `booking_reference`.
|
|
168
|
+
|
|
169
|
+
## Important rules
|
|
170
|
+
|
|
171
|
+
- **Never skip steps** — each depends on the previous
|
|
172
|
+
- **Never fabricate traveler data** — always ask the user
|
|
173
|
+
- **If flight_search returns "flight_unavailable"** — do NOT proceed, show alternatives
|
|
174
|
+
- **Sessions expire** — if you get a 404, start over
|
|
175
|
+
- **Rate limit**: 1000 requests/30 days per API key
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: manage-booking
|
|
3
|
+
description: Check refund eligibility and process refunds for booked flights via the Jinko Travel API. Use when the user asks about refunds, cancellations, or booking modifications.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Manage Booking
|
|
7
|
+
|
|
8
|
+
Post-booking operations using the Jinko `refund_flight` MCP tool.
|
|
9
|
+
|
|
10
|
+
## Refund Flow
|
|
11
|
+
|
|
12
|
+
Always check eligibility first, then confirm with the user before committing.
|
|
13
|
+
|
|
14
|
+
### Step 1: Check eligibility — `refund_flight` with `action: "check"`
|
|
15
|
+
|
|
16
|
+
```json
|
|
17
|
+
{
|
|
18
|
+
"action": "check",
|
|
19
|
+
"booking_reference": "ORD-123456",
|
|
20
|
+
"pnr": "ABC123"
|
|
21
|
+
}
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
**Response includes:**
|
|
25
|
+
- `is_refundable`: whether a refund is possible
|
|
26
|
+
- `refund_amount`: estimated refund value and currency
|
|
27
|
+
- `penalty_amount`: cancellation fee if applicable
|
|
28
|
+
- `total_paid`: original payment amount
|
|
29
|
+
- `processing_type`: how the refund will be processed
|
|
30
|
+
|
|
31
|
+
**Present the refund details clearly to the user** — show what they paid, what they'd get back, and any penalty. Ask for explicit confirmation before proceeding.
|
|
32
|
+
|
|
33
|
+
### Step 2: Process refund — `refund_flight` with `action: "commit"`
|
|
34
|
+
|
|
35
|
+
Only after the user confirms:
|
|
36
|
+
|
|
37
|
+
```json
|
|
38
|
+
{
|
|
39
|
+
"action": "commit",
|
|
40
|
+
"booking_reference": "ORD-123456",
|
|
41
|
+
"pnr": "ABC123",
|
|
42
|
+
"reason": "schedule change"
|
|
43
|
+
}
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
**Params:**
|
|
47
|
+
- `booking_reference`: the order ID (required)
|
|
48
|
+
- `pnr`: Passenger Name Record (optional but recommended)
|
|
49
|
+
- `reason`: why the user wants a refund (only for commit)
|
|
50
|
+
|
|
51
|
+
## Important rules
|
|
52
|
+
|
|
53
|
+
- **Always check before committing** — never skip the eligibility check
|
|
54
|
+
- **Get user confirmation** — show refund amount and penalty before processing
|
|
55
|
+
- **Non-refundable bookings** — if `is_refundable` is false, inform the user and do not attempt commit
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: search-flights
|
|
3
|
+
description: Search for flights, explore destinations, and compare prices across dates using the Jinko Travel API. Use when the user wants to find flights, discover where they can fly, or compare prices.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Flight Search
|
|
7
|
+
|
|
8
|
+
You have access to three Jinko MCP tools for flight discovery. Pick the right one based on what the user knows:
|
|
9
|
+
|
|
10
|
+
## Tool Selection
|
|
11
|
+
|
|
12
|
+
| User knows | Tool to use |
|
|
13
|
+
|-----------|-------------|
|
|
14
|
+
| Nothing — wants inspiration | `find_destination` |
|
|
15
|
+
| Route but flexible on dates | `flight_calendar` |
|
|
16
|
+
| Route + dates | `find_flight` |
|
|
17
|
+
|
|
18
|
+
## find_destination
|
|
19
|
+
|
|
20
|
+
Discover destinations from origin airports. Returns destinations sorted by cheapest flight.
|
|
21
|
+
|
|
22
|
+
**Required params:**
|
|
23
|
+
- `origins`: array of IATA codes (include all nearby airports, e.g. `["JFK", "LGA", "EWR"]` for NYC)
|
|
24
|
+
- `trip_type`: `"oneway"` or `"roundtrip"`
|
|
25
|
+
|
|
26
|
+
**Optional params:**
|
|
27
|
+
- `destinations`: filter to specific destinations
|
|
28
|
+
- `departure_dates` or `departure_date_ranges`: when to depart
|
|
29
|
+
- `return_dates` or `return_date_ranges`: when to return (roundtrip)
|
|
30
|
+
- `stay_days` or `stay_days_range`: trip duration
|
|
31
|
+
- `direct_only`: nonstop flights only
|
|
32
|
+
- `cabin_class`: `"economy"`, `"premium_economy"`, `"business"`, `"first"`
|
|
33
|
+
- `max_price`: maximum price per person
|
|
34
|
+
- `currency`: ISO 4217 code (default `"USD"`)
|
|
35
|
+
|
|
36
|
+
**Response:** List of destinations with `destination_code`, `destination_name`, `min_price`, `total_offers`, and `cheapest_offer_token`.
|
|
37
|
+
|
|
38
|
+
## flight_calendar
|
|
39
|
+
|
|
40
|
+
Show cheapest prices across a date range for a specific route. Great for "what's the cheapest day to fly?"
|
|
41
|
+
|
|
42
|
+
**Required params:**
|
|
43
|
+
- `origin`: IATA code (e.g. `"PAR"`)
|
|
44
|
+
- `destination`: IATA code (e.g. `"NYC"`)
|
|
45
|
+
- `trip_type`: `"oneway"` or `"roundtrip"`
|
|
46
|
+
- `departure_date_start`: start of range (YYYY-MM-DD)
|
|
47
|
+
- `departure_date_end`: end of range (YYYY-MM-DD)
|
|
48
|
+
|
|
49
|
+
**Optional params:**
|
|
50
|
+
- `return_date_start`, `return_date_end`: return range (roundtrip)
|
|
51
|
+
- `stay_days`: exact stay duration
|
|
52
|
+
- `direct_only`, `cabin_class`, `currency`
|
|
53
|
+
|
|
54
|
+
**Response:** List of dates with `price`, `offer_token`, `airline`, `stops`. Includes `cheapest` entry.
|
|
55
|
+
|
|
56
|
+
## find_flight
|
|
57
|
+
|
|
58
|
+
Search cached flights by route and dates. Fast results with offer tokens.
|
|
59
|
+
|
|
60
|
+
**Required params:**
|
|
61
|
+
- `origin`: IATA code (e.g. `"CDG"`)
|
|
62
|
+
- `destination`: IATA code (e.g. `"JFK"`)
|
|
63
|
+
- `trip_type`: `"oneway"` or `"roundtrip"`
|
|
64
|
+
|
|
65
|
+
**Optional params:**
|
|
66
|
+
- `departure_dates` or `departure_date_ranges`: when to depart
|
|
67
|
+
- `return_dates` or `return_date_ranges`: when to return (roundtrip)
|
|
68
|
+
- `stay_days` or `stay_days_range`: trip duration
|
|
69
|
+
- `direct_only`, `cabin_class`, `max_price`, `sort_by`, `currency`
|
|
70
|
+
|
|
71
|
+
**Response:** Flights with `offer_token`, `airline`, `price`, `departure`, `arrival`, `duration_minutes`, `stops`.
|
|
72
|
+
|
|
73
|
+
## Important notes
|
|
74
|
+
|
|
75
|
+
- **Airport codes**: Use 3-letter IATA codes (PAR, NYC, JFK, CDG)
|
|
76
|
+
- **Dates**: YYYY-MM-DD format
|
|
77
|
+
- **Cached vs Live**: These tools use cached data (fast). For live pricing, use the `book-trip` skill's `flight_search` tool
|
|
78
|
+
- **offer_token**: Every result includes an `offer_token` — save it for live pricing via `flight_search`
|
|
79
|
+
- All three tools support `format: "json"` for structured output or `format: "text"` for readable summaries
|