bulk_create_coupon
Create the SAME discount code across many apps in one call: the portfolio-promo shortcut (e.g. a summer sale on every owned app). WRITE, human-gated: a real create requires an elicitation-capable client; the human enters the coupon terms ONCE in a form (overriding the arguments here) and that one approval covers the whole batch. Clients without elicitation are refused UNLESS the deployment sets SPARK_PAY_MCP_ALLOW_UNELICITED_WRITES=1 and the call passes confirm_write:true, which is how Claude Code and cron reach these writes; dry_run still works anywhere. Runs each app through the same fully-guarded create as create_coupon. Unlike a single call it does NOT fail the batch when an app already has the code: that app is reported skipped and the rest are still created. Returns a per-app outcome matrix plus created/skipped/failed counts. Use dry_run:true first to see which apps would create vs skip. Pass explicit app_ids (from list_apps). There is deliberately no 'all apps' shortcut, so a discount can't hit an app you didn't name.
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": {
"app_ids": "<app_ids>",
"code": "<code>",
"discount_percent": "<discount_percent>"
},
"name": "bulk_create_coupon"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| code | Yes | ||
| listed | No | ||
| app_ids | Yes | ||
| dry_run | No | ||
| max_uses | No | ||
| expires_at | No | ||
| description | No | ||
| confirm_write | No | ||
| applies_to_tiers | No | ||
| discount_percent | Yes | ||
| confirm_high_discount | No |