Skip to main content
Glama

How each discount code did

coupon_stats
Read-only

Each discount code's paid orders over the last N days: how many times it was used, the revenue from those orders, the discount it gave away and the average order. Codes nobody used are listed too. Real orders only.

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

Input Schema

NameRequiredDescriptionDefault
daysNoHow many days back. Use 0 for all time. Default 90.
accountNoOnly to work in a client's account: its id from list_accounts. Leave it out for your own account.
productNoOptional: one checkout's id or slug. Default: every checkout.

Schema Changelog

Changes observed during successful MCP inspections.

No schema history has been recorded yet.

TDQS

A4.1/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true, destructiveHint=false, and openWorldHint=false, so the safety profile is covered. The description adds meaningful behavior beyond that: zero-use codes are included, only real/paid orders count, and the metrics are defined in terms of paid orders. It leaves date attribution and currency unspecified, but with annotations the bar is lower.

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

Conciseness5/5

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

Front-loads the resource and purpose, enumerates metrics in one efficient sentence, then closes with two short scoping fragments. There is no redundant or filler wording.

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 read-only analytics tool with three fully documented parameters and no output schema, the description supplies enough detail to understand what is returned and how to invoke it correctly. The metric list and scoping notes cover the essential gaps.

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%, so days, account, and product are fully documented in the schema. The description only restates the last-N-days window and does not add syntax, defaults, or meaning beyond what the schema provides. Baseline 3 is appropriate.

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 reporting purpose: per-discount-code paid order statistics over the last N days. It enumerates the exact metrics returned (uses, revenue, discount given, average order), which clearly distinguishes it from list_coupons or create_coupon.

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

Usage Guidelines3/5

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

The description implies use for reviewing coupon performance but does not explicitly state when to prefer it over list_coupons or other stats siblings. It gives useful scoping notes (zero-use codes included, real orders only) but no alternative-routing guidance or prerequisites.

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.