Plan and rank coordinated rail itineraries where N travelers depart from different origins and converge on one destination. Uses real-time 12306 data with three-tier fallback (12306-direct -> 12306-mcp -> distance-estimation).
trip_planner_quick_plan(origins="Guangzhou,Wuhan", destination="Beijing", date="2026-04-20")top_plans for ranked options with scores, strategies, and trade-offstotal_feasible == 0, check relaxation_suggestions and re-run with relaxed constraints| Scenario | Tool | Why |
|---|---|---|
| --- | --- | --- |
| Natural language / vague request | trip_planner_parse_request | Extract structured params from free text |
| Quick planning, only know cities + date | trip_planner_quick_plan | Minimal input, auto-resolves from real-time data, Chinese support |
| Full structured data ready | trip_planner_plan | Full control over constraints and weights |
| Data in JSON file | trip_planner_plan_from_file | Batch processing |
| Need auto-fetched candidates | trip_planner_plan_with_provider | Auto provider with real-time data |
| Explain a plan result | trip_planner_explain | Human-friendly summary |
| Verify station names | trip_planner_validate_stations | Check against verified database |
| List supported cities | trip_planner_list_cities | Show all 157 supported cities |
| Profile | Focus | When to Use |
|---|---|---|
| --- | --- | --- |
balanced | Even trade-off | Default |
speed-first | Minimize travel time | Urgent trips |
comfort-first | Minimize transfers + standing | Elderly, families |
budget-first | Minimize price | Cost-sensitive |
sync-first | Minimize arrival gap | Must arrive together |
LLM MUST NOT: Fabricate train data, filter candidates based on own knowledge, decide which strategies to apply, override validation results.
LLM SHOULD: Extract structured params from natural language, ask follow-ups for missing info, present results in user-friendly language, help users choose between options, re-invoke skill with adjusted params when needed.
Data source transparency: Output always indicates data source. If distance-estimation was used, inform user that times and prices are approximate.
For detailed information:
references/architecture.md - Three-tier data acquisition, LLM-Skill boundary, complete pipelinereferences/api-reference.md - Full input/output schemas, tool parameters, provider modesreferences/strategies.md - Strategy semantics, scoring formula, constraint rules, examplestrip_planner_quick_plan as the default entry point for most user requeststotal_feasible == 0, check relaxation_suggestions before telling user "no plans found"12306-direct = real-time; distance-estimation = approximate — always disclose thisdata_source=auto (three-tier fallback) — no need to specify unless user requests a specific providertrip_planner_quick_plan and trip_planner_parse_requestpip install mcp
python ${CLAUDE_SKILL_DIR}/scripts/mcp_server.py
python ${CLAUDE_SKILL_DIR}/scripts/plan_trips.py --input input.json --topk 3
pip install -r ${CLAUDE_SKILL_DIR}/requirements.txt
python ${CLAUDE_SKILL_DIR}/scripts/service_api.py
| Variable | Description | Default |
|---|---|---|
| --- | --- | --- |
TRIP_PLANNER_12306_MCP_URL | 12306-MCP server endpoint | (empty) |
TRIP_PLANNER_CACHE_DIR | Cache directory | .cache/trip_planner |
TRIP_PLANNER_LOG_LEVEL | Logging level | WARNING |
共 1 个版本