pricewin-flight-search

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese
Requires the
pricewin
MCP server. This skill issues no network calls of its own.
需依赖
pricewin
MCP服务器。本Skill自身不发起任何网络请求。

Setup (once per machine)

安装配置(每台机器仅需一次)

Without the MCP server registered this skill is inert — it tells you to call
search_flights_live
and no such tool exists.
skills add
only copies files, so run:
bash
bash install.sh          # add --dry-run first to see what it would change
It registers the hosted server (
https://mcp.price.win/mcp
, Streamable HTTP, no credentials) with every agent it finds — Claude Code, Cursor, Windsurf, Gemini CLI, VS Code, Codex — writing a
.bak
before touching any file and skipping configs it cannot parse. Re-running it changes nothing. Restart the agent afterwards.
若未注册MCP服务器,本Skill将无法正常工作——它会提示调用
search_flights_live
,但该工具并不存在。
skills add
仅会复制文件,因此请运行:
bash
bash install.sh          # 可先添加--dry-run参数查看将会进行的更改
该脚本会将托管服务器(
https://mcp.price.win/mcp
,支持流式HTTP,无需凭证)注册到所有已找到的Agent中——包括Claude Code、Cursor、Windsurf、Gemini CLI、VS Code、Codex,修改文件前会创建
.bak
备份,并跳过无法解析的配置文件。重复运行脚本不会产生任何变更。之后请重启Agent。

Flight Search (Live)

实时航班搜索

MCP server:
pricewin
. Tool
search_flights_live
starts an async crawl across Agoda, Trip.com and Traveloka;
poll_flight_results
returns the merged, cheapest-per-flight fares.
MCP服务器:
pricewin
。工具
search_flights_live
会启动异步爬虫,在Agoda、Trip.com和Traveloka平台进行搜索;
poll_flight_results
会返回合并后的、每个航班的最低价格。

CRITICAL: IATA codes only

重要提示:仅支持IATA代码

Both airports MUST be 3-letter IATA codes. There is no airport-lookup tool on this server — resolve the city yourself:
Sài Gòn / TP.HCM → SGN
,
Hà Nội → HAN
,
Đà Nẵng → DAD
,
Bangkok → BKK
(main international),
Tokyo → NRT or HND
,
Seoul → ICN
.
When a city has several airports and the user did not say which, ask one short question — never pick silently. Never invent a code.
出发地和目的地机场必须为3位IATA代码。本服务器无机场查询工具——请自行解析城市对应的代码:
Sài Gòn / TP.HCM → SGN
Hà Nội → HAN
Đà Nẵng → DAD
Bangkok → BKK
(主国际机场)、
Tokyo → NRT或HND
Seoul → ICN
若城市有多个机场且用户未指定,请简短询问用户——切勿自行选择,绝不能编造代码。

CRITICAL: Polling pattern (differs from hotel search)

重要提示:轮询模式(与酒店搜索不同)

search_flights_live
returns IMMEDIATELY with a
sessionId
and zero flights.
  1. Call
    search_flights_live
    with origin, destination, departureDate (YYYY-MM-DD), and
    returnDate
    only for a round trip. Add
    adults
    ,
    cabin
    ,
    language="vi"
    as needed.
  2. Call
    poll_flight_results(sessionId)
    . This tool blocks internally up to ~30s and returns as soon as the first fares land — do NOT sleep before calling it.
  3. status
    is
    pending
    |
    searching
    |
    completed
    |
    failed
    . If it comes back
    searching
    with few or no flights, call again — up to 4 more times.
  4. Present results as soon as flights arrive; keep polling only if the user wants more.
The session expires 15 minutes after the last poll. After that, start a new search — the old
sessionId
is dead.
poll_flight_results
is registered app-visible for the flight widget. If your host does not expose it to the model, let the widget do the polling and do not fabricate fares.
search_flights_live
会立即返回一个
sessionId
,且航班结果为空。
  1. 调用
    search_flights_live
    时传入出发地、目的地、出发日期(YYYY-MM-DD),若为往返需额外传入
    returnDate
    。可按需添加
    adults
    (成人数量)、
    cabin
    (舱位)、
    language="vi"
    (语言)参数。
  2. 调用
    poll_flight_results(sessionId)
    该工具内部会阻塞最长约30秒,一旦有首批价格结果就会返回——调用前无需等待。
  3. status
    状态值为
    pending
    (待处理)|
    searching
    (搜索中)|
    completed
    (完成)|
    failed
    (失败)。若返回
    searching
    且航班结果很少或为空,可再次调用——最多再调用4次
  4. 一旦有航班结果就立即展示;仅当用户需要更多结果时才继续轮询。
会话会在最后一次轮询后的15分钟过期。过期后需重新发起搜索——旧的
sessionId
将失效。
poll_flight_results
已注册为航班组件可见的工具。若你的宿主环境未将其暴露给模型,请让组件进行轮询,切勿编造价格信息。

CRITICAL:
price
is the party total, in USD

重要提示:
price
为总价,单位为美元

price
is the total for all
adults
— not per-person, and not the two legs combined. Divide by
adults
yourself for a per-person figure.
currency
is
"USD"
. Do not convert it. It falls back to
"VND"
only when the live FX rate was unavailable — so read
currency
and label the figure with it
rather than assuming either one.
price
所有
adults
(成人)的总价
——并非单人价格,也不是往返两段的总价。如需单人价格,请自行除以
adults
数量。
currency
(货币)固定为**
"USD"
。请勿进行货币转换。仅当实时汇率不可用时才会 fallback 为
"VND"
——因此
请读取
currency
字段并标注对应的货币单位**,不要默认假设是美元或越南盾。

Response format (MUST follow exactly)

响应格式(必须严格遵循)

Present the TOP 5-7 flights per leg ONLY. For EACH flight:
✈️ *<airline> <flightNumber>*  ← bold via markdown
🕐 <dep.time> <origin> → <arr.time> <destination> · <Xh Ym> · <bay thẳng | N điểm dừng>
💰 $<price> tổng cho <adults> khách (~$<price/adults>/khách)
🔗 <bookingUrl>
Line break between flights, no bullet markers. Cheapest flight gets 🏆.
duration
is in minutes — format it as
2h 10m
. Flag an overnight arrival when
arrival.date
differs from
departure.date
.
仅展示每个行程段的TOP 5-7个航班。每个航班需按以下格式展示:
✈️ *<航空公司> <航班号>*  ← 用markdown加粗
🕐 <起飞时间> <出发地IATA> → <到达时间> <目的地IATA> · <Xh Ym> · <直飞 | N次经停>
💰 $<总价> 共<成人数量>位乘客 (~$<单人价格>/位)
🔗 <预订链接>
航班之间需换行,无需项目符号。最便宜的航班需标注🏆
duration
(时长)单位为分钟——请格式化为
2h 10m
。若到达日期与出发日期不同,需标注为隔夜到达。

Round trips

往返行程

outboundFlights
and
returnFlights
are two independent one-way searches. List them under separate headings. You may state a combined estimate as
cheapest outbound + cheapest return
, but label it as two separate one-way tickets — it is not a quoted round-trip fare and the two legs are booked separately.
outboundFlights
(去程航班)和
returnFlights
(返程航班)是两个独立的单程搜索结果。请分别在不同标题下展示。你可以估算总价为
最便宜去程 + 最便宜返程
,但需标注为两张独立的单程机票——这并非报价的往返总价,两段行程需分别预订。

Booking URLs — use verbatim

预订链接——请直接使用原文

bookingUrl
is the deep link of the cheapest agent, with dates and passengers already baked in. Never append, rewrite, or construct params (unlike the hotel skill). A
bookingUrl
of exactly
https://www.price.win/
means no agent deep link was captured — say the fare must be re-checked on the provider's site instead of presenting it as a click-to-book link.
Attribute the source only from the URL host (
agoda.com
,
trip.com
,
traveloka.com
) — the result carries no explicit source field, so do not guess one.
bookingUrl
是对应最低价格平台的深度链接,已包含日期和乘客信息。切勿追加、重写或构造参数(与酒店Skill不同)。若
bookingUrl
恰好为
https://www.price.win/
,表示未捕获到平台深度链接——此时请告知用户需前往对应平台重新查询价格,不要将其作为可点击的预订链接展示。
仅从URL主机名(
agoda.com
trip.com
traveloka.com
)标注来源——结果中无明确的来源字段,请勿猜测。

Fields that look useful but are not

看似有用但实际无效的字段

  • stopCities
    — always empty; describe stops by count only
  • departure.city
    /
    arrival.city
    — repeat the IATA code, not a real city name
  • legs
    — usually absent on list results; don't promise a segment breakdown
  • stopCities
    ——始终为空;仅通过经停次数描述经停情况
  • departure.city
    /
    arrival.city
    ——重复的是IATA代码,并非真实城市名称
  • legs
    ——列表结果中通常不存在;不要承诺提供分段详情

Ranking

排序规则

Sort by
price
. Cheapest first, but surface a non-stop or much shorter option when it costs only marginally more — say so in one line rather than reordering silently.
price
(价格)排序。从最便宜的开始,但如果直飞或时长短很多的航班价格仅略高一点,可将其提前展示——需用一行文字说明原因,切勿静默调整顺序。