2.5k
GitHub Stars
2
Bundled Files
2 months ago
Catalog Refreshed
3 months ago
First Indexed
Readme & install
Copy the install command, review bundled files from the catalogue, and read any extended description pulled from the listing source.
Installation
Preview and clipboard use veilstrat where the catalogue uses aiagentskills.
npx veilstrat add skill openclaw/skills --skill tuniu-ticket- _meta.json295 B
- SKILL.md7.9 KB
Overview
This skill implements a Tuniu ticket assistant that uses exec + curl to call the Tuniu MCP ticket service for ticket queries and order creation. It is designed to answer price and ticket-type questions and to submit ticket orders when the user confirms purchase. The skill requires an environment that can run shell curl commands and a valid TUNIU_API_KEY.
How this skill works
On a ticket query, the skill calls the MCP method query_cheapest_tickets with the scenic_name and parses the JSON string in result.content[0].text to extract available tickets, productId, and resId. To place an order, it calls create_ticket_order with product_id, resource_id, depart_date, contact and tourist details; the order response includes success status, orderId, and a paymentUrl the user must follow to complete payment. All network calls are POST requests to the MCP endpoint using JSON-RPC via tools/call and require the apiKey header.
When to use it
- User asks for ticket prices or available ticket types for a specific attraction.
- User confirms they want to book and provides travel date and contact/tourist info.
- To refresh productId/resId before creating an order if the previous query is stale.
- When you can run shell exec with curl and have a valid TUNIU_API_KEY.
Best practices
- Always call query_cheapest_tickets first and keep productId/resId from its latest result.
- Validate depart_date as YYYY-MM-DD and ensure tourist count equals adult_num + child_num.
- Never log or expose TUNIU_API_KEY or user PII (names, mobiles, ID numbers) in responses.
- Notify the user explicitly to click the returned paymentUrl to complete payment after a successful order.
- If authentication or protocol errors occur, retry or check the TUNIU_API_KEY and endpoint URL.
Example use cases
- User: "How much is the Nanjing Sun Yat-sen Mausoleum ticket?" — call query_cheapest_tickets and show a clear list of ticket types, prices, productId/resId.
- User needs to confirm passenger list and ticket count — validate counts and prompt for missing tourist details before ordering.
- Refresh product list when a long time passed since the last query to avoid using stale productId/resId.
FAQ
An environment that can execute shell commands and run curl (or an equivalent HTTP client) and has the TUNIU_API_KEY configured.
Where do product_id and resource_id come from?
They must come from the most recent query_cheapest_tickets response; do not use example or hard-coded values.
What should I tell the user after order creation?
Provide the orderId, the paymentUrl (https://m.tuniu.com/u/gt/order/{orderId}?orderType=75), travel date, ticket type, and instruct the user to click the link to complete payment.