Skip to main content
Glama

get_coupon_usage

Read-onlyIdempotent

Retrieve coupon usage details and associated payments for a given promotion and coupon code. Returns paginated payment records, newest first, for reporting and verification.

Instructions

๐ŸŸข READ-ONLY ยท GET /v2/promotions/{pid}/coupons/{cid}/usage

Get coupon usage. Returns information about the coupon specified by the provided promotion id and coupon code. More specifically, the coupon usage details are listed along with the asocciated payments.The payments are in sorted order, with the most recently created payment appearing first, and the list is paginated, with a limit of 50 payments per page.

Behavior: read-only lookup against the live school; creates, changes and deletes nothing. Auth (admin API token + Lw-Client id) is injected server-side, never by the model; calls are throttled to stay under LearnWorlds' 30-per-10s cap and retried on 429/5xx. Parameters: results are paged โ€” walk them with page. Returns: HTTP <status> followed by the LearnWorlds JSON response body. A non-2xx reply surfaces as a tool error with that status and the API error payload โ€” 401 bad/expired token, 403 not permitted, 404 no such record, 422 rejected input. Use when: safe to call speculatively for lookups and reporting. Not for changing anything โ€” use the matching ๐ŸŸก write tool. Related Promotions tools: create_coupon_promotion, get_promotions_coupons, create_coupons_promotion_bulk, create_promotion, get_promotion.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
cidYesCoupon code
pidYesPromotion Id
pageNoFilter by the page number. In case page number is higher than the maximum one, the results of last page will be returned

Schema Changelog

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

  1. First observedv1.0.0

TDQS

A4.5/5.0
Behavior5/5

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

Annotations already declare readOnlyHint, idempotentHint, and destructiveHint=false, but the description goes well beyond them: it states auth is injected server-side, rate limiting/retry behavior, pagination specifics (50 per page, sorted order), and detailed non-2xx error semantics. No contradiction with annotations.

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 well-labeled and information-dense, with the read-only and endpoint context front-loaded. Minor redundancy exists between the opening line and the second sentence, but every section earns its place given the pagination, auth, and error behavior that must be conveyed.

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 no output schema, the description covers the return envelope, error handling, pagination, ordering, and safety profile. It does not enumerate the exact JSON fields of a coupon usage record, but it conveys enough for selection and invocation.

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 the baseline is 3, but the description adds meaningful operational meaning: 'results are paged โ€” walk them with page', the 50-per-page limit, and ordering by most recently created payment. This helps the agent use the page parameter correctly beyond the schema's terse description.

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 ('Get coupon usage') and unpacks it with concrete details: coupon usage details plus associated payments, sorted and paginated. The 'Related Promotions tools' list and read-only marker also help distinguish it from sibling promotion tools.

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?

Explicitly says it is safe to call speculatively for lookups and reporting, and warns against using it for changes, pointing to the matching write tool. It lists related Promotions tools but does not precisely contrast this tool against the closest read sibling, get_promotions_coupons.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/ohneben/Learnworlds-MCP'

If you have feedback or need assistance with the MCP directory API, please join our Discord server