Skip to main content
Glama

create_coupons_promotion_bulk

Create multiple coupons at once for a promotion by specifying a prefix and quantity. Use this to generate coupon codes in bulk, with optional expiration date.

Instructions

๐ŸŸก WRITE ยท creates data ยท POST /v2/promotions/{id}/coupons-bulk

Bulk create coupons in a promotion. The endpoint response is an array with the created coupon resources.

Behavior: creates a record or triggers an action in the live school. Not idempotent: a repeated call can duplicate the effect. 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: the whole JSON payload goes in the single body argument, forwarded verbatim (the spec leaves body optional, but this endpoint expects one). 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: only when the user asked to create this. Check with a ๐ŸŸข read tool that the target exists and the record is not already there. Related Promotions tools: get_promotion, create_coupon_promotion, create_promotion, get_coupon_usage, get_promotions.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYesPromotion id
bodyNo

Schema Changelog

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

  1. First observedv1.0.0

TDQS

A4.7/5.0
Behavior5/5

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

Beyond the annotations (readOnlyHint=false, idempotentHint=false, openWorldHint=true), the description richly elaborates: it explains what non-idempotence concretely means ('a repeated call can duplicate the effect'), discloses that auth is injected server-side and never by the model, documents the 30-per-10s throttle with retry on 429/5xx, and specifies exact return/error semantics (HTTP status prefix, non-2xx surfacing as tool errors with 401/403/404/422 meanings). No claims contradict the annotations.

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?

The description is long but tightly organized with labeled sections (Behavior, Parameters, Returns, Use when) and front-loaded with the HTTP verb and endpoint. Every sentence carries operational value for a write tool with no output schema โ€” idempotence, auth, throttling, error mapping, parameter forwarding, and preconditions โ€” so the length is proportionate to the tool's complexity.

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 mutation tool with no output schema, the description provides a complete calling contract: the response shape (array of created coupon resources), the HTTP-status return format, error-payload behavior per status code, auth/rate-limit handling, the body-required caveat, and read-tool prechecks. Nothing an agent needs to invoke this tool correctly or interpret its result 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 50% and the body parameter's own schema description is empty, so the description compensates by resolving the critical trap: 'the whole JSON payload goes in the single `body` argument, forwarded verbatim (the spec leaves `body` optional, but this endpoint expects one).' This prevents an agent from omitting body because it is not top-level required. Nested fields (prefix, expires, quantity) already have adequate schema descriptions, so no extra detail is needed there.

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?

The description opens with a precise operation signature ('WRITE ยท creates data ยท POST /v2/promotions/{id}/coupons-bulk') and states 'Bulk create coupons in a promotion' โ€” a specific verb, resource, and endpoint. The bulk-vs-single distinction from sibling create_coupon_promotion is clear from the title, the word 'Bulk', and the enumerated related Promotions 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?

The 'Use when' section gives an explicit trigger โ€” 'only when the user asked to create this' โ€” plus a precondition to verify with a read tool that the target exists and the record is not already there. Related alternatives are listed (get_promotion, create_coupon_promotion, create_promotion, get_coupon_usage, get_promotions), but there is no explicit when-not rule such as 'for a single coupon use create_coupon_promotion instead,' so the alternative-selection logic is implied rather than stated.

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