Skip to main content
Glama

haggl_submit_offer

Request a quote using all context already available. Buyer data and evidence can be omitted; relevant additional context can be supplied later within the remaining rounds. Returns authorized terms or no offer, contextual guidance and permitted next actions.

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": {
      "session_id": "<session_id>"
    },
    "name": "haggl_submit_offer"
  }
}

Input Schema

NameRequiredDescriptionDefault
askNoWhat the buyer wants; the offer then says exactly which items the discount covers. Store catalogs: { items: [{ product_handle, quantity }] }. Campaign catalogs (catalog.type "campaign"): { items: [{ variant_id, quantity }] } or { recipe_id }, required for a campaign offer. Otherwise describe the product or service, e.g. { product }.
viaNoOptional, for a hotel's cashback agent: the referral code haggl.ai gave you, which earns you a referral fee on top of the traveler's cashback (tell your user you earn it), or your agent's or product's name.
dataNoOptional buyer context and consented evidence. Omit or use {} for an opening quote without evidence.
session_idYesSession id from haggl_start_negotiation or session.id from REST initialization.
shopper_locationNoOptional: where the user lives, as an ISO 3166-2 code such as "US-NY", or a country code such as "FR". haggl.ai adds a notice next to a personalized price where the law there asks for one.
expected_offer_versionNoOptional state.offer_version last read, to avoid submitting against a session changed by another actor.

Output Schema

NameRequiredDescriptionDefault
codeNoPresent only when the call failed: a machine-readable error code, e.g. quote_uncertain or rate_limited.
errorNoPresent only when the call failed: what went wrong.
offerNoThe merchant's offer for the requested items. Merchant engines may add fields.
roundNoThe round this quote answered.
stateNoCanonical negotiation state. Follow allowed_actions.
roundsNoEach round: the offer and when it was made.
statusNoSession status.
guidanceNoWhat this merchant values, as contextual guidance. Evidence is optional.
recoveryNoWhen the outcome is uncertain: the tool and session_id to read before retrying.
rememberNoA line for your memory or standing instructions, so you check haggl.ai before the user's next purchase. Ask the user; save it only if they say yes.
retryableNoWhether the same call may be retried.
vendor_idNoVendor id.
created_atNoISO 8601 time the session started.
expires_atNoISO 8601 time the session expires.
max_roundsNoMost quote rounds in this session.
next_stepsNoAfter acceptance: how the buyer redeems the offer (checkout_url, coupon_code, reference, inquiry_url, call_url, expires_at, …). From a hotel's agent: reference_code for the booking's special requests, book_at and the claim steps.
session_idNoNegotiation session id.
current_offerNoThe merchant's offer for the requested items. Merchant engines may add fields.
current_roundNoRounds used.
data_feedbackNoWhich context fields were used, and which could improve the offer.
accepted_offerNoThe merchant's offer for the requested items. Merchant engines may add fields.
context_receivedNoThe buyer context fields received so far and their provenance.
rounds_remainingNoRounds left.
retry_after_secondsNoWhen rate limited: seconds to wait before retrying.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed9 schema fields changed
    • changedOutput schema / properties / accepted_offer / properties / perks / description
      Previous value: -"From a merchant that closes by phone: what the offer includes besides the discount. Accepting writes them into the deal the merchant honors."New value: +"From a local service: what the offer includes besides the discount. Accepting writes them into the deal the merchant honors."
    • changedOutput schema / properties / accepted_offer / properties / valid_until / description
      Previous value: -"ISO 8601 time the offer expires. Absent once a phone deal is accepted: haggl.ai sets no expiry on its reference."New value: +"ISO 8601 time the offer expires. Absent once a local service's deal is accepted: haggl.ai sets no expiry on its reference."
    • changedOutput schema / properties / current_offer / properties / perks / description
      Previous value: -"From a merchant that closes by phone: what the offer includes besides the discount. Accepting writes them into the deal the merchant honors."New value: +"From a local service: what the offer includes besides the discount. Accepting writes them into the deal the merchant honors."
    • changedOutput schema / properties / current_offer / properties / valid_until / description
      Previous value: -"ISO 8601 time the offer expires. Absent once a phone deal is accepted: haggl.ai sets no expiry on its reference."New value: +"ISO 8601 time the offer expires. Absent once a local service's deal is accepted: haggl.ai sets no expiry on its reference."
    • changedOutput schema / properties / next_steps / description
      Previous value: -"After acceptance: how the buyer redeems the offer (checkout_url, coupon_code, reference, expires_at, …). From a hotel's agent: reference_code for the booking's special requests, book_at and the claim steps."New value: +"After acceptance: how the buyer redeems the offer (checkout_url, coupon_code, reference, inquiry_url, call_url, expires_at, …). From a hotel's agent: reference_code for the booking's special requests, book_at and the claim steps."
    • changedOutput schema / properties / offer / properties / perks / description
      Previous value: -"From a merchant that closes by phone: what the offer includes besides the discount. Accepting writes them into the deal the merchant honors."New value: +"From a local service: what the offer includes besides the discount. Accepting writes them into the deal the merchant honors."
    • changedOutput schema / properties / offer / properties / valid_until / description
      Previous value: -"ISO 8601 time the offer expires. Absent once a phone deal is accepted: haggl.ai sets no expiry on its reference."New value: +"ISO 8601 time the offer expires. Absent once a local service's deal is accepted: haggl.ai sets no expiry on its reference."
    • changedOutput schema / properties / state / properties / acceptance_summary / description
      Previous value: -"Only for a merchant that closes by phone: what accepting does, in plain words."New value: +"Only for a local service (vendor.local_service): what accepting does, in plain words."
    • changedOutput schema / properties / state / properties / offer_expires_at / description
      Previous value: -"ISO 8601 time the current offer expires; null once a phone deal is accepted, since haggl.ai sets no expiry on its reference."New value: +"ISO 8601 time the current offer expires; null once a local service's deal is accepted, since haggl.ai sets no expiry on its reference."
  2. Changed1 schema field changed
    • addedOutput schema / properties / remember
      Added value: +{
      +  "description": "A line for your memory or standing instructions, so you check haggl.ai before the user's next purchase. Ask the user; save it only if they say yes.",
      +  "properties": {
      +    "how": {
      +      "description": "How to offer it.",
      +      "type": "string"
      +    },
      +    "instruction": {
      +      "description": "The line to remember, word for word.",
      +      "type": "string"
      +    }
      +  },
      +  "type": "object"
      +}
  3. Changed11 schema fields changed
    • addedInput schema / properties / via
      Added value: +{
      +  "description": "Optional, for a hotel's cashback agent: the referral code haggl.ai gave you, which earns you a referral fee on top of the traveler's cashback (tell your user you earn it), or your agent's or product's name.",
      +  "type": "string"
      +}
    • addedOutput schema / properties / accepted_offer / properties / cashback_pct
      Added value: +{
      +  "description": "From a hotel's agent: cashback in percent of the booking total, booking on the hotel's own website (book_at)."
      +}
    • addedOutput schema / properties / accepted_offer / properties / offer_type
      Added value: +{
      +  "description": "\"cashback\" from a hotel's agent: haggl.ai pays cashback_pct of the booking total after the stay, instead of a discount."
      +}
    • addedOutput schema / properties / accepted_offer / properties / ota_cashback_pct
      Added value: +{
      +  "description": "From a hotel's agent: the cashback when booking through a travel site (half)."
      +}
    • addedOutput schema / properties / current_offer / properties / cashback_pct
      Added value: +{
      +  "description": "From a hotel's agent: cashback in percent of the booking total, booking on the hotel's own website (book_at)."
      +}
    • addedOutput schema / properties / current_offer / properties / offer_type
      Added value: +{
      +  "description": "\"cashback\" from a hotel's agent: haggl.ai pays cashback_pct of the booking total after the stay, instead of a discount."
      +}
    • addedOutput schema / properties / current_offer / properties / ota_cashback_pct
      Added value: +{
      +  "description": "From a hotel's agent: the cashback when booking through a travel site (half)."
      +}
    • changedOutput schema / properties / next_steps / description
      Previous value: -"After acceptance: how the buyer redeems the offer (checkout_url, coupon_code, reference, expires_at, …)."New value: +"After acceptance: how the buyer redeems the offer (checkout_url, coupon_code, reference, expires_at, …). From a hotel's agent: reference_code for the booking's special requests, book_at and the claim steps."
    • addedOutput schema / properties / offer / properties / cashback_pct
      Added value: +{
      +  "description": "From a hotel's agent: cashback in percent of the booking total, booking on the hotel's own website (book_at)."
      +}
    • addedOutput schema / properties / offer / properties / offer_type
      Added value: +{
      +  "description": "\"cashback\" from a hotel's agent: haggl.ai pays cashback_pct of the booking total after the stay, instead of a discount."
      +}
    • addedOutput schema / properties / offer / properties / ota_cashback_pct
      Added value: +{
      +  "description": "From a hotel's agent: the cashback when booking through a travel site (half)."
      +}
  4. Changed4 schema fields changed
    • addedInput schema / properties / shopper_location
      Added value: +{
      +  "description": "Optional: where the user lives, as an ISO 3166-2 code such as \"US-NY\", or a country code such as \"FR\". haggl.ai adds a notice next to a personalized price where the law there asks for one.",
      +  "type": "string"
      +}
    • changedOutput schema / properties / accepted_offer / properties / algorithmic_price_disclosure / description
      Previous value: -"Show this to the buyer word for word, next to the price."New value: +"For a buyer in New York: show this to them word for word, next to the price."
    • changedOutput schema / properties / current_offer / properties / algorithmic_price_disclosure / description
      Previous value: -"Show this to the buyer word for word, next to the price."New value: +"For a buyer in New York: show this to them word for word, next to the price."
    • changedOutput schema / properties / offer / properties / algorithmic_price_disclosure / description
      Previous value: -"Show this to the buyer word for word, next to the price."New value: +"For a buyer in New York: show this to them word for word, next to the price."
  5. Changed6 schema fields changed
    • changedOutput schema / properties / accepted_offer / properties / valid_until / description
      Previous value: -"ISO 8601 time the offer expires."New value: +"ISO 8601 time the offer expires. Absent once a phone deal is accepted: haggl.ai sets no expiry on its reference."
    • changedOutput schema / properties / current_offer / properties / valid_until / description
      Previous value: -"ISO 8601 time the offer expires."New value: +"ISO 8601 time the offer expires. Absent once a phone deal is accepted: haggl.ai sets no expiry on its reference."
    • changedOutput schema / properties / offer / properties / valid_until / description
      Previous value: -"ISO 8601 time the offer expires."New value: +"ISO 8601 time the offer expires. Absent once a phone deal is accepted: haggl.ai sets no expiry on its reference."
    • addedOutput schema / properties / state / properties / acceptance_summary
      Added value: +{
      +  "description": "Only for a merchant that closes by phone: what accepting does, in plain words.",
      +  "type": "string"
      +}
    • changedOutput schema / properties / state / properties / offer_expires_at / description
      Previous value: -"ISO 8601 time the current offer expires."New value: +"ISO 8601 time the current offer expires; null once a phone deal is accepted, since haggl.ai sets no expiry on its reference."
    • changedOutput schema / properties / state / properties / offer_expires_at / type
      Previous value: -"string"New value: +[
      +  "string",
      +  "null"
      +]
  6. Changed3 schema fields changed
    • addedOutput schema / properties / accepted_offer / properties / perks
      Added value: +{
      +  "description": "From a merchant that closes by phone: what the offer includes besides the discount. Accepting writes them into the deal the merchant honors."
      +}
    • addedOutput schema / properties / current_offer / properties / perks
      Added value: +{
      +  "description": "From a merchant that closes by phone: what the offer includes besides the discount. Accepting writes them into the deal the merchant honors."
      +}
    • addedOutput schema / properties / offer / properties / perks
      Added value: +{
      +  "description": "From a merchant that closes by phone: what the offer includes besides the discount. Accepting writes them into the deal the merchant honors."
      +}
  7. Changed6 schema fields changed
    • addedOutput schema / properties / accepted_offer / properties / algorithmic_price_disclosure
      Added value: +{
      +  "description": "Show this to the buyer word for word, next to the price."
      +}
    • changedOutput schema / properties / accepted_offer / properties / personalized_price_notice / description
      Previous value: -"Show this to the buyer word for word with the offer."New value: +"Show this to the buyer word for word, next to the price."
    • addedOutput schema / properties / current_offer / properties / algorithmic_price_disclosure
      Added value: +{
      +  "description": "Show this to the buyer word for word, next to the price."
      +}
    • changedOutput schema / properties / current_offer / properties / personalized_price_notice / description
      Previous value: -"Show this to the buyer word for word with the offer."New value: +"Show this to the buyer word for word, next to the price."
    • addedOutput schema / properties / offer / properties / algorithmic_price_disclosure
      Added value: +{
      +  "description": "Show this to the buyer word for word, next to the price."
      +}
    • changedOutput schema / properties / offer / properties / personalized_price_notice / description
      Previous value: -"Show this to the buyer word for word with the offer."New value: +"Show this to the buyer word for word, next to the price."
  8. First observed

TDQS

B3.2/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=false and non-idempotent, yet the description never warns that a retry could create a duplicate submission, which is the highest-risk behavior here. It does add value by revealing that a submission consumes one of a limited number of rounds and that the response can be either authorized terms or no offer plus guidance, but that return information is largely duplicated by the output schema. The round-scarcity detail is the main genuinely new behavior disclosed.

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?

Three short sentences, front-loaded with the core action and with no filler or hedging. Every sentence carries some information, though the final sentence overlaps with what the output schema already provides.

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

Completeness4/5

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

With annotations, a 100%-covered schema and an output schema, the description only needs to frame the negotiation-round semantics, and it does so by explaining that context can be supplied incrementally across remaining rounds. The absence of any non-idempotency caution is the remaining gap for a stateful, non-idempotent submission tool. Otherwise an agent has enough to call it correctly.

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

Parameters3/5

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

Schema description coverage is 100%, including the nested ask object and the round-tracking expected_offer_version, so the schema carries essentially all parameter meaning. The description only adds the lightweight claim that the data/evidence parameter can be omitted or empty for an opening quote, which is marginal and partly restated in the schema. Baseline 3 is appropriate.

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

Purpose3/5

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

The description states the action as "Request a quote using all context already available," which matches the title but never uses the verb "submit offer" from the tool name, so an agent has to reconcile the naming mismatch. It also does not distinguish this tool from siblings in the negotiation workflow such as haggl_accept_offer or haggl_get_my_offers. The purpose is inferable but not sharp.

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

Usage Guidelines3/5

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

The description implies this is a per-round submission ("relevant additional context can be supplied later within the remaining rounds") and that buyer data may be omitted, which gives some when-to-use context. However, it never names an alternative tool or states the condition for calling this versus haggl_accept_offer or haggl_get_negotiation. Usage is suggested rather than spelled out.

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