Skip to main content
Glama

setup_loyalty_card

Phase 7 (round 3): set up a digital loyalty stamp card on an editor app — "collect N stamps, get a reward". Creates the loyalty card design (name, stamps required, reward, stamp icon, card colour) and adds the loyalty page. One loyalty page per app: an existing one is updated rather than duplicated, and a card of the same name is updated rather than duplicated. Never invent the reward or the number of stamps — ask the owner. This is NOT points-per-spend and NOT discount coupons. Customers must sign in to the app to hold a card.

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": {
      "appId": "<appId>",
      "cardName": "<cardName>",
      "stampsRequired": "<stampsRequired>",
      "rewardDescription": "<rewardDescription>"
    },
    "name": "setup_loyalty_card"
  }
}

Input Schema

NameRequiredDescriptionDefault
appIdYesThe editor app id (UUID).
cardNameYesName of the card as customers see it, e.g. "Coffee Club". Required.
pageTitleNoTitle of the loyalty page. Defaults to "Loyalty Rewards".
stampIconNoIcon shown for each stamp. Defaults to "star".
cardBgColorNoCard background colour as #rrggbb. Optional — defaults to the app branding.
descriptionNoShort line explaining the card. Optional.
stampsRequiredYesHow many stamps fill the card, e.g. 10. Required. 1-50.
rewardDescriptionYesWhat they get when the card is full, e.g. "A free coffee". Required.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.5/5.0
Behavior4/5

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

With no annotations, the description carries the full burden and does substantial work: it discloses the upsert semantics (one page per app, same-name cards updated rather than duplicated) and the sign-in requirement for cardholders. What it leaves out is the effect of an update on an existing card's design and any existing stamps, plus permission/auth requirements — relevant for a mutation of this kind.

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?

Content is front-loaded: what it creates, then idempotency rules, then exclusions and constraints. The opening 'Phase 7 (round 3)' tag is internal workflow metadata of dubious value to an agent and is the one sentence fragment that does not clearly 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 an 8-parameter mutation tool with no output schema and no annotations, the description covers purpose, creation fields, duplication rules, exclusions, and a user-confirmation rule. The main gap is what the call returns and how updating an existing card affects its current design or stamps, but nothing essential for correct invocation is missing.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so the baseline is 3, but the description adds real meaning by revealing that cardName acts as an identity key (same name => update, not duplicate) and that appId scopes the one-page-per-app restriction. It does not add anything about stampsRequired range or the enum options, which the schema already handles.

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

Purpose5/5

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

States a specific verb and resource — 'set up a digital loyalty stamp card on an editor app' — and immediately concretizes it as 'collect N stamps, get a reward'. It also names what it is not (points-per-spend, discount coupons), which cleanly separates it from the sibling setup_loyalty_points.

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

Usage Guidelines5/5

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

Gives explicit exclusions ('NOT points-per-spend and NOT discount coupons') and a hard precondition on data gathering: 'Never invent the reward or the number of stamps — ask the owner.' It also warns that customers must sign in to hold a card, which is a suitability condition an agent must check before choosing this tool.

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