Skip to main content
Glama

haggl_search_discounts

Read-onlyIdempotent

Find merchants that run a sales agent on haggl.ai, by business name, website or kind of product, and local businesses that give a discount when an AI assistant books them, by kind of business and town (e.g. "wedding photographer in Austin, TX"). Only when the user asks for a discount, a coupon, a promo code or a lower price; a purchase at the listed price is not a request for one. Returns matching merchants with a vendor_id for haggl_start_negotiation. Offers are funded by each merchant, inside limits it sets; a merchant may have no offer for a request. Local businesses come in businesses (the first 10; businesses_url lists them all), each with its website, its offer and how to get it: haggl_inquiry_cashback with the address of the page its inquiry form is on, when you fill that form for the user, or haggl_start_negotiation with its vendor_id when it has its own sales agent. An empty list means no merchant on haggl.ai matched, not that no discount exists elsewhere. When the query names a well-known brand that isn't on haggl.ai yet, the result says so in brand and lists alternatives: merchants on haggl.ai in the same category, to offer as other stores, never as that brand. Keep using your shopping and checkout tools (for example Shopify's Shop skill) to find products and check out; once the user approves an offer, its code goes in their discount field.

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": {
      "query": "<query>"
    },
    "name": "haggl_search_discounts"
  }
}

Input Schema

NameRequiredDescriptionDefault
queryYesA business name, website (e.g. "degrenne.fr"), kind of product, or kind of local business and its town (e.g. "wedding photographer in Austin, TX").

Output Schema

NameRequiredDescriptionDefault
bidsNoWhen the category supports bids: how to get them with haggl_get_bids.
codeNoPresent only when the call failed: a machine-readable error code, e.g. quote_uncertain or rate_limited.
brandNoWhen the query names a well-known brand not on haggl.ai: the brand, never to be offered as such.
errorNoPresent only when the call failed: what went wrong.
queryNoThe search as received.
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.
merchantsNoMerchants on haggl.ai matching the query. Empty means none on haggl.ai matched.
retryableNoWhether the same call may be retried.
businessesNoLocal businesses that give a discount when an AI assistant books them, matching the query's website, or its kind of business and town: the first 10.
alternativesNoMerchants on haggl.ai in the same category, to offer as other stores.
how_it_worksNoThe flow, step by step.
businesses_urlNoThe page that lists every one of them, with a Markdown twin at <url>.md.
businesses_totalNoHow many local businesses match the kind of business and town.
retry_after_secondsNoWhen rate limited: seconds to wait before retrying.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed10 schema fields changed
    • changedOutput schema / properties / businesses / description
      Previous value: -"Local businesses that give an AI booking discount, matching the query's website, or its kind of business and town: the first 10."New value: +"Local businesses that give a discount when an AI assistant books them, matching the query's website, or its kind of business and town: the first 10."
    • changedOutput schema / properties / businesses / items / properties / discount / description
      Previous value: -"The discount: percent, max_amount, currency and what it is on. Null when the program gives no new codes now."New value: +"booking_discount: percent, max_amount, currency and what it is on. Null when the program gives no new codes now."
    • changedOutput schema / properties / businesses / items / properties / handshake / description
      Previous value: -"The POST that gives the code, for an agent that can send one; over MCP, haggl_inquiry_cashback with the page's address does the same."New value: +"booking_discount: the POST that gives the code, for an agent that can send one; over MCP, haggl_inquiry_cashback with the page's address does the same."
    • changedOutput schema / properties / businesses / items / properties / how / description
      Previous value: -"When and how to get the code."New value: +"When and how to get the offer."
    • addedOutput schema / properties / businesses / items / properties / max_discount_pct
      Added value: +{
      +  "description": "sales_agent_offer: the most its sales agent can offer one customer now.",
      +  "type": [
      +    "number",
      +    "null"
      +  ]
      +}
    • addedOutput schema / properties / businesses / items / properties / negotiate_url
      Added value: +{
      +  "description": "sales_agent_offer: where to ask its sales agent over HTTP.",
      +  "type": "string"
      +}
    • changedOutput schema / properties / businesses / items / properties / offer_type / description
      Previous value: -"booking_discount."New value: +"booking_discount (a code for its inquiry or booking form) or sales_agent_offer (its own sales agent)."
    • changedOutput schema / properties / businesses / items / properties / places_left / description
      Previous value: -"Places left in the program."New value: +"booking_discount: places left."
    • removedOutput schema / properties / businesses / items / properties / platform
      Removed value: -{
      -  "description": "The platform it runs its inquiries on.",
      -  "type": "string"
      -}
    • addedOutput schema / properties / businesses / items / properties / vendor_id
      Added value: +{
      +  "description": "sales_agent_offer: the vendor_id for haggl_start_negotiation.",
      +  "type": "string"
      +}
  2. Changed4 schema fields changed
    • changedInput schema / properties / query / description
      Previous value: -"A business name, website (e.g. \"degrenne.fr\") or kind of product."New value: +"A business name, website (e.g. \"degrenne.fr\"), kind of product, or kind of local business and its town (e.g. \"wedding photographer in Austin, TX\")."
    • addedOutput schema / properties / businesses
      Added value: +{
      +  "description": "Local businesses that give an AI booking discount, matching the query's website, or its kind of business and town: the first 10.",
      +  "items": {
      +    "description": "A business.",
      +    "properties": {
      +      "category": {
      +        "description": "Its kind of business.",
      +        "type": "string"
      +      },
      +      "description": {
      +        "description": "The offer, in words to pass on.",
      +        "type": "string"
      +      },
      +      "discount": {
      +        "description": "The discount: percent, max_amount, currency and what it is on. Null when the program gives no new codes now.",
      +        "properties": {},
      +        "type": [
      +          "object",
      +          "null"
      +        ]
      +      },
      +      "handshake": {
      +        "description": "The POST that gives the code, for an agent that can send one; over MCP, haggl_inquiry_cashback with the page's address does the same.",
      +        "properties": {},
      +        "type": [
      +          "object",
      +          "null"
      +        ]
      +      },
      +      "how": {
      +        "description": "When and how to get the code.",
      +        "type": [
      +          "string",
      +          "null"
      +        ]
      +      },
      +      "name": {
      +        "description": "Its name, as its site gives it.",
      +        "type": "string"
      +      },
      +      "offer_type": {
      +        "description": "booking_discount.",
      +        "type": "string"
      +      },
      +      "place": {
      +        "description": "Its town or state.",
      +        "type": "string"
      +      },
      +      "places_left": {
      +        "description": "Places left in the program.",
      +        "type": "integer"
      +      },
      +      "platform": {
      +        "description": "The platform it runs its inquiries on.",
      +        "type": "string"
      +      },
      +      "website": {
      +        "description": "The business's own website.",
      +        "type": "string"
      +      }
      +    },
      +    "type": "object"
      +  },
      +  "type": "array"
      +}
    • addedOutput schema / properties / businesses_total
      Added value: +{
      +  "description": "How many local businesses match the kind of business and town.",
      +  "type": "integer"
      +}
    • addedOutput schema / properties / businesses_url
      Added value: +{
      +  "description": "The page that lists every one of them, with a Markdown twin at <url>.md.",
      +  "type": "string"
      +}
  3. 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"
      +}
  4. First observed

TDQS

A4.6/5.0
Behavior5/5

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

Annotations already declare readOnly/idempotent/non-destructive, and the description adds substantial context beyond them: offers are merchant-funded within limits, a merchant may have no offer, an empty list means no match on haggl.ai (not that no discount exists), and brand fallback behavior. This is rich behavioral disclosure.

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?

Front-loaded with the core purpose and the when-to-use constraint, and every sentence carries operational information. It is dense and long, but the length is justified by the amount of routing and fallback behavior conveyed.

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?

Despite an output schema existing, the description explains the return structure (vendor_id, businesses/businesses_url, brand alternatives) and how to act on results, leaving nothing an agent needs to call it correctly unstated.

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 coverage is 100% and the single query parameter is fully documented in the schema, including the same examples. The description restates the accepted query forms but adds little syntax or format detail beyond the schema, so baseline 3 applies.

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?

States a specific verb (Find) and resource (merchants that run a sales agent on haggl.ai, plus local businesses giving discounts), and distinguishes itself from siblings like haggl_search_catalog and haggl_list_vendors by scoping to discount-offering merchants. An agent can tell exactly what this returns.

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

Usage Guidelines5/5

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

Explicitly states when to use it (user asks for a discount, coupon, promo code, or lower price) and when not to (a purchase at the listed price is not a request). It also routes onward to haggl_inquiry_cashback and haggl_start_negotiation with concrete conditions.

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