Skip to main content
Glama

One2Trip

Scelta di un'alternativa

select_trip_option

Salva la scelta di un'alternativa di list_trip_options (volo, hotel di una tappa o auto) e ricalcola il totale con le stesse regole di quote_trip; nessuna ricerca nuova, non consuma quotazioni, non prenota nulla. Una sola camera per tappa. Restituisce il viaggio aggiornato (stessa forma di quote_trip) con changed, choices_left, car_note, link_note e link_until; booking_url non cambia. Chiamalo solo quando il cliente sceglie una riga di list_trip_options: quote_id, lo stesso type (con stop_index per gli hotel) e l'option_id della riga o di una sua other_fares. Poi mostra total e per_person_text (il totale a persona, così com'è) restituiti e ricordagli di aprire lo stesso booking_url entro link_until (30 minuti dalla quotazione) per ritrovare gli stessi prezzi. Al massimo 10 scelte per quotazione; scegliere l'opzione già attuale non cambia nulla e non consuma scelte. Con l'auto, prima di scegliere un volo con keeps_car false di' quanto cambia il solo volo (delta_flight) e che l'auto esce dal totale e si sceglie poi dal booking_url.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "quote_id": "<quote_id>",
      "type": "<type>",
      "option_id": "<option_id>"
    },
    "name": "select_trip_option"
  }
}

Input Schema

NameRequiredDescriptionDefault
typeYesLo stesso type di list_trip_options: flight, hotel (con stop_index) o car.
quote_idYesquote_id restituito da quote_trip.
option_idYesoptions[].option_id della riga scelta (o options[].other_fares[].option_id della tariffa scelta), così com'è in list_trip_options.
stop_indexNoSolo con type hotel: la tappa, da 0, la stessa di list_trip_options.

Output Schema

NameRequiredDescriptionDefault
carYesL'auto nel totale; null se non c'è (vedi car_status).
staysYesUn hotel per tappa, 1 camera per tutti i viaggiatori.
totalNoNuovo totale in euro per tutti i viaggiatori, tasse in hotel escluse; comprende l'auto solo con car_status found.
changedYesfalse = era già la scelta attuale: nulla è cambiato.
ferriesNo
car_noteNoSolo con flight_changed: cosa dire dell'auto.
currencyYesEUR.
quote_idYes
selectedYes
link_noteYesPromemoria per il cliente sul booking_url.
transportYesVolo; null con transport "none".
car_statusNoValori: found = auto nel totale; flight_changed = il volo scelto ha orari diversi, l'auto non è nel totale e si ricalcola sul sito; unavailable o error = nessuna auto nel totale; assente = auto non chiesta.
created_atYes
link_untilNoOrario entro cui aprire booking_url per ritrovare gli stessi prezzi: 30 minuti dalla quotazione, ora italiana (RFC 3339).
per_personYesTotale a persona in euro, al centesimo, come sul sito (1224.5 = € 1.224,50).
price_noteYesDa mostrare all'utente.
booking_urlYesLink di prenotazione: mostralo così com'è.
choices_leftYesScelte ancora possibili per questa quotazione.
per_person_textNoIl totale a persona già scritto come sul sito (per esempio «€ 1.224,50»): da dire così com'è.
preference_notesNoSolo con preferences: le voci per cui nessuna opzione trovata rispetta tutte le preferenze, con la più economica proposta al loro posto. Da riferire al cliente.
taxes_at_propertyNoTasse da pagare in hotel, in euro, non comprese in total.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.6/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations only say readOnlyHint=false and destructiveHint=false; the description adds what actually matters: it does not search again, does not consume quotes, does not book, booking_url is unchanged, and the price holds until link_until (30 minutes). The 10-choice limit and the no-op behavior of re-picking the current option are behavioral facts found nowhere else.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

One dense paragraph, front-loaded with purpose and exclusions before moving to return values and follow-up instructions. Every sentence carries operational content, though the block on what to tell the customer about car and flight could be split for easier scanning.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

An output schema already exists, yet the description still summarizes the notable return fields and the changed/choices_left semantics. It also covers the pre-call cross-reference to list_trip_options and the post-call instruction to surface total and per_person_text and remind about link_until, leaving nothing essential unstated for a mutating, quota-limited tool.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is already 100%, so the baseline is 3. The description earns one step above it by explaining the relationship between parameters across calls: quote_id from quote_trip, the same type as list_trip_options, stop_index only for hotels, and option_id taken either from the row or from one of its other_fares.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

Specific verb plus resource: 'Salva la scelta di un'alternativa di list_trip_options (volo, hotel di una tappa o auto) e ricalcola il totale'. It immediately distinguishes itself from siblings by naming list_trip_options as the source and quote_trip as the pricing rule, and by ruling out new searches and booking.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

'Chiamalo solo quando il cliente sceglie una riga di list_trip_options' gives an explicit trigger condition, and the definition covers edge cases: the same option changes nothing, a 10-choice cap applies, and for hotels the choice must carry the same stop_index. It doesn't name a fallback tool for a different situation, but the trigger is unambiguous.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources