Book train tickets for a trip

The best trains for your times, with the cheapest fare and seats. The booking waits for your approval.

  • You start it: When you start it
  • Asks you first

What it does

The task

Search Trainline and the website of the national rail company for trains from origin to destination at this time: when, for travelers, with their discount cards. Compare the fares, the number of changes and the change times, and skip connections with less than 10 minutes to change. Give me the 3 best options with the times, the fare type, the price and whether a seat reservation is included. Ask me before you book. Then save the tickets as PDFs to my Google Drive folder Trips, and send me the car and seat numbers.

  • It works in Trainline, any booking site and Google Drive, in the workspace you pick, and signs in with passwords from your Cuiar vault.
  • It runs once, when you start it.
  • It stops for your approval before it sends, posts, pays, books or changes a record.

What you give it

BlankWhat to giveExample
originThe city or station you leave fromMunich
destinationThe city or station you travel toParis
whenThe date and the time window to leaveSat 12 December, leave between 7:00 and 11:00
travelersWho travels, with discount cards2 adults with a BahnCard 25

What you get back

An example run with the example values above. Your run uses your own data.

Munich to Paris, Sat 12 Dec, 2 adults with a BahnCard 25

1. 7:20 to 13:05, directSaver fare, no refund2 x 69.90 EURseats included
2. 9:28 to 16:10, 1 change in Stuttgart (24 min)Flex fare2 x 112.40 EURseats 4.90 EUR each
3. 10:44 to 17:12, 1 change in Karlsruhe (31 min)Saver fare2 x 79.90 EURseats included

Booked option 1 after your approval: car 12, seats 45 and 46

Tickets: Trips/2026-12-12 Munich-Paris.pdf

Run it in Cuiar

  1. 01

    Open it

    Click Use in Cuiar on this page. The side panel opens with the task in the composer.

  2. 02

    Fill in 4 blanks

    Type origin, destination, when and travelers. Tab moves to the next blank.

  3. 03

    Run it

    Run sends it to the agent. Follow each step in the panel, and stop it at any time.

From the terminal

cuiar exec "Search Trainline and the website of the national rail company for trains from Munich to Paris at this time: Sat 12 December, leave between 7:00 and 11:00, for 2 adults with a BahnCard 25, with their discount cards. Compare the fares, the number of changes and the change times, and skip connections with less than 10 minutes to change. Give me the 3 best options with the times, the fare type, the price and whether a seat reservation is included. Ask me before you book. Then save the tickets as PDFs to my Google Drive folder Trips, and send me the car and seat numbers."

Run it from your AI agent

Claude Code, Codex, Cursor and other MCP clients reach Cuiar at https://mcp.cuiar.com/mcp. Add the server one time, then ask for the task in plain words, or call run_task yourself.

1. Add Cuiar to Claude Code

claude mcp add --transport http cuiar https://mcp.cuiar.com/mcp

2. Ask your agent

Use the Cuiar tool run_task to run my "Book train tickets for a trip" template with origin = Munich; destination = Paris; when = Sat 12 December, leave between 7:00 and 11:00; travelers = 2 adults with a BahnCard 25.

Setup for other agents: AI agents.

The tool call

{
  "name": "run_task",
  "arguments": {
    "task": "Search Trainline and the website of the national rail company for trains from Munich to Paris at this time: Sat 12 December, leave between 7:00 and 11:00, for 2 adults with a BahnCard 25, with their discount cards. Compare the fares, the number of changes and the change times, and skip connections with less than 10 minutes to change. Give me the 3 best options with the times, the fare type, the price and whether a seat reservation is included. Ask me before you book. Then save the tickets as PDFs to my Google Drive folder Trips, and send me the car and seat numbers."
  }
}
All travel templates
  • TravelAsks first

    Book timed-entry tickets for an attraction

    Entry slots from the official ticket site only, booked after your approval, with the tickets saved.

    You start it: When you start it
    • Any booking site
    • Google Drive
  • Travel

    Find a weekend trip within my budget

    Five places you can reach for a weekend, with the total for travel and hotel and the forecast.

    You start it: When you start it
    • Google Flights
    • Trainline
    • Booking.com
  • TravelAsks first

    Check in online for my flight

    Check-in when it opens, the seat you like, and the boarding pass saved. Paid extras wait for you.

    On an event: When online check-in opens for a flight in your calendar
    • Google Calendar
    • Any airline site
    • Google Drive
  • Sales

    Answer an RFP or a security questionnaire

    A draft answer for each question from your own documents, with the source and the gaps marked.

    You start it: When you start it
    • Google Sheets
    • Confluence
    • Google Drive
  • OpsAsks first

    Remove a former employee's access to your tools

    Every account the person still has, closed after your approval, with their files moved to a new owner.

    You start it: When you start it
    • Any admin panel
    • Google Drive
    • Slack
    • +1 more: GitHub
  • Ops

    List renewal dates from your vendor contracts

    End date, notice period and auto-renewal of each contract in a sheet, the next deadline first.

    You start it: When you start it
    • Google Drive
    • DocuSign
    • Google Sheets