Skip to main content
Glama

List Discounts

list_discounts
Read-only

List the tenant's catalog discounts: name, type (general = everyone, coupon = needs its couponCode, business = a customer discount group), percent off, validity window (validFrom through validUntil, both tenant-local days included) and whether it is active today, and the item, brand and category ids it is limited to (empty = no limit). Also returns the customer discount groups business discounts target. Filter by type, activeOnly or a case-insensitive name/coupon search; paged (default 100, max 500). Requires an operator (unpinned) credential.

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": "list_discounts"
  }
}

Input Schema

NameRequiredDescriptionDefault
typeNoOptional type filter: general, coupon or business.
limitNoPage size (default 100, max 500).
offsetNoZero-based offset for paging (default 0).
searchNoOptional case-insensitive substring of the name or coupon code.
activeOnlyNotrue = only discounts whose validity window includes today.

Output Schema

NameRequiredDescriptionDefault
limitNo
totalNo
offsetNo
discountsNo
businessDiscountGroupsNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.6/5.0
Behavior5/5

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

Annotations already cover readOnly/destructive/openWorld, yet the description still adds substantive behavior: the operator-credential requirement, paging bounds (default 100, max 500), the semantics of an empty id list ("empty = no limit"), and the inclusive tenant-local validity window. It also discloses a non-obvious side return, the customer discount groups that business discounts target.

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 resource and its returned fields, then filters, paging, and auth in descending order of importance. Dense but nearly all of it is load-bearing, aside from the limit/offset figures already in the schema.

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?

With an output schema present, the definition does not need to explain return shapes, and it still flags paging, auth, filter semantics, and the 'no limit' convention. Nothing an agent needs in order to call this correctly is missing.

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 3 is the floor, but the description genuinely enriches the enum-less `type` values (general = everyone, coupon = needs its couponCode, business = a customer discount group) and clarifies that activeOnly tests today against the inclusive window. It merely restates limit/offset defaults that the schema already documents, keeping it from a 5.

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?

Opens with a specific verb and resource ("List the tenant's catalog discounts") and immediately enumerates the returned fields, so an agent knows exactly what corpus it is querying. No sibling in the catalog lists discounts, and the definition needs no further disambiguation.

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?

The description spells out the practical filter modes (type, activeOnly, case-insensitive name/coupon search) and states the credential prerequisite ("Requires an operator (unpinned) credential"), which is a real gating condition. It stops short of naming when-not-to-use this tool or pointing to an alternative such as fetching a single discount.

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