Skip to main content
Glama

Preview Referral Campaign Tool

preview-referral-campaign
Read-only

Previews eligible completed jobs for one authorized referral campaign without sending or changing records. Use to preview referral campaign in the connected business. Returns campaign, assistant_run, requested, eligible, skipped, items, sends, mutates, scope.

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": {
      "campaign_id": "<campaign_id>"
    },
    "name": "preview-referral-campaign"
  }
}

Input Schema

NameRequiredDescriptionDefault
limitNoMaximum audience items to evaluate.
campaign_idYesReferral campaign ID returned by search-referral-campaigns.

Output Schema

NameRequiredDescriptionDefault
itemsYesBounded items records returned by this tool.
scopeYesAuthorization scope of this result; data remains restricted to the connected business.
sendsYesSends flag; previews do not perform this action.
mutatesYesMutates flag; previews do not perform this action.
skippedYesSkipped for the returned result.
campaignYesCampaign data returned by the authorized safe projection.
eligibleYesEligible for the returned result.
requestedYesRequested for the returned result.
assistant_runYesAssistant run metadata; empty collections retain their existing JSON array representation.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • addedInput schema / required
      Added value: +[
      +  "campaign_id"
      +]
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "properties": {
      +    "assistant_run": {
      +      "description": "Assistant run metadata; empty collections retain their existing JSON array representation.",
      +      "type": [
      +        "object",
      +        "array",
      +        "null"
      +      ]
      +    },
      +    "campaign": {
      +      "description": "Campaign data returned by the authorized safe projection.",
      +      "type": "object"
      +    },
      +    "eligible": {
      +      "description": "Eligible for the returned result.",
      +      "type": "integer"
      +    },
      +    "items": {
      +      "description": "Bounded items records returned by this tool.",
      +      "items": {
      +        "type": "object"
      +      },
      +      "type": "array"
      +    },
      +    "mutates": {
      +      "description": "Mutates flag; previews do not perform this action.",
      +      "enum": [
      +        false
      +      ],
      +      "type": "boolean"
      +    },
      +    "requested": {
      +      "description": "Requested for the returned result.",
      +      "type": "integer"
      +    },
      +    "scope": {
      +      "description": "Authorization scope of this result; data remains restricted to the connected business.",
      +      "enum": [
      +        "connection_business"
      +      ],
      +      "type": "string"
      +    },
      +    "sends": {
      +      "description": "Sends flag; previews do not perform this action.",
      +      "enum": [
      +        false
      +      ],
      +      "type": "boolean"
      +    },
      +    "skipped": {
      +      "description": "Skipped for the returned result.",
      +      "type": "integer"
      +    }
      +  },
      +  "required": [
      +    "campaign",
      +    "assistant_run",
      +    "requested",
      +    "eligible",
      +    "skipped",
      +    "items",
      +    "sends",
      +    "mutates",
      +    "scope"
      +  ],
      +  "type": "object"
      +}
  2. First observed

TDQS

B3.4/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true and destructiveHint=false, but the description reinforces this with 'without sending or changing records' and adds the authorization constraint ('one authorized referral campaign'), which tells the agent a campaign must be valid/permitted before calling. The trailing enumeration of return keys is largely redundant with the existing output schema and adds no behavioral depth.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The scope-and-safety sentence is well front-loaded, but the second sentence is filler and the third is a raw list of return keys that the output schema already provides. Roughly half the text does not earn its place.

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 two-parameter, read-only preview tool with annotations and an output schema, the description covers scope, safety, and authorization adequately. It leaves 'eligible' undefined and says nothing about failure when a campaign is unauthorized, but those are minor given the structured data available.

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 100%, and campaign_id is already documented in-schema as coming from search-referral-campaigns, so the schema carries the parameter burden. The description adds only the notion that exactly one campaign is targeted and nothing about how limit or eligibility filtering interacts with results, so the baseline 3 applies.

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 gives a specific verb (previews) plus a well-scoped resource: eligible completed jobs for a single referral campaign, explicitly without side effects. The resource wording ('referral campaign') separates it from the broadcast and reactivation preview siblings, but the description never names those alternatives directly.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

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

"Use to preview referral campaign in the connected business" only restates the tool name and provides no when-to-use condition, no when-not-to-use, and no pointer to preview-broadcast-campaign or preview-reactivation-campaign. An agent gets no routing guidance from the description beyond the tool's own label.

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.

Resources