Skip to main content
Glama
GrowSurf MCP Server

GrowSurf MCP Server

Official

Create Campaign Reward

growsurf_create_campaign_reward

Creates a new reward configuration for a GrowSurf program, setting reward type, value, limits, descriptions, and affiliate commission structure so participants can earn the intended incentive.

Instructions

Create a new campaign reward (reward config) on your GrowSurf program. type must be compatible with the program type (affiliate programs support only AFFILIATE rewards; referral programs support the other types). An AFFILIATE reward also requires commissionStructure. A DOUBLE_SIDED reward has two descriptions: set description to what the referrer gets and referralDescription to what the referred friend gets. A concurrent edit can return 409; reload the program before retrying. Targets campaignId if you pass it, otherwise GROWSURF_CAMPAIGN_ID.

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": {
      "type": "<type>",
      "campaignId": "<campaignId>"
    },
    "name": "growsurf_create_campaign_reward"
  }
}

Input Schema

NameRequiredDescriptionDefault
typeYes
eventNoThe referral event that earns this Campaign Reward. Use `LEAD` for a referred signup or `CONVERSION` for a qualifying action. A `LEAD` reward requires a later custom conversion trigger. Referral reward types only.
limitNo
orderNo
titleNo
valueNoTax valuation for the reward (the referrer's side of a double-sided reward). `fairMarketValueUSD` is the manual fair-market value in USD (major units). `taxCharacter` is the reason the recipient earns the reward. For configurable non-commission rewards, `null` inherits the program's confirmed treatment. Commission rewards always use `NONEMPLOYEE_SERVICES`.
groupIdNoThe group this reward belongs to (`grp_…`), or `null` for Default. A participant earns only their own group's rewards. `LEADERBOARD` rewards apply to the whole program and cannot be in a group. An ID that is not a group in this program returns `400`.
imageUrlNo
metadataNoCustom key/value metadata. Sending it replaces the stored object. Each value must be a string, number, or boolean of up to 500 characters. Each key must have 1 to 40 characters once camelCased, and two keys that camelCase to the same key are rejected. Up to 50 keys. An entry that breaks these rules returns `400`. For DOUBLE_SIDED referral rewards, `rewardAmount` is the referrer's amount and `referredRewardAmount` the friend's; without `referredRewardAmount` the friend uses `rewardAmount` unless `referralDescription` is a percent or free offer. Positive amounts use whole units for zero-decimal currencies and at most two decimals otherwise.
isVisibleNo
campaignIdYesTarget program id for this call: the `id` returned by `growsurf_list_campaigns`, not the program name or a share URL. Defaults to GROWSURF_CAMPAIGN_ID when omitted. Program IDs also identify newly created programs without restarting the server.
couponCodeNo
descriptionNoWhat the referrer gets. Shown to the referrer, and listed by the `{{campaignRewards}}` email token. Name only the reward, in the words the customer gave, such as `$20` or `1 free month`, because the dashboard and emails show it after words such as "You earned". For a `DOUBLE_SIDED` reward, put the friend's reward in `referralDescription`, not here.
isUnlimitedNo
imageIconKeyNoThe starter icon shown for the reward, or `null` when `imageUrl` is your own image. Participant pages draw this icon in your program's accent color. Also set `imageUrl` to the icon's image so the iOS and Android SDKs can show it. Sending `imageUrl` without `imageIconKey` clears it.
limitDurationNo
referredValueNoTax valuation for the referred friend's side of a double-sided reward. `taxCharacter` is the reason the recipient earns the reward. For configurable non-commission rewards, `null` inherits the program's confirmed treatment. Commission rewards have no referred-friend side, so GrowSurf clears these settings. Use `PURCHASE_REBATE` only when that is the correct tax character.
numberOfWinnersNo
referralCouponCodeNo
commissionStructureNoAffiliate commission structure (AFFILIATE rewards only). Provide a positive `amount` (+ optional `amountISO`) for a FIXED commission, or `percent` for a PERCENT commission. CLICK and LEAD commissions must use FIXED.
conversionsRequiredNo
nextMilestonePrefixNo
nextMilestoneSuffixNo
referralDescriptionNo`DOUBLE_SIDED` rewards only. What the referred friend gets, shown to the referred friend. Name only the reward, in the words the customer gave, such as `$20` or `1 free month`. Set it on every `DOUBLE_SIDED` reward; `description` covers the referrer's side only.
referredRewardUpfrontNo

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changedv0.19.37
    • addedInput schema / properties / description / description
      Added value: +"What the referrer gets. Shown to the referrer, and listed by the `{{campaignRewards}}` email token. Name only the reward, in the words the customer gave, such as `$20` or `1 free month`, because the dashboard and emails show it after words such as \"You earned\". For a `DOUBLE_SIDED` reward, put the friend's reward in `referralDescription`, not here."
    • addedInput schema / properties / referralDescription / description
      Added value: +"`DOUBLE_SIDED` rewards only. What the referred friend gets, shown to the referred friend. Name only the reward, in the words the customer gave, such as `$20` or `1 free month`. Set it on every `DOUBLE_SIDED` reward; `description` covers the referrer's side only."
  2. Changed2 schema fields changedv0.19.34
    • addedInput schema / properties / commissionStructure / properties / introDuration / enum
      Added value: +[
      +  "REPEATING",
      +  "ONCE",
      +  null
      +]
    • addedInput schema / properties / commissionStructure / properties / introType / enum
      Added value: +[
      +  "PERCENT",
      +  "FIXED",
      +  null
      +]
  3. Changed1 schema field changedv0.19.33
    • changedInput schema / properties / campaignId / description
      Previous value: -"Target program (campaign) id for this call. Defaults to GROWSURF_CAMPAIGN_ID when omitted. Program IDs also identify newly created programs without restarting the server."New value: +"Target program id for this call: the `id` returned by `growsurf_list_campaigns`, not the program name or a share URL. Defaults to GROWSURF_CAMPAIGN_ID when omitted. Program IDs also identify newly created programs without restarting the server."
  4. Changed1 schema field changedv0.19.32
    • addedInput schema / properties / groupId
      Added value: +{
      +  "description": "The group this reward belongs to (`grp_…`), or `null` for Default. A participant earns only their own group's rewards. `LEADERBOARD` rewards apply to the whole program and cannot be in a group. An ID that is not a group in this program returns `400`.",
      +  "type": [
      +    "string",
      +    "null"
      +  ]
      +}
  5. Changed24 schema fields changedv0.19.27
    • changedInput schema / properties / commissionStructure / properties / amount / description
      Previous value: -"Amount in minor currency units (the currency's smallest denomination). For USD, $100.00 is `10000`."New value: +"Amount in minor currency units (the currency's smallest denomination). For USD, $100.00 is `10000`. The maximum is `100000000` (1,000,000.00) for USD, EUR, and GBP."
    • addedInput schema / properties / commissionStructure / properties / amount / maximum
      Added value: +999999999999
    • changedInput schema / properties / commissionStructure / properties / approvalRequired / type
      Previous value: -"boolean"New value: +[
      +  "boolean",
      +  "null"
      +]
    • changedInput schema / properties / commissionStructure / properties / duration / enum
      Previous value: -[
      -  "FOREVER",
      -  "REPEATING",
      -  "ONCE"
      -]New value: +[
      +  "FOREVER",
      +  "REPEATING",
      +  "ONCE",
      +  null
      +]
    • changedInput schema / properties / commissionStructure / properties / duration / type
      Previous value: -"string"New value: +[
      +  "string",
      +  "null"
      +]
    • changedInput schema / properties / commissionStructure / properties / event / enum
      Previous value: -[
      -  "CLICK",
      -  "LEAD",
      -  "SALE"
      -]New value: +[
      +  "CLICK",
      +  "LEAD",
      +  "SALE",
      +  null
      +]
    • changedInput schema / properties / commissionStructure / properties / event / type
      Previous value: -"string"New value: +[
      +  "string",
      +  "null"
      +]
    • changedInput schema / properties / commissionStructure / properties / hasIntro / type
      Previous value: -"boolean"New value: +[
      +  "boolean",
      +  "null"
      +]
    • changedInput schema / properties / commissionStructure / properties / hasMaxAmount / type
      Previous value: -"boolean"New value: +[
      +  "boolean",
      +  "null"
      +]
    • changedInput schema / properties / commissionStructure / properties / holdDuration / type
      Previous value: -"integer"New value: +[
      +  "integer",
      +  "null"
      +]
    • removedInput schema / properties / commissionStructure / properties / minPaidReferrals / minimum
      Removed value: -1
    • changedInput schema / properties / commissionStructure / properties / minPaidReferrals / type
      Previous value: -"integer"New value: +[
      +  "integer",
      +  "null"
      +]
    • changedInput schema / properties / commissionStructure / properties / type / enum
      Previous value: -[
      -  "PERCENT",
      -  "FIXED"
      -]New value: +[
      +  "PERCENT",
      +  "FIXED",
      +  null
      +]
    • changedInput schema / properties / commissionStructure / properties / type / type
      Previous value: -"string"New value: +[
      +  "string",
      +  "null"
      +]
    • addedInput schema / properties / couponCode / maxLength
      Added value: +100
    • addedInput schema / properties / description / maxLength
      Added value: +255
    • addedInput schema / properties / metadata / description
      Added value: +"Custom key/value metadata. Sending it replaces the stored object. Each value must be a string, number, or boolean of up to 500 characters. Each key must have 1 to 40 characters once camelCased, and two keys that camelCase to the same key are rejected. Up to 50 keys. An entry that breaks these rules returns `400`. For DOUBLE_SIDED referral rewards, `rewardAmount` is the referrer's amount and `referredRewardAmount` the friend's; without `referredRewardAmount` the friend uses `rewardAmount` unless `referralDescription` is a percent or free offer. Positive amounts use whole units for zero-decimal currencies and at most two decimals otherwise."
    • addedInput schema / properties / nextMilestonePrefix / maxLength
      Added value: +255
    • addedInput schema / properties / nextMilestoneSuffix / maxLength
      Added value: +255
    • addedInput schema / properties / referralCouponCode / maxLength
      Added value: +100
    • addedInput schema / properties / referralDescription / maxLength
      Added value: +255
    • changedInput schema / properties / referredValue / type
      Previous value: -"object"New value: +[
      +  "object",
      +  "null"
      +]
    • addedInput schema / properties / title / maxLength
      Added value: +100
    • changedInput schema / properties / value / type
      Previous value: -"object"New value: +[
      +  "object",
      +  "null"
      +]
  6. Changed1 schema field changedv0.19.23
    • addedInput schema / properties / imageIconKey
      Added value: +{
      +  "description": "The starter icon shown for the reward, or `null` when `imageUrl` is your own image. Participant pages draw this icon in your program's accent color. Also set `imageUrl` to the icon's image so the iOS and Android SDKs can show it. Sending `imageUrl` without `imageIconKey` clears it.",
      +  "enum": [
      +    "GIFT_1",
      +    "GIFT_2",
      +    "GIFT_3",
      +    "GIFT_4",
      +    "GIFT_5",
      +    "GIFT_6",
      +    "GIFT_CARD",
      +    "CASH",
      +    "COIN",
      +    "CARD",
      +    "STAR_1",
      +    "STAR_2",
      +    "STAR_3",
      +    "TROPHY",
      +    "CROWN",
      +    "SEAL",
      +    "HEART_1",
      +    "HEART_2",
      +    "TAG",
      +    "DIAMOND",
      +    "CONFETTI",
      +    "ROCKET",
      +    null
      +  ],
      +  "type": [
      +    "string",
      +    "null"
      +  ]
      +}
  7. Changed2 schema fields changedv0.19.15
    • addedInput schema / properties / campaignId / minLength
      Added value: +1
    • changedInput schema / required
      Previous value: -[
      -  "type"
      -]New value: +[
      +  "type",
      +  "campaignId"
      +]
  8. Changed1 schema field changedv0.19.9
    • changedInput schema / properties / campaignId / description
      Previous value: -"Target program (campaign) id for this call. Defaults to GROWSURF_CAMPAIGN_ID when omitted. Pass the `id` returned by growsurf_create_campaign to configure or operate a program you just created, without restarting the server."New value: +"Target program (campaign) id for this call. Defaults to GROWSURF_CAMPAIGN_ID when omitted. Program IDs also identify newly created programs without restarting the server."
  9. Changed6 schema fields changedv0.19.8
    • changedInput schema / properties / couponCode / type
      Previous value: -"string"New value: +[
      +  "string",
      +  "null"
      +]
    • changedInput schema / properties / imageUrl / type
      Previous value: -"string"New value: +[
      +  "string",
      +  "null"
      +]
    • changedInput schema / properties / nextMilestonePrefix / type
      Previous value: -"string"New value: +[
      +  "string",
      +  "null"
      +]
    • changedInput schema / properties / nextMilestoneSuffix / type
      Previous value: -"string"New value: +[
      +  "string",
      +  "null"
      +]
    • changedInput schema / properties / referralCouponCode / type
      Previous value: -"string"New value: +[
      +  "string",
      +  "null"
      +]
    • changedInput schema / properties / referralDescription / type
      Previous value: -"string"New value: +[
      +  "string",
      +  "null"
      +]
  10. Changed5 schema fields changedv0.14.0
    • addedInput schema / properties / commissionStructure / allOf
      Added value: +[
      +  {
      +    "if": {
      +      "properties": {
      +        "event": {
      +          "enum": [
      +            "CLICK",
      +            "LEAD"
      +          ]
      +        }
      +      },
      +      "required": [
      +        "event"
      +      ]
      +    },
      +    "then": {
      +      "properties": {
      +        "amount": {
      +          "minimum": 1,
      +          "type": "integer"
      +        },
      +        "type": {
      +          "enum": [
      +            "FIXED"
      +          ]
      +        }
      +      },
      +      "required": [
      +        "amount"
      +      ]
      +    }
      +  }
      +]
    • changedInput schema / properties / commissionStructure / description
      Previous value: -"Affiliate commission structure (AFFILIATE rewards only). Provide `amount` (+ optional `amountISO`) for a FIXED commission, or `percent` for a PERCENT commission."New value: +"Affiliate commission structure (AFFILIATE rewards only). Provide a positive `amount` (+ optional `amountISO`) for a FIXED commission, or `percent` for a PERCENT commission. CLICK and LEAD commissions must use FIXED."
    • addedInput schema / properties / commissionStructure / properties / amount / minimum
      Added value: +1
    • addedInput schema / properties / commissionStructure / properties / event / description
      Added value: +"The affiliate event that earns the commission. `CLICK` and `LEAD` must use `FIXED`."
    • addedInput schema / properties / event
      Added value: +{
      +  "description": "The referral event that earns this Campaign Reward. Use `LEAD` for a referred signup or `CONVERSION` for a qualifying action. A `LEAD` reward requires a later custom conversion trigger. Referral reward types only.",
      +  "enum": [
      +    "LEAD",
      +    "CONVERSION"
      +  ],
      +  "type": "string"
      +}
  11. First observedv0.12.2

TDQS

A3.9/5.0
Behavior4/5

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

Annotations already declare non-read-only, non-idempotent, non-destructive, open-world, so the safety profile is covered. The description adds mutation-specific behavior the annotations cannot: 409 on concurrent edit with a reload-before-retry instruction, metadata replacing the stored object, and referred-friend tax settings being cleared for commission rewards. It omits any note on required permissions or rate limits.

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 creation act and its hard constraints are front-loaded, and each sentence carries a distinct rule rather than restating the name. It is dense but proportionate to a 25-parameter tool; nothing is obviously filler.

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?

An output schema exists, so return values need not be described, and the description covers the highest-risk creation constraints plus the campaignId default. Gaps remain around the milestone/leaderboard-specific fields and how limit interacts with limitDuration, which matter for a tool this broad.

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 only 40% across 25 parameters, so the description must compensate, and it does so selectively: `type` compatibility, `commissionStructure` requirement, `description` vs `referralDescription` split, and `campaignId` fallback to GROWSURF_CAMPAIGN_ID. Many parameters (limit, limitDuration, order, isVisible, isUnlimited, numberOfWinners, conversionsRequired, milestone prefixes, coupon codes) get no explanation in either place.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

Opens with a specific verb and resource ('Create a new campaign reward (reward config)') scoped to a GrowSurf program, which cleanly separates it from the update/delete/list reward siblings. It does not explicitly name a sibling to contrast with, so it stops short of a 5.

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?

Gives real preconditions: `type` must match the program type (affiliate programs accept only AFFILIATE), AFFILIATE requires `commissionStructure`, and DOUBLE_SIDED requires a `referralDescription`. It also tells the agent what to do on a 409. It never states when to use `growsurf_update_campaign_reward` instead, which keeps it at 4.

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

Deploy Server

Other Tools