Skip to main content
Glama

Check whether a promo code works

check_code
Read-only

Tests one promo code against a store's real cart right now, without buying anything, and says whether the store accepts it and how much it takes off. Use it for a code the shopper found somewhere else (a video, an email, a coupon site) before they rely on it. Pass the product page URL to test on that exact product. Works on Shopify stores; for other stores it answers could_not_check.

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": {
      "url": "<url>",
      "code": "<code>"
    },
    "name": "check_code"
  }
}

Input Schema

NameRequiredDescriptionDefault
urlYesProduct page URL or store domain, e.g. "https://ridge.com/products/wallet" or "ridge.com". A product URL lets codes be checked on that exact product.
codeYesThe promo code as written, e.g. "SAVE10"

Output Schema

NameRequiredDescriptionDefault
codeNo
nextNoSuggested next calls.
errorNo
savedNo
storeNo
reasonNo
statusNo"did_not_apply": the cart rejected it on the tested product; it may still work on other products or above a minimum spend
summaryYes
currencyNo
offer_idNo
tested_onNo
cart_totalNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.2/5.0
Behavior4/5

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

Adds real behavior beyond the annotations: the check runs against a live cart, nothing is purchased, and unsupported (non-Shopify) stores return could_not_check rather than failing. The live, non-idempotent nature is consistent with idempotentHint=false, but the description does not discuss rate limits or latency of a live cart probe.

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?

Four short sentences, front-loaded with what the tool does, followed by when to use it and the store limitation. Minimal waste, though phrases like 'right now' and 'without buying anything' are slightly redundant with each other.

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?

For a two-parameter tool with an output schema, the description covers purpose, trigger, input interpretation, and the failure mode for unsupported stores. Nothing an agent needs to call it correctly is missing.

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%, and the schema already explains both accepted URL forms and the code format. The description restates the product-URL behavior ('Pass the product page URL to test on that exact product') without adding new meaning beyond what the schema documents, 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 and resource ('Tests one promo code against a store's real cart') plus the outcome ('says whether the store accepts it and how much it takes off'). An agent knows exactly what this does and that it is a single-code, non-purchase check.

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?

Gives a clear trigger ('Use it for a code the shopper found somewhere else... before they rely on it') and a scope limit ('Works on Shopify stores; for other stores it answers could_not_check'). It does not name the sibling tools find_savings or report_outcome as alternatives, so routing between siblings is left slightly implicit.

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