Skip to main content
Glama
GrowSurf MCP Server

GrowSurf MCP Server

Official

Update Campaign Reward

growsurf_update_campaign_reward
DestructiveIdempotent

Updates an existing reward configuration on a GrowSurf campaign, letting you edit title, value, limits, coupons, group, metadata, or affiliate commission settings.

Instructions

Update an existing campaign reward (reward config) on your GrowSurf program. campaignRewardId is the reward key (e.g. crew_...). The reward type is immutable. 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": {
      "campaignRewardId": "<campaignRewardId>",
      "campaignId": "<campaignId>"
    },
    "name": "growsurf_update_campaign_reward"
  }
}

Input Schema

NameRequiredDescriptionDefault
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
descriptionNo
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
campaignRewardIdYes
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
referredRewardUpfrontNo

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. 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
      +]
  2. 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."
  3. 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"
      +  ]
      +}
  4. 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"
      +]
  5. 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"
      +  ]
      +}
  6. Changed2 schema fields changedv0.19.15
    • addedInput schema / properties / campaignId / minLength
      Added value: +1
    • changedInput schema / required
      Previous value: -[
      -  "campaignRewardId"
      -]New value: +[
      +  "campaignRewardId",
      +  "campaignId"
      +]
  7. 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."
  8. 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"
      +]
  9. 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"
      +}
  10. First observedv0.12.2

TDQS

A3.7/5.0
Behavior4/5

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

Annotations already declare destructive=true, idempotent=true, readOnly=false, so the safety profile is covered. The description adds genuinely new behavior: `type` cannot be changed after creation, and concurrent edits surface as 409 requiring a reload before retry. That is real operational context an agent cannot get from the schema or annotations. It stops short of describing what a destructive update clobbers or what the response contains.

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?

Four tight sentences, front-loaded with purpose before the ID semantics and the 409 caveat. Every sentence carries information; no filler or restatement of the title. Slightly dense with inline code formatting but still easy to scan.

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?

For a destructive, 25-parameter mutation with nested objects and an output schema present, the description covers the essentials: what it mutates, which key identifies the reward, the immutability constraint, conflict handling, and program targeting. Return values need not be explained given the output schema. A note on what a destructive update overwrites would close the remaining gap.

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 32% across 25 parameters, so the description needs to carry weight; it clarifies the two required parameters well — `campaignRewardId` is the reward key like `crew_...`, and `campaignId` defaults to GROWSURF_CAMPAIGN_ID. It says nothing about the other 23 fields, though the schema itself documents the highest-risk nested objects (value, referredValue, commissionStructure, metadata, groupId).

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?

The description opens with a clear verb+resource: 'Update an existing campaign reward (reward config)', and the parenthetical clarifies the domain object. It distinguishes itself implicitly from create/delete campaign reward siblings by saying 'existing' and by noting `type` is immutable (so this is a partial update, not a replace). It doesn't explicitly name a sibling as the alternative, which keeps it from 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 Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

It gives operational guidance — a concurrent edit returns 409 and you should reload before retrying, and `campaignId` falls back to GROWSURF_CAMPAIGN_ID — but there is no explicit statement of when to use this versus `growsurf_create_campaign_reward`, `growsurf_delete_campaign_reward`, or `growsurf_list_campaign_rewards`. Usage is implied by 'update an existing' rather than spelled out.

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