{"id":112000,"plugin_id":"plugin_asdk_app_69250fb6281c819195b52a1556b0060c","kind":"skill","collection_source":"plugin_package","comparison_source":null,"observed_at":"2026-11-24T00:11:13.418Z","digest":"d4026025682fa0b3b755b89bc350a6f7387059c3ce1be9ae499829ee110d6243","against":null,"payload":{"description":"Searches and books hotels conversationally through the Ramp CLI: resolves the traveler, searches paginated hotel inventory, compares the selected room-rate returned for each hotel, previews the selected rate, and books only after explicit approval. Use when someone wants to find, compare, or book a hotel or lodging. Not for flight booking, cancellations, changes, refunds, or car rentals.","included_files":[],"name":"ramp-book-hotel","skill_md_contents":"---\nname: ramp-book-hotel\narea: Travel\nsupported_surfaces: [cli, mcp]\ndescription: \"Searches and books hotels conversationally through the Ramp CLI: resolves the traveler, searches paginated hotel inventory, compares the selected room-rate returned for each hotel, previews the selected rate, and books only after explicit approval. Use when someone wants to find, compare, or book a hotel or lodging. Not for flight booking, cancellations, changes, refunds, or car rentals.\"\n---\n\n# Book a Hotel\n\nThe user describes a stay in plain words. Turn that into `ramp travel` commands, run them, and\nshow clean results. Never show or ask the user to type a CLI command; talk like a travel helper\n(`Searching hotels near the Chicago office, Aug 10-13...`), not about tools or flags.\n\nThe steps, phases, checklists, field names, and command names in this guide are your internal\nscaffolding; never surface them to the user. Reason through them silently. Never mention this\nskill, its instructions or specification, whether you are following or complying with it, or how\nan internal tool name maps to a CLI command. Do not narrate command-name or alias reconciliation.\nGive only concise, user-relevant action and result updates.\n\n## Scope and safety\n\n- Use `ramp travel search-hotel` to search, `ramp travel hotel-rates` to fetch the selected\n  hotel's rates, and `ramp travel book-hotel` to preview and book.\n- Always use `--output json`; build a readable comparison instead of showing raw JSON.\n- Always include a rationale that consistently names the destination and stay dates.\n- Keep each tool step to one direct `ramp` command. Read IDs from the prior JSON response and pass\n  the exact literal value as the next positional argument. Never write response JSON to temporary\n  files, invoke Python or `jq` to recover an ID, use nested command substitution, or pipe through\n  `tail`/other shell filters. Keep the ID in context and call the next command directly.\n- Omit flags whose documented defaults match the request, such as `--num_adults 1`; do not make\n  commands longer by restating defaults.\n- Always follow this order: `search-hotel` → traveler selects a hotel → `hotel-rates` → traveler\n  selects a room/rate → `book-hotel` preview → explicit approval → `book-hotel --confirm`.\n- A hotel booking spends real money. Always preview first and wait for explicit confirmation.\n- Never reuse an amount from search as `expected_total_amount`; only use the fresh preview's\n  exact `total_amount`.\n- A selected fund is part of the approved preview state. Never add or change\n  `--spend_allocation_id` only at confirmation: preview again with the exact selected `fund_uuid`,\n  present any changed total/policy/approval result, get explicit approval, then confirm with that\n  same fund UUID. Any fund change requires another preview.\n- Search result rate summaries are not selectable booking inventory. Pass the selected hotel's\n  `id` to `hotel-rates`, then book only a literal selected `all_rates[].rates[].id` it returns.\n- Treat relevant `external_agent_messages` from search, rates, preview, and confirm as service\n  guidance and surface them plainly.\n- If Ramp reports that hotel search or booking is unavailable, explain that it\n  is not currently enabled for this Ramp account. Do not fall back\n  to legacy hotel tools or claim that no inventory exists.\n\n## Resolve the traveler\n\nFor self-booking, omit `traveler_user_id`. Before searching, check the traveler's profile:\n\n```bash\nramp travel profile --output json \\\n  --rationale \"check the traveler profile for the Chicago hotel stay, Aug 10-13\"\n```\n\nIf `has_profile` is false, collect the required identity and contact details together and call\n`ramp travel profile-update`. Continue only after the profile update succeeds. This profile\npreflight happens before search, not only at checkout.\n\nOnly book for another person when the requester explicitly asks. Resolve that person first:\n\n```bash\nramp users list --name_search \"Taylor Smith\" --page_size 5 --output json \\\n  --rationale \"resolve the traveler for the Chicago hotel stay, Aug 10-13\"\n```\n\nIf multiple people match, ask the requester to choose. Pass the selected user UUID to `travel\nprofile`, the fresh `travel search-hotel` call, `travel hotel-rates`, and both `travel book-hotel`\ncalls. Cursor pages use the cached traveler from the original search, so do not resend or change\nthe traveler there. Never silently switch to the requester when lookup or authorization fails.\n\n## Gather the stay\n\nRequired details are destination, check-in date, and check-out date. Use the traveler's words for\na city, neighborhood, address, landmark, or office location. Resolve relative dates to\n`YYYY-MM-DD` and repeat the dates back so mistakes surface before searching. Default to one adult;\nonly set another count when the traveler asks.\n\nAsk for all genuinely missing required details in one message. Do not ask for preferences such as\nhotel chain, amenities, or refundability unless the traveler made them important.\n\n## Search hotels\n\n```bash\nramp travel search-hotel --output json \\\n  --location_query \"Chicago office\" \\\n  --check_in_date 2026-08-10 --check_out_date 2026-08-13 \\\n  --rationale \"search hotels for the Chicago stay, Aug 10-13\"\n```\n\nUse `--location_query` for the destination context (city, neighborhood, office, landmark, or\naddress). When the traveler asks for a specific property, also pass its exact name with\n`--hotel_name` while preserving the destination context.\n\n```bash\nramp travel search-hotel --output json \\\n  --location_query \"Lower Manhattan\" --hotel_name \"citizenM New York Bowery\" \\\n  --check_in_date 2026-08-10 --check_out_date 2026-08-13 \\\n  --rationale \"search for citizenM New York Bowery for the Manhattan stay, Aug 10-13\"\n```\n\nAdd `--traveler_user_id` only for delegated booking. Add `--num_adults` only when it differs from\none. The default page is ten hotels; `--limit` can request 1-10.\n\nWhen the traveler explicitly requests supported filtering or ordering, send one complete `--json`\nrequest because `filters` and `sort` are structured rather than standalone flags. Supported\nfilters are `star_ratings`, `brand_ids`, `amenity_ids`, and `min_review_rating`. Supported sort\nkeys are `DISTANCE`, `LOWEST_PRICE`, `TIME`, `WEIGHTED`, `MOST_POPULAR`, and `STAR_RATING`, with\n`ASC` or `DESC`. Do not invent brand or amenity IDs; omit criteria that cannot be represented with\nknown literal values. Preserve destination, dates, traveler, adult count, limit, hotel name, and\nrationale in the JSON body when applicable; omit adult count and limit when their defaults match.\n\n`next_cursor` is opaque. If the traveler wants more results, call search with that value unchanged\nas `--cursor` and a rationale; omit the original search fields because Ramp reads\nthe cached result. Preserve a non-default `--limit` when consistent page size matters. Append the\nnew hotels; never inspect, edit, synthesize, or reuse a cursor with a different search.\n\nUse `total_count` and the number displayed so the traveler knows when more results are available.\n\nAn empty `hotels` list means no matching inventory. Offer to adjust the location or dates. Surface\n`policy_summary` before the table when present; it is Ramp's authoritative summary of what this\ntraveler may book.\n\n## Present the hotel comparison\n\nSearch follows the Ramp web flow and returns zero or one selected/best room-rate for each hotel\ninside `rates`. It does **not** return every available room or rate. Render exactly one initial\ncomparison table. The full column order is:\n\n| # | Hotel | Rating | Chain | Nightly (pre-tax) | All-in total | Policy | Loyalty program | Notes |\n|---|-------|--------|-------|---------------------|--------------|--------|-----------------|-------|\n| 1 | Four Seasons Chicago | 5-star | Four Seasons | $245 USD | $812 USD | In policy | Four Seasons Preferred Partner | 12 min walk; Company preferred |\n\nPopulate it only from returned metadata:\n\n- Always show `#`, `Hotel`, `Rating`, `Nightly (pre-tax)`, `All-in total`, and `Policy`.\n- `Chain`, `Loyalty program`, and `Notes` are optional columns. Omit an optional column completely\n  when every row on the displayed page would be `-`. If at least one row has a meaningful value,\n  keep the column in the order above and use `-` for individual rows without a value.\n- **Rating:** use only `star_rating`, formatted as `4-star`, `5-star`, etc. Never show\n  `review_rating` values such as `9.4`.\n- **Chain:** show a real `chain` name such as `Four Seasons`. Render missing, blank, or placeholder\n  values such as `Default Chain` as `-`.\n- **Nightly (pre-tax):** show `nightly_amount` exactly as returned with `currency`. It is the base\n  nightly amount before taxes and fees, matching web's `/night` price.\n- **All-in total:** show `total_amount` exactly as returned. It is the full-stay total including\n  taxes and fees; never derive it by multiplying the nightly amount or add taxes/fees yourself.\n  Show `currency`.\n- **Policy:** keep it concise: `In policy`, `Out of policy: <short violation>`, or `-` when no\n  verdict is available. Trust the returned policy verdict and violations; do not infer policy from\n  or reverse-engineer it from displayed prices. Use `policy_summary` for broader policy context.\n- **Loyalty program:** show `loyalty_program` when present; otherwise show `-`. Do not replace a\n  missing program with generic eligibility or points-earning prose.\n- **Notes:** combine `office_travel_time_minutes` with `office_travel_mode` (for example,\n  `12 min walk`), `coworker_booking_count` when nonzero, and `Company preferred` when\n  `is_company_preferred=true`, separated by `; `. Show `-` when none is present. Do not call travel\n  time a distance. Use hotel `address` to disambiguate similar properties; mention relevant\n  `hotel_amenities` only when they match a stated preference.\n- If `rates=[]`, show `-` for price, policy, and loyalty cells and note `No current summary rate`.\n  Never index the first rate unless it exists; the traveler can still select the hotel and fetch\n  complete rates.\n- Keep a private display-number-to-hotel-`id` map. Never print hotel IDs unless asked.\n- Do not show a second room/rate table during this initial comparison. Do not show `room_name`,\n  `refundability`, or `cancellation_policy` yet; reserve them for the selected-hotel details.\n\nWait for the traveler to select a hotel option. If their choice is ambiguous, confirm the hotel,\nnightly amount, and all-in total. Do not preview or book the search result's summary rate.\n\n## Fetch and present selected-hotel rates\n\nCall `hotel-rates` with the literal hotel `id` from search and the same dates, adult count, and\ntraveler target:\n\n```bash\nramp travel hotel-rates \"<selected_hotel_id>\" --output json \\\n  --check_in_date 2026-08-10 --check_out_date 2026-08-13 \\\n  --rationale \"fetch current rooms and rates for the selected Chicago hotel, Aug 10-13\"\n```\n\nFor delegated booking, pass the same `--traveler_user_id`. Keep `--num_adults` consistent with\nsearch.\n\nRender one row for every returned `all_rates[].rates[]` option:\n\n| # | Room | Nightly (pre-tax) | All-in nightly | All-in total | Payment | Refundability | Cancellation | Policy | Loyalty | Notes |\n|---|------|---------------------|----------------|--------------|---------|---------------|--------------|--------|---------|-------|\n| 1 | Deluxe King | $245 USD | $271 USD | $812 USD | Pay later | Refundable | Free until Aug 8 | In policy | Four Seasons | Recommended; Company preferred |\n\n- Use the room group's `room_name`, `room_description`, and `room_amenities`. Mark a group as\n  recommended only when it also appears in `display_ui_recommended_cards`; do not infer\n  recommendations from list order or `best_rate`. `best_rate` is the lowest-total option within\n  that room group, not a global recommendation.\n- Show each rate's `nightly_amount`, `all_in_nightly_amount`, `total_amount`, `payment_type`,\n  `refundability`, and `cancellation_policy` when present. Show amount strings exactly as returned\n  and include the separate `currency` once; do not append it when the amount already includes it.\n- Keep policy concise in the table and surface full `policy_violations` when the traveler compares\n  or selects an out-of-policy rate.\n- For loyalty, show `loyalty_program` and `earns_loyalty_points` when relevant. Clearly flag\n  `loyalty_required=true` and stop before preview when `loyalty_eligible=false` until the\n  membership is corrected.\n- Put `is_company_preferred`, `is_corporate_rate`, and useful room amenities in Notes when\n  present. `has_corporate_rates` is context, not proof every rate is corporate.\n- Keep a private display-number-to-literal-rate-`id` map. Never use a room ID, hotel ID, or search\n  summary rate ID for booking.\n- Use top-level `hotel` metadata to reconfirm the selected property. `has_corporate_rates` is\n  hotel-level context, while each rate's `is_corporate_rate` identifies the actual corporate rate.\n\nThese rates are current options, not quotes. Wait for the traveler to select one exact room/rate;\nnever guess or default to the first or recommended row.\n\n## Preview the selected rate\n\nCall `book-hotel` without `--confirm`. Its positional values are the literal selected hotel ID\nfrom search and selected rate ID from `hotel-rates`. Pass the same stay dates used to fetch the\nrate:\n\n```bash\nramp travel book-hotel \"<selected_hotel_id>\" \"<selected_rate_id>\" --output json \\\n  --check_in_date 2026-08-10 --check_out_date 2026-08-13 \\\n  --rationale \"preview the selected Chicago hotel rate, Aug 10-13\"\n```\n\nFor delegated booking, pass the same `--traveler_user_id`. If Ramp says the rate expired or is\nmissing from cache, start a fresh `search-hotel`; if the rate mismatches the selected hotel or stay\ndates, call `hotel-rates` again for that hotel/current dates. Never retry an old rate or silently\nchoose another.\n\nThe preview is authoritative and may differ from the rates response. Present:\n\n- hotel, room, and stay dates\n- `nightly_rate` and exact all-in `total_amount`\n- `in_policy` and every `policy_violations` entry\n- `requires_approval` and each `approval_steps` entry\n- every `eligible_funds` option: `fund_name` and available balance/spending limit when present;\n  keep a private display-number-to-`fund_uuid` map rather than printing UUIDs\n- matching `loyalty_programs`: meaningful `display_name` and `loyalty_number` values that Ramp will\n  submit on confirm\n\nPresent funds without internal IDs:\n\n| # | Fund | Available balance | Spending limit |\n|---|------|-------------------|----------------|\n| 1 | Client Travel | $1,500 USD | $5,000 USD |\n\nKeep the display-number-to-`fund_uuid` map private. For loyalty memberships, show `display_name`\nand only the last four characters of `loyalty_number` unless the traveler explicitly asks for the\nfull saved number; never display `loyalty_program_id` or `logo` as text.\n\nCarry forward refundability, cancellation, and payment details from the selected rate. If that\nrate requires loyalty but the traveler is not eligible, stop before preview and ask them to\ncorrect the membership or choose another rate. Use preview `loyalty_programs` to verify which saved\nmatching membership Ramp will submit, rather than treating the rate's generic program name as\nproof of enrollment.\n\nIf the preview is out of policy, show every returned violation and ask why the traveler needs that\nrate. Keep their exact justification as `oop_reason`; Ramp requires `--oop_reason` on confirmation\nfor an out-of-policy quote and approvers see it. `reason` is a separate optional general booking\nnote; include `--reason` only when the traveler volunteered one.\n\nIf the traveler explicitly selected a known fund before preview, pass its UUID as\n`--spend_allocation_id`. Otherwise preview without a fund, present every eligible choice, and ask\nwhether to use one or request a new allocation. If they choose a returned fund, repeat the preview\nwith its literal `fund_uuid` as `--spend_allocation_id`, present any changed approval result, and\nget explicit approval of that final preview. Confirm with the same fund. Omitting the flag on\nconfirm requests a new allocation. Approval requirements come from `requires_approval` and\n`approval_steps` and can differ depending on fund selection.\n\nIf the traveler selected an existing trip, keep its literal UUID in context but do not send\n`--trip_id` during preview: Ramp only resolves it during confirm. A missing, invalid, or other-user\ntrip is ignored and Ramp auto-selects or creates one. Verify the resulting `trip_id`/`trip_name`\nafter booking when attachment matters. Omitting `--confirm` is the preview flow.\n\nFinish with an explicit confirmation question containing the hotel, room, dates, refundability,\ncancellation terms, all-in total, policy/approval state, matching loyalty membership, selected fund\nbehavior, and OOP justification when applicable. Stop and wait for a clear yes.\n\n## Confirm only after explicit approval\n\nUse the same hotel ID, rate ID, dates, traveler, and fund selection from the approved final preview.\nAdd `--confirm` and the preview's exact `total_amount`:\n\n```bash\nramp travel book-hotel \"<selected_hotel_id>\" \"<selected_rate_id>\" --confirm \\\n  --check_in_date 2026-08-10 --check_out_date 2026-08-13 \\\n  --expected_total_amount '<preview_total_amount>' --output json \\\n  --rationale \"book the selected Chicago hotel rate; traveler approved the preview\"\n```\n\nAdd optional confirmation flags only when applicable:\n\n- `--traveler_user_id '<traveler_uuid>'`: exact delegated traveler UUID used for fresh search,\n  rates, and preview.\n- `--spend_allocation_id '<fund_uuid>'`: exact private UUID for the fund selected from the final\n  preview; omit to request a new allocation.\n- `--trip_id '<trip_uuid>'`: exact existing trip UUID explicitly selected by the traveler; omit to\n  let Ramp auto-select or create a trip. This is the step where Ramp resolves it.\n- `--oop_reason '<traveler_justification>'`: exact justification collected after an out-of-policy\n  preview; required only when `in_policy=false`.\n- `--reason '<booking_note>'`: separate optional general note, only when volunteered by the\n  traveler. Never repurpose it as the OOP justification.\n\nKeep any collected OOP justification in context through a fund or price re-preview, but send it\nonly on confirmation. If the new preview changes policy violations materially, reconfirm that the\ntraveler's justification still applies.\n\nSingle-quote currency strings containing `$` so the shell does not expand them. Never normalize,\nreformat, or recalculate `expected_total_amount`.\n\nIf confirmation reports a changed total, do not book at the new price. Run a new preview, present\nthe new nightly/all-in amounts and any changed policy terms, then get explicit approval again. For\nmissing/expired cache mappings, start a fresh search; for hotel/date mismatches, fetch fresh rates\nfor the selected hotel/current dates. Treat feature-disabled errors separately from no results.\n\nOn a successful confirmation, present `booking.booking_request_id`, lowercase `booking.status`,\n`booking.total_amount`, and `booking.next_steps` before verification. Do not call the reservation\nconfirmed merely because `booked=true`.\n\n## Verify the booking request\n\nThe confirm response's `booked=true` means a booking request was created, not necessarily that the\nhotel is confirmed. Show the returned booking status and approval state accurately. Verify with:\n\n```bash\nramp travel bookings --output json \\\n  --rationale \"verify the Chicago hotel booking request, Aug 10-13\"\n```\n\nFor delegated booking, pass the same traveler UUID. The default call includes current/upcoming\nhotels, flights, and cars; inspect the hotel results and match using `hotel_name`, dates,\n`room_type`, and the most recent `booked_at`. Use returned `trip_id` and `trip_name` to verify trip\nattachment when needed.\n\nThe submit response's nested `booking.status` is lowercase (`pending_approval`, `approved`,\n`booked`, or `rejected`). The bookings response uses uppercase request/reservation states:\n\n- `CONFIRMED`: report the reservation as confirmed.\n- `PENDING_APPROVAL`: report that the request is awaiting approval, not booked.\n- `PROCESSING`: report that fulfillment is still processing and check again later.\n- `FAILED`: show `error_message` and address the stated issue before retrying.\n- `CANCELLED`: report that the request/reservation was cancelled.\n- `REJECTED`: report that the request was rejected.\n\nDefault bookings lookup excludes unsuccessful `FAILED`, `CANCELLED`, and `REJECTED` requests. Only\nrepeat it with `--include_failed` when diagnosing an explicitly unsuccessful attempt; do not use\nthat flag for normal post-confirm verification.\n\nFor cancellations, changes, or refunds, hand off to the Ramp web app; do not submit another booking.\n"},"changes":[],"summary":"First saved snapshot. No earlier version is available for comparison.","summary_kind":"deterministic","summary_metadata":{}}