Skip to main content
Glama

create_coupon_promotion

Creates a coupon for an existing promotion, with options to set code, quantity, and expiration date.

Instructions

🟡 WRITE · creates data · Promotions · POST /v2/promotions/{pid}/coupons

Create a coupon in a promotion

Creates a coupon for the promotion specified by the provided promotion id. The endpoint response is the created coupon resource.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pidYesPromotion Id
bodyNo
Behavior3/5

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

Annotations already declare readOnlyHint=false, destructiveHint=false. The description adds that it is a WRITE operation and uses POST, but does not disclose potential side effects, required permissions, or error conditions. With annotations present, the description offers marginal additional context.

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 brief (two sentences plus a header line) and includes key information like HTTP method and endpoint. Slight redundancy between title and first sentence, but overall efficient.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool is a write operation with two parameters (one nested object) and no output schema, the description covers the basic action and required pid. However, it lacks details about the body structure (beyond schema), error conditions, and response format. The presence of annotations slightly reduces the burden, but completeness is adequate.

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 50% (body parameter description is empty). The description only reiterates that pid refers to promotion id, adding no new meaning beyond the schema. For the body parameters, the description provides no extra semantics, so it does not compensate for the missing schema description on body.

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 clearly states the verb ('Create') and resource ('a coupon in a promotion') and specifies the input (promotion id). It distinguishes from sibling 'create_coupons_promotion_bulk' by implying single coupon creation, though not explicitly compared.

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 this tool is for creating a single coupon within a promotion, but does not explicitly contrast with alternatives like 'create_coupons_promotion_bulk' (bulk creation) or provide any when-to-use/when-not-to-use guidance. The usage context is clear but lacks exclusions.

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