# Agent Instructions — TecnoMarket

You can browse products and prepare purchases at TecnoMarket's online store, https://www.tecnomarket.es, on your user's behalf. TecnoMarket is a Spanish online shop (informática, redes, TPV, videovigilancia, electrónica) with a physical store in Lloret de Mar (Girona). Content is in Spanish; prices are in EUR with Spanish VAT (IVA 21 %) included.

This store is **not** built on Shopify: it implements the [Universal Commerce Protocol](https://ucp.dev) (UCP) itself, over MCP, and registers WebMCP tools in its pages.

## UCP integration (MCP)

1. **Discover the store** — `GET https://www.tecnomarket.es/.well-known/ucp` returns its UCP profile: version, the `dev.ucp.shopping` service and its capabilities (`catalog.search`, `catalog.lookup`, `cart`, `checkout`).
2. **Connect** — MCP endpoint (Streamable HTTP, stateless, JSON responses, no authentication): `https://www.tecnomarket.es/api/ucp/mcp`. Send `initialize`, then `tools/list` to get the tools and their schemas.
3. **Shop** — Use the tools:
   - `search_catalog` — `{"catalog": {"query": "switch 24 puertos poe", "filters": {"price": {"max": 30000}, "in_stock": true}}}`
   - `lookup_catalog`, `get_product` — current price, stock, EAN, features and images.
   - `create_cart`, `get_cart`, `update_cart`, `cancel_cart` — `{"cart": {"line_items": [{"item": {"id": "539"}, "quantity": 2}]}}`
   - `create_checkout`, `get_checkout`, `update_checkout`, `cancel_checkout` — add the destination so shipping can be calculated:
     `{"checkout": {"line_items": [...], "fulfillment": {"methods": [{"type": "shipping", "destinations": [{"address_country": "ES", "postal_code": "17310"}]}]}}}`
   - `complete_checkout` — see *Payment and buyer handoff*.

Include `"meta": {"ucp-agent": {"profile": "<your agent profile URL>"}}` in every call. Amounts are integers in euro cents, VAT included (`price.amount: 999` = 9,99 €). `line_items` in an update replaces all lines.

## Payment and buyer handoff

This store does **not** accept payments or orders placed by agents. When a checkout reaches `status: "requires_escalation"` (products, destination and shipping are ready), give the buyer the `continue_url`. Opening it puts the prepared products in the buyer's own cart on the website, where they sign in or register, review the order and pay (card or Bizum through Redsys, or bank transfer). `complete_checkout` never creates an order; it returns the same `continue_url`.

Do not fill in login, address or payment forms on the buyer's behalf, and never ask the buyer for card details.

## Browser integration (WebMCP)

When working through a browser, the store's pages register WebMCP tools (`navigator.modelContext`) that act on the current browser session:

- `search_products` — search the catalogue.
- `get_product` — product details.
- `add_to_cart` — add a product (by id) to this browser's cart.
- `view_cart` — what is in this browser's cart.
- `go_to_checkout` — open the checkout page so the buyer can review and pay.

If these tools are unavailable, ask the buyer to continue in the browser. Do not script the cart or checkout forms.

## Interaction guidelines

- **Buyer authorization** — Only the buyer places orders and pays, on the website. Do not present a prepared checkout as a purchase.
- **Agent traffic** — Identify your requests as agent-initiated: a descriptive `User-Agent` and the `ucp-agent` profile in `meta`. [Web Bot Auth](https://datatracker.ietf.org/wg/webbotauth/about/) signatures are welcome.
- **Rate limits** — 120 MCP requests per minute per IP. Back off on `429` and respect `Retry-After`.
- **Freshness** — Stock and prices are synchronised with wholesalers every day (currently twice a day) and can change at any time. Check them again with `lookup_catalog` or `get_cart` before handing over.
- **Destinations** — Shipping zones and rates are in the shipping policy; the checkout tells you if a destination is not served.

## Read-only browsing

Prefer the structured information returned by the tools above. You may also read public HTML pages:

- Public URLs: [https://www.tecnomarket.es/sitemap.xml](https://www.tecnomarket.es/sitemap.xml).
- Catalogue: https://www.tecnomarket.es/tienda/catalogo (`?q=` to search, `?categoria=` to browse).
- Product pages: `https://www.tecnomarket.es/tienda/catalogo/tica/{id}-{slug}` (the `url` returned by the tools).
- Store summary for LLMs: https://www.tecnomarket.es/llms.txt

## Store policies

- **Privacidad**: https://www.tecnomarket.es/politica-privacidad
- **Condiciones de venta**: https://www.tecnomarket.es/condiciones-de-venta
- **Devoluciones y garantías** (14 días de desistimiento, 3 años de garantía legal): https://www.tecnomarket.es/devoluciones-y-garantias
- **Envíos**: https://www.tecnomarket.es/envios
- **Formas de pago**: https://www.tecnomarket.es/formas-de-pago
- **Contacto** (personas, teléfono y WhatsApp): https://www.tecnomarket.es/contacto

- Agent discovery: this document (`/agents.md`) is the canonical agent-facing description of the store.
