Skip to main content
Glama

GrowSurf

Create Mobile Participant Token

growsurf_create_mobile_participant_token

Create or fetch a participant, then create a participant-scoped mobile SDK token via GrowSurf REST. Participant creation is trusted direct enrollment and bypasses the public application review flow for affiliates. The program must have mobile SDK access enabled. A 409 with STATE_RESTRICTED means the program is not available in the person's US state, so no token is created. Pass usState to check the state. isNew is false when the participant already existed; a repeat call can return true while the first signup is still finishing. 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": {
      "email": "<email>",
      "campaignId": "<campaignId>"
    },
    "name": "growsurf_create_mobile_participant_token"
  }
}

Input Schema

NameRequiredDescriptionDefault
emailYes
usStateNoThe person's US state as a two-letter code, such as `FL`. Omit it when unknown.
languageNoThe language of the participant's portal and program emails. Stored when it is one of the program's languages (`languages` in `growsurf_get_campaign_options`). A regional tag maps to its language (for example, `fr-BE` is stored as `fr`). Any other value is ignored and the program's base language applies. Applies only when this call creates the participant. Omit it to use the program's base language. Supported codes: `en`, `es`, `fr`, `de`, `it`, `pt-BR`, `nl`, `pl`, `sv`, `tr`, `ja`, `ko`, `zh-CN`, `id`, `da`, `nb`, `nn`, `fi`, `is`, `cs`, `sk`, `hu`, `ro`, `hr`, `sl`, `et`, `lv`, `lt`, `el`, `bg`, `uk`, `ru`, `pt-PT`, `ca`, `vi`, `ms`, `fil`, `af`, `sw`, `zh-TW`, `es-419`.
lastNameNo
metadataNo
firstNameNo
ipAddressNo
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.
referredAtNoWhen the participant was referred, in Unix milliseconds. Used only with a valid `referredBy`. If you omit `referralStatus`, GrowSurf compares this time with the program's referral credit window to set it. Defaults to the time of the request.
referredByNo
fingerprintNo
isAffiliateNoSets whether the participant is an affiliate. Use `true` only for trusted direct enrollment. Public applicants should follow the program's configured application flow.
referralStatusNo
mobileInstanceIdNo

Output Schema

NameRequiredDescriptionDefault
isNewNoWhether this request created a new participant.
expiresInNoToken lifetime in seconds.
participantNoThe participant record (same shape as the `growsurf_get_participant` result).
participantTokenNoParticipant-scoped bearer token for GrowSurf mobile SDK participant endpoints.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • addedInput schema / properties / usState
      Added value: +{
      +  "description": "The person's US state as a two-letter code, such as `FL`. Omit it when unknown.",
      +  "maxLength": 2,
      +  "minLength": 2,
      +  "type": [
      +    "string",
      +    "null"
      +  ]
      +}
  2. Added
  3. Removed
  4. Changed1 schema field changed
    • 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."
  5. Changed1 schema field changed
    • changedInput schema / properties / language / description
      Previous value: -"The language of the participant's portal and program emails. Stored when it is one of the program's languages (`languages` in `growsurf_get_campaign_options`). A regional tag maps to its language (for example, `es-MX` is stored as `es`). Any other value is ignored and the program's base language applies. Applies only when this call creates the participant. Omit it to use the program's base language. Supported codes: `en`, `es`, `fr`, `de`, `it`, `pt-BR`, `nl`, `pl`, `sv`, `tr`, `ja`, `ko`, `zh-CN`, `id`, `da`, `nb`, `nn`, `fi`, `is`, `cs`, `sk`, `hu`, `ro`, `hr`, `sl`, `et`, `lv`, `lt`, `el`, `bg`, `uk`, `ru`, `pt-PT`, `ca`, `vi`, `ms`, `fil`, `af`, `sw`."New value: +"The language of the participant's portal and program emails. Stored when it is one of the program's languages (`languages` in `growsurf_get_campaign_options`). A regional tag maps to its language (for example, `fr-BE` is stored as `fr`). Any other value is ignored and the program's base language applies. Applies only when this call creates the participant. Omit it to use the program's base language. Supported codes: `en`, `es`, `fr`, `de`, `it`, `pt-BR`, `nl`, `pl`, `sv`, `tr`, `ja`, `ko`, `zh-CN`, `id`, `da`, `nb`, `nn`, `fi`, `is`, `cs`, `sk`, `hu`, `ro`, `hr`, `sl`, `et`, `lv`, `lt`, `el`, `bg`, `uk`, `ru`, `pt-PT`, `ca`, `vi`, `ms`, `fil`, `af`, `sw`, `zh-TW`, `es-419`."
  6. Changed9 schema fields changed
    • addedInput schema / properties / fingerprint / maxLength
      Added value: +255
    • addedInput schema / properties / firstName / maxLength
      Added value: +255
    • addedInput schema / properties / ipAddress / maxLength
      Added value: +255
    • changedInput schema / properties / language / description
      Previous value: -"The language of the participant's portal and program emails. Must be one of the program's languages (`languages` in `growsurf_get_campaign_options`); any other code returns a `400`. Applies only when this call creates the participant. Omit it or send `null` to use the program's base language. Supported codes: `en`, `es`, `fr`, `de`, `it`, `pt-BR`, `nl`, `pl`, `sv`, `tr`, `ja`, `ko`, `zh-CN`, `id`, `da`, `nb`, `nn`, `fi`, `is`, `cs`, `sk`, `hu`, `ro`, `hr`, `sl`, `et`, `lv`, `lt`, `el`, `bg`, `uk`, `ru`, `pt-PT`, `ca`, `vi`, `ms`, `fil`, `af`, `sw`."New value: +"The language of the participant's portal and program emails. Stored when it is one of the program's languages (`languages` in `growsurf_get_campaign_options`). A regional tag maps to its language (for example, `es-MX` is stored as `es`). Any other value is ignored and the program's base language applies. Applies only when this call creates the participant. Omit it to use the program's base language. Supported codes: `en`, `es`, `fr`, `de`, `it`, `pt-BR`, `nl`, `pl`, `sv`, `tr`, `ja`, `ko`, `zh-CN`, `id`, `da`, `nb`, `nn`, `fi`, `is`, `cs`, `sk`, `hu`, `ro`, `hr`, `sl`, `et`, `lv`, `lt`, `el`, `bg`, `uk`, `ru`, `pt-PT`, `ca`, `vi`, `ms`, `fil`, `af`, `sw`."
    • changedInput schema / properties / language / type
      Previous value: -[
      -  "string",
      -  "null"
      -]New value: +"string"
    • addedInput schema / properties / lastName / maxLength
      Added value: +255
    • addedInput schema / properties / mobileInstanceId / maxLength
      Added value: +255
    • addedInput schema / properties / referredAt
      Added value: +{
      +  "description": "When the participant was referred, in Unix milliseconds. Used only with a valid `referredBy`. If you omit `referralStatus`, GrowSurf compares this time with the program's referral credit window to set it. Defaults to the time of the request.",
      +  "minimum": 0,
      +  "type": [
      +    "integer",
      +    "null"
      +  ]
      +}
    • addedInput schema / properties / referredBy / maxLength
      Added value: +100
  7. Changed1 schema field changed
    • changedInput schema / properties / language / description
      Previous value: -"The language of the participant's portal and program emails. Must be one of the program's languages (`languages` in `growsurf_get_campaign_options`); any other code returns a `400`. Applies only when this call creates the participant. Omit it or send `null` to use the program's base language. Supported codes: `en`, `es`, `fr`, `de`, `it`, `pt-BR`, `nl`, `pl`, `sv`, `tr`, `ja`, `ko`, `zh-CN`, `id`."New value: +"The language of the participant's portal and program emails. Must be one of the program's languages (`languages` in `growsurf_get_campaign_options`); any other code returns a `400`. Applies only when this call creates the participant. Omit it or send `null` to use the program's base language. Supported codes: `en`, `es`, `fr`, `de`, `it`, `pt-BR`, `nl`, `pl`, `sv`, `tr`, `ja`, `ko`, `zh-CN`, `id`, `da`, `nb`, `nn`, `fi`, `is`, `cs`, `sk`, `hu`, `ro`, `hr`, `sl`, `et`, `lv`, `lt`, `el`, `bg`, `uk`, `ru`, `pt-PT`, `ca`, `vi`, `ms`, `fil`, `af`, `sw`."
  8. Changed1 schema field changed
    • addedInput schema / properties / language
      Added value: +{
      +  "description": "The language of the participant's portal and program emails. Must be one of the program's languages (`languages` in `growsurf_get_campaign_options`); any other code returns a `400`. Applies only when this call creates the participant. Omit it or send `null` to use the program's base language. Supported codes: `en`, `es`, `fr`, `de`, `it`, `pt-BR`, `nl`, `pl`, `sv`, `tr`, `ja`, `ko`, `zh-CN`, `id`.",
      +  "type": [
      +    "string",
      +    "null"
      +  ]
      +}
  9. First observed

TDQS

A3.8/5.0
Behavior4/5

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

Annotations already cover the safety profile (readOnlyHint=false, destructiveHint=false, idempotentHint=false), and the description adds real behavior beyond them: the `409 STATE_RESTRICTED` outcome and its meaning, `isNew` semantics, and the caveat that a repeat call may return `true` while the first signup is still finishing. That non-idempotent repeat-call note is consistent with idempotentHint=false. It does not describe rate limits or what the token response contains, though an output schema exists.

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?

Front-loaded with the action, then preconditions, then error semantics, then defaults — a sensible ordering for an agent scanning for a decision. Sentences are dense but each carries a distinct fact. The `usState` sentence slightly duplicates what the `409` sentence already implies, a minor redundancy.

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?

For a 14-parameter mutation tool, the description covers the highest-risk decision points (state restriction, affiliate flag, campaign targeting) and an output schema exists so return values need not be explained. However, the majority of optional parameters remain undocumented anywhere, leaving an agent unsure what supplying `metadata`, `fingerprint`, or `mobileInstanceId` does.

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?

With 14 parameters and only 36% schema description coverage, the description must carry more weight. It does add meaning for `campaignId` (resolved from `GROWSURF_CAMPAIGN_ID`, must be a program id not a name or share URL) and `usState` (drives the state check). The remaining parameters — `metadata`, `fingerprint`, `mobileInstanceId`, `referredBy`, `referredAt`, `firstName`, `lastName`, `ipAddress`, `referralStatus` — 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?

The first sentence names a specific verb chain and resource: create-or-fetch a participant, then mint a participant-scoped mobile SDK token via GrowSurf REST. It also flags the trusted direct-enrollment path that bypasses public application review, which separates it from an ordinary add-participant flow. It does not name `growsurf_add_participant` or `growsurf_mobile_sdk_guide` as the alternative, so sibling differentiation is implied rather than stated.

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?

Clear preconditions are given: the program must have mobile SDK access enabled, and `isAffiliate: true` is reserved for trusted direct enrollment while public applicants should use the configured application flow. It also tells the agent to pass `usState` to surface the state restriction. What is missing is an explicit statement of when to choose this over `growsurf_add_participant`.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.