# Google Hotels — `imprint-google-hotels`

> **One-shot compiled, proof of concept.** Every file in this directory was generated by a single `imprint teach google-hotels` run against **one** recorded browser session — no hand-written request code, parsers, or selectors. It is committed here as a proof of concept of what the compiler produces, not as a maintained integration.

A 4-tool MCP server for Google Hotels, compiled from a recording of a normal hotel search. Headless-claude differential audit: **91.7%** — every tool `liveVerified=true`.

## Tools

| Tool | What it does | Notes |
|---|---|---|
| `autocomplete_hotel_location` | Resolve a location query to a place token | |
| `search_hotels` | Search hotels (location, dates, guests, rating, price, amenities, class, sort, property type) | the star tool |
| `get_hotel_reviews` | Reviews for a hotel | **consumes** a `hotel_id` produced by `search_hotels` |
| `get_hotel_booking_options` | Booking/price options for a hotel | **consumes** a `location_context` produced by `search_hotels` |

## How it was compiled

- **Protocol**: Google's `batchexecute` endpoint returns a nested-array payload; the compiler reverse-engineered the decoder into `_shared/batchexecute.ts` + per-tool `parser.ts`, and the request shape into per-tool `request-transform.ts`.
- **Producer → consumer chaining**: `search_hotels` emits opaque ids that `get_hotel_reviews` / `get_hotel_booking_options` consume — the compiler detected the cross-tool token flow and wired it.
- **Anti-bot**: calls run on the **cdp-replay** rung (inside a live trusted Chrome) with a **stealth-fetch** fallback.
- **Artifacts per tool**: `workflow.json` (API replay), `playbook.yaml` (DOM fallback), `index.ts` (MCP tool), `parser.ts` + `request-transform.ts` (codecs).

## Install

```bash
imprint install google-hotels --source examples --platform claude-desktop
```

*Recording-derived defaults (dates, the recorded location) age out — pass explicit values. See the repo [README](../../README.md) and [docs](../../docs/architecture.md).*
