Skip to main content
Glama

Ver promoções e cupons

get_promotions
Read-onlyIdempotent

O que está em promoção: items são produtos que a loja marcou como promoção (offer.promotional true; promoPrice é o preço promocional, quando a promoção é de preço), com o maior desconto primeiro; coupons são cupons que a loja deixou para os agentes usarem (kind PERCENT, FIXED ou FREE_SHIPPING, value, minSubtotal = compra mínima sem a entrega, maxDiscount, endsAt). Para usar um cupom, mande o code em couponCode no create_cart da mesma loja (storeId). O consumidor também pode ter um código próprio: mande do mesmo jeito. Para resultados que o consumidor consegue receber ou retirar, informe a localização: latitude e longitude (mais preciso) e/ou o CEP. storeId: só uma loja. radiusKm limita às lojas até essa distância do consumidor (ex.: postos num raio de 5 km, para acompanhar o preço da gasolina).

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "get_promotions"
  }
}

Input Schema

NameRequiredDescriptionDefault
limitNoMáximo de itens (1 a 50; padrão 20)
countryNoPaís do consumidor, código de 2 letras (ex.: BR, US, PT). Padrão: BR
storeIdNostoreId de uma loja (de get_offers), para ver só ela
latitudeNoLatitude do consumidor
radiusKmNoSó lojas até esta distância do consumidor, em km (0 a 100). Exige localização
longitudeNoLongitude do consumidor
postalCodeNoCódigo postal do consumidor (no Brasil, o CEP: ex.: 30140-010). De outro país, informe também country

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A3.9/5.0
Behavior4/5

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

Annotations already declare read-only, idempotent, non-destructive, closed-world behavior, so the low bar is met. The description adds genuinely useful behavior beyond them: results are sorted by largest discount first, coupons carry kind/value/minSubtotal/maxDiscount/endsAt, and location acts as a filter on which stores appear.

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

Conciseness3/5

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

Everything said is relevant, but it is delivered as one long run-on paragraph mixing result semantics, coupon redemption flow, and geolocation rules. The opening clause is well front-loaded, yet a reader must scan the whole block to find the coupon and location instructions.

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 7 optional parameters, no output schema, and full schema coverage, the description does the right additional work: it explains the domain meaning of items and coupons, how to redeem them, and how location shapes results. Only the result envelope (what a returned promotion/coupon object looks like when persisted) is left implicit.

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 coverage is 100%, so baseline is 3, but the description adds meaning above the schema: latitude/longitude are described as more precise than postal code, and radiusKm is illustrated with a concrete scenario (gas stations within 5 km). It restates some schema content (storeId = a single store) but the added semantics justify a 4.

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

Purpose4/5

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

The description states a specific resource and enumerates the two result families it returns (items = products the store flagged as promotional, coupons = store-issued coupons), which lets an agent distinguish it from get_offers or search_products. It never names a sibling as an alternative, so the differentiation is inferred rather than explicit.

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?

It gives concrete usage context: coupons must be forwarded as couponCode in create_cart of the same storeId, and location (lat/long preferred, and/or postal code) must be supplied to get results the consumer can receive or pick up. It does not state when to prefer this tool over get_offers or search_products, so no exclusions are provided.

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