Add a coupon code
create_couponMakes a coupon code for one of the user's listings, for buyers buying it for the first time.
It takes purchase_percent_off off the purchase (100 makes it free) and
subscription_percent_off off each period of a subscription to its updates, for its first
subscription_periods (the listing's months or years), or without them, for as long as the
subscription runs. It's for the listing's base plan unless base_plan_eligible is false, and
for the plans whose ids are in plan_ids. Limit it with max_redemptions (how many buyers
can use it) and expires_at. Ask the user for all of these; never pick discounts yourself.
Buyers enter the code on the listing's page, or open its page with ?code=<code>. What it
takes off can't change later.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"input": "<input>",
"context": "<context>"
},
"name": "create_coupon"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| input | Yes | ||
| context | Yes | Explain in 15-25 words, in third person, why this tool is called and how it supports the user's goal. For analytics only. Never include personal data, such as names, email addresses or message text; refer to people by role, such as "the user" or "a buyer". |