didi-ride
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseDiDi Ride (滴滴出行)
DiDi Ride(滴滴出行)
Drive the user's DiDi (滴滴出行) account through the DiDi MCP server:
book rides, estimate fares, track orders, cancel, and plan routes.
The BYOC connector injects one env var into the sandbox:
didi- — the user's DiDi MCP key. Secret — never echo, print, or log it.
DIDI_MCP_KEY
If is missing, tell the user to connect the DiDi connector at
auth.acedata.cloud/user/connections
(they get the key by scanning the QR in the 滴滴出行 App or via
https://mcp.didichuxing.com/claw).
DIDI_MCP_KEY通过DiDi MCP服务器操作用户的**DiDi(滴滴出行)**账号:预约打车、预估车费、追踪订单、取消订单以及规划路线。
didi- — 用户的DiDi MCP密钥。机密信息——切勿回显、打印或记录。
DIDI_MCP_KEY
如果缺少,请告知用户前往auth.acedata.cloud/user/connections连接DiDi连接器(用户可通过扫描滴滴出行App中的二维码或访问https://mcp.didichuxing.com/claw获取密钥)。
DIDI_MCP_KEYCLI
CLI
The skill ships a stdlib-only helper that speaks the MCP Streamable-HTTP
protocol to DiDi. Point at it once:
bash
DIDI=$SKILL_DIR/scripts/didi.pyTwo commands:
bash
python3 $DIDI list # list tools + their JSON input schemas
python3 $DIDI call <tool> '<json-args>' # call any toolAlways check for the exact tool + parameter
names before calling. When unsure, run — it returns the
authoritative input schema for every tool straight from DiDi. Do not guess
parameter names (common mistakes: → , → ,
four coord fields → six ).
references/api_references.mdpython3 $DIDI listkeywordkeywordsregioncityfrom_name/from_lat/from_lng/to_name/to_lat/to_lngAll argument values must be strings (including coordinates and
), e.g. not .
product_category{"product_category":"1"}{"product_category":1}该技能附带一个仅依赖标准库的辅助工具,通过MCP Streamable-HTTP协议与DiDi通信。只需指向它一次:
bash
DIDI=$SKILL_DIR/scripts/didi.py两个命令:
bash
python3 $DIDI list # 列出工具及其JSON输入 schema
python3 $DIDI call <tool> '<json-args>' # 调用任意工具调用前务必查看获取准确的工具及参数名称。 如有疑问,运行——它会直接从DiDi返回每个工具的权威输入schema。请勿猜测参数名称(常见错误: → , → ,四个坐标字段→六个)。
references/api_references.mdpython3 $DIDI listkeywordkeywordsregioncityfrom_name/from_lat/from_lng/to_name/to_lat/to_lng所有参数值必须为字符串(包括坐标和),例如而非。
product_category{"product_category":"1"}{"product_category":1}Write gating (real money / real driver)
写入限制(涉及真实资金/真实司机)
taxi_create_ordertaxi_cancel_order--confirm--confirm--confirmbash
python3 $DIDI call taxi_create_order '{"estimate_trace_id":"...","product_category":"1"}' --confirm- Even when the user says "打车" / "取消订单", confirm the concrete details
(起终点、车型 for booking; the order for cancelling) before adding .
--confirm - Cancel intent ≠ cancel confirmation — always ask "确认取消吗?" first.
taxi_create_ordertaxi_cancel_order--confirm--confirm--confirmbash
python3 $DIDI call taxi_create_order '{"estimate_trace_id":"...","product_category":"1"}' --confirm- 即使用户说“打车”/“取消订单”,在添加前也要确认具体细节(打车的起终点、车型;取消的对应订单)。
--confirm - 取消意向≠取消确认——务必先询问“确认取消吗?”。
Booking flow (最小可执行)
打车预约流程(最小可执行版)
- Resolve addresses — (never invent coordinates; don't reuse coordinates from earlier turns — the user may have moved).
maps_textsearch- If the user references an address alias (家 / 公司 / etc.) that you don't have, ask them; this skill has no stored preferences.
- Confirm start/end — if returns ≥2 candidates, list at least the top 3 and let the user pick; a single exact match needs no confirmation.
maps_textsearch - Estimate — ; record the returned
taxi_estimate/traceId. It expires (estimate_trace_id) — re-estimate if stale.-32021 - Pick car type — user's current message wins ("叫快车"→
product_category, "专车"→1); otherwise ask. Only use categories present in the8response; never silently substitute a different service level (快车taxi_estimate≠ 特惠快车1).201 - Create order — with the latest
taxi_create_order(dry-run → confirm →estimate_trace_id).--confirm - Report — order id, start/end, car type, estimated fare. Tell the user they can send 「查询订单」 to check status.
- 解析地址 — 使用(切勿自行编造坐标;不要复用之前对话中的坐标——用户可能已移动位置)。
maps_textsearch- 如果用户提及您不知道的地址别名(家/公司/等),请询问用户;本技能不存储偏好设置。
- 确认起终点 — 如果返回≥2个候选地址,至少列出前3个让用户选择;如果只有一个精确匹配,则无需确认。
maps_textsearch - 预估车费 — 调用;记录返回的
taxi_estimate/traceId。该ID会过期(错误码estimate_trace_id)——如果过期需重新预估。-32021 - 选择车型 — 用户当前消息优先(“叫快车”→为
product_category,“专车”→1);否则询问用户。仅使用8响应中存在的车型分类;切勿擅自替换不同服务等级(快车taxi_estimate≠特惠快车1)。201 - 创建订单 — 使用最新的调用
estimate_trace_id(试运行→确认→添加taxi_create_order)。--confirm - 反馈结果 — 告知用户订单ID、起终点、车型、预估车费。并提示用户可发送「查询订单」来查看状态。
Query an order
查询订单
Order id comes from (in priority): the user's message → the most recent order
created this conversation → else ask.
bash
python3 $DIDI call taxi_query_order '{"order_id":"ORDER_ID"}'Status codes ():
code| code | 含义 | 输出 |
|---|---|---|
| 0 | 匹配中 | ⏳ 正在为您匹配司机 |
| 1 | 司机已接单 | 展示司机姓名、车型、车牌、电话、距离与预计到达时间 |
| 2 | 司机已到达 | 🔔 司机已到达上车点 |
| 4 | 行程进行中 | 🚗 行程已开始 |
| 5 | 订单完成 | ✅ 行程结束(展示费用,如有) |
| 6 | 系统取消 | ❌ 订单已被系统取消 |
| 7 | 已取消 | ❌ 订单已取消 |
| 3 / 8-12 | 其他终态 | 显示对应状态描述 |
订单ID的获取优先级:用户消息中提供的→本次对话中最近创建的订单→否则询问用户。
bash
python3 $DIDI call taxi_query_order '{"order_id":"ORDER_ID"}'状态码():
code| code | 含义 | 输出 |
|---|---|---|
| 0 | 匹配中 | ⏳ 正在为您匹配司机 |
| 1 | 司机已接单 | 展示司机姓名、车型、车牌、电话、距离与预计到达时间 |
| 2 | 司机已到达 | 🔔 司机已到达上车点 |
| 4 | 行程进行中 | 🚗 行程已开始 |
| 5 | 订单完成 | ✅ 行程结束(展示费用,如有) |
| 6 | 系统取消 | ❌ 订单已被系统取消 |
| 7 | 已取消 | ❌ 订单已取消 |
| 3 / 8-12 | 其他终态 | 显示对应状态描述 |
Routes & places (no order needed)
路线与地点查询(无需创建订单)
bash
python3 $DIDI call maps_direction_driving '{"from_name":"...","from_lat":"...","from_lng":"...","to_name":"...","to_lat":"...","to_lng":"..."}'
python3 $DIDI call maps_direction_transit '{...}' # 公交
python3 $DIDI call maps_direction_walking '{...}' # 步行
python3 $DIDI call maps_direction_bicycling '{...}' # 骑行
python3 $DIDI call maps_place_around '{"keywords":"咖啡","lat":"...","lng":"..."}'
python3 $DIDI call maps_regeocode '{"lat":"...","lng":"..."}'bash
python3 $DIDI call maps_direction_driving '{"from_name":"...","from_lat":"...","from_lng":"...","to_name":"...","to_lat":"...","to_lng":"..."}'
python3 $DIDI call maps_direction_transit '{...}' # 公交
python3 $DIDI call maps_direction_walking '{...}' # 步行
python3 $DIDI call maps_direction_bicycling '{...}' # 骑行
python3 $DIDI call maps_place_around '{"keywords":"咖啡","lat":"...","lng":"..."}'
python3 $DIDI call maps_regeocode '{"lat":"...","lng":"..."}'Gotchas
注意事项
- Never print the key or the raw endpoint URL — the helper handles the transport and keeps the key internal.
- takes only
taxi_create_order,estimate_trace_id, and optionalproduct_category. Don't pass the estimate's coordinate/name fields.caller_car_phone - No stored preferences: this skill doesn't remember home/work/car type — ask the user, or wire richer memory in a higher layer.
- Auth failure surfaces as (or HTTP 401/403): the key is missing/expired → have the user reconnect the connector.
-32002
Setup: See authentication. This skill uses theconnector's injecteddidi, notDIDI_MCP_KEY.ACEDATACLOUD_API_TOKEN
- 切勿打印密钥或原始端点URL——辅助工具会处理传输并确保密钥内部存储。
- 仅接受
taxi_create_order、estimate_trace_id和可选的product_category参数。请勿传入预估结果中的坐标/名称字段。caller_car_phone - 无存储偏好:本技能不会记住家庭/工作地址/车型偏好——请询问用户,或在更高层级中集成更丰富的记忆功能。
- 认证失败会显示错误码(或HTTP 401/403):密钥缺失/过期→请用户重新连接连接器。
-32002
设置说明: 请查看认证。本技能使用连接器注入的didi,而非DIDI_MCP_KEY。ACEDATACLOUD_API_TOKEN