Skip to main content
Glama

setup_loyalty_points

Phase 7 (round 4): set up a points ("stars") loyalty programme on an editor app — customers earn points per unit of spend and redeem them against named rewards. Creates the programme (earn rate, currency symbol, description), its rewards list, and adds the rewards page. One points page per app: an existing programme and page are updated rather than duplicated. Never invent the earn rate or the rewards — ask the owner. This is NOT a stamp card (use setup_loyalty_card) and NOT discount coupons. Customers must sign in to the app to hold a points balance.

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>",
      "pointsPerCurrencyUnit": "<pointsPerCurrencyUnit>",
      "rewards": "<rewards>"
    },
    "name": "setup_loyalty_points"
  }
}

Input Schema

NameRequiredDescriptionDefault
appIdYesThe editor app id (UUID).
rewardsYesThe rewards customers can redeem points for. Required, at least one. Ask the owner — do not invent rewards.
pageTitleNoTitle of the rewards page. Defaults to "Loyalty Points".
descriptionNoShort line explaining how the programme works. Optional.
programNameNoName of the programme. Defaults to "Star Rewards Program".
currencySymbolNoCurrency symbol for spend, e.g. "£", "$", "€". Defaults to "£" — confirm with the owner.
pointsPerCurrencyUnitYesHow many points a customer earns per 1 unit of spend (e.g. 10 points per £1). Required. 1-1000.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.3/5.0
Behavior4/5

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

With no annotations supplied, the description carries the full burden and does well: it discloses the update-instead-of-duplicate behaviour, the precondition that customers must sign in to hold a balance, and the constraint that earn rate and rewards must come from the owner. It does not cover permissions, whether the change is immediately live, or what the call returns, which keeps it short of a 5.

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 body is dense and every sentence carries information: scope, output artifacts, idempotency, exclusions, sourcing rule, and precondition. The leading internal label "Phase 7 (round 4)" is workflow jargon that does not help an agent decide anything and slightly delays the substantive content.

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 seven-parameter creation tool with a nested rewards array and no output schema, the description covers what gets created, the singleton/update semantics, and the authorisation precondition for end customers. The main remaining gap is what the call returns on success (e.g., created ids or page reference), which matters given there is no output schema.

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%, so all seven parameters including the nested reward fields are already documented, making 3 the baseline. The description reinforces provenance for the two most error-prone inputs (earn rate, rewards) but adds no format or validation detail beyond the schema's own notes such as the 1-1000 range and default values.

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?

The description names a specific verb and resource — creating a points ("stars") loyalty programme with an earn rate, currency, description, and rewards list, plus the accompanying rewards page. It explicitly distinguishes itself from setup_loyalty_card and discount coupons, so an agent can route correctly without opening the schema.

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?

It states when to use it, names the alternative for the adjacent case ("This is NOT a stamp card (use setup_loyalty_card)"), and adds a data-provenance rule ("Never invent the earn rate or the rewards — ask the owner"). It also documents the upsert condition: one points page per app, existing ones are updated rather than duplicated.

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