Skip to main content
Glama

Best deals for a category

get_best_deals_by_category
Read-onlyIdempotent

Finds where to buy products from a shopping category with the most savings: returns the matching categories and, for each, the stores in it ranked by best current cashback rate, then best gift card discount. Use it when the user names a type of product or a category rather than a store or brand — 'where can I buy dog food with the biggest discount?', 'best cashback for electronics', 'travel booking sites with cashback'. For a specific retailer use get_cashback_rates_by_store_name; for a product brand use get_best_deals_by_brand. Returns up to 5 matching categories, best match first; empty when nothing matched. Rates reflect GotCashback's current data, refreshed several times a day. Always show each store's links to the user: best_cashback_rate.url (clickable link that activates the cashback) and gift_cards_url (where to buy the discounted gift cards).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
country_codeNoOptional. Lowercase ISO 3166-1 alpha-2 country code that limits results to one country, e.g. 'us' (United States), 'ca' (Canada), 'gb' (United Kingdom — use 'gb', not 'uk'), 'de' (Germany), 'au' (Australia), 'fr' (France). Pass it when the user names a country ('in Canada', 'UK cashback'); omit it to search all supported countries.
category_nameYesThe shopping category or product type, e.g. 'Pet Supplies', 'dog food', 'electronics', 'travel'. Matched case-insensitively at word boundaries of the category name and its alternate names, best match first; multi-word phrases fall back to matching individual words.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
matchesNoMatched brands / categories (up to 5, best match first). Empty when nothing matched.

Schema Changelog

Changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. Changed1 schema field changed
    • changedInput schema / properties / category_name / description
      Previous value: -"The shopping category or product type, e.g. 'Pet Supplies', 'dog food', 'electronics', 'travel'. Case-insensitive substring match; multi-word phrases fall back to matching individual words."New value: +"The shopping category or product type, e.g. 'Pet Supplies', 'dog food', 'electronics', 'travel'. Matched case-insensitively at word boundaries of the category name and its alternate names, best match first; multi-word phrases fall back to matching individual words."
  2. First observed

TDQS

A4.9/5.0
Behavior5/5

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

Annotations already declare readOnlyHint, idempotentHint, and destructiveHint, so the description does not need to repeat safety traits. Beyond the annotations, the description adds rich behavioral context: it discloses the return cap (up to 5 categories), the ordering rule (best match first), the empty result behavior, data freshness ('refreshed several times a day'), and a mandatory display instruction for the store links, all of which materially inform an agent's expectations.

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?

The description is long but information-dense, and every sentence contributes a distinct fact (purpose, usage examples, sibling differentiation, return limit, empty behavior, freshness, display requirement). There is minor redundancy — 'best current cashback rate' appears twice and the sibling differentiation is stated both in the purpose clause and again in the usage guidance — but this does not meaningfully harm clarity.

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?

Given the 2 parameters, 100% schema coverage, an output schema, and safety annotations, the description covers everything an agent needs: purpose, when to use vs. alternatives, return structure, ordering, limit, empty case, data freshness, and display obligations. No critical information is missing for correct invocation.

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

Parameters5/5

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

Schema coverage is 100% (both parameters have descriptions), and each description adds meaning far beyond the type. category_name explains matching behavior, case-insensitivity, word-boundary matching, and multi-word fallback; country_code explains the ISO 3166-1 alpha-2 format with examples, the 'gb not uk' caveat, when to pass it (user names a country) versus omit it (search all supported countries). The descriptions genuinely help an agent construct correct calls.

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?

The description states a specific verb ('Finds where to buy products') and identifies the exact resource (shopping category) and return format (matching categories with ranked stores). It also explicitly distinguishes the tool from its siblings by naming get_cashback_rates_by_store_name and get_best_deals_by_brand as alternatives, so an agent can disambiguate without opening other schemas.

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?

The description gives explicit 'when to use' guidance with concrete example queries ('where can I buy dog food with the biggest discount?', 'best cashback for electronics', 'travel booking sites with cashback'). It also provides an explicit 'when not to use' rule by naming the sibling tools to use for a specific retailer or brand, covering both positive and negative selection criteria.

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