Skip to main content
Glama

Create a loyalty card

create_card

Saves a loyalty card design and its rewards to a Leal store, ready for customers to add to Apple Wallet or Google Wallet. Takes the same design fields as preview_card_designs. Logos and strip photos are fetched from their URLs; if the store has no logo yet, the card's logo becomes the store logo. Needs a Leal account: the person is asked to sign in or create one.

Input Schema

NameRequiredDescriptionDefault
nameYesInternal name for the card, e.g. "Coffee card". Shown in Leal, not on the pass.
rewardsYesRewards customers can redeem, e.g. [{name: "Free coffee", stamps_required: 10}]. The free plan allows one reward per card.
logo_urlNoPublic https URL of the wide logo shown top-left of the Apple pass (PNG, JPEG, WebP, GIF or SVG; transparent PNG works best). Ideally a version that reads on card_color.
store_idNoStore id from list_stores. Optional when the login has one store.
card_colorNoPass background colour, hex (#RRGGBB).
stamp_iconNoIcon shown in each collected stamp.
strip_typeNoBackground of the stamp strip: a flat colour, one of Leal's preset photos, or an image from strip_image_url.
text_colorNoColour of all text on the pass, hex. Must read clearly on card_color (4.5:1 contrast or better).
header_textNoText at the top of the pass. Defaults to the store name. Wallet apps truncate long headers, so keep it short.
stamp_colorNoColour of the icon inside a collected stamp, hex. Must read clearly on stamp_background_color.
strip_colorNoStrip colour, hex. Also shows behind preset and image strips when strip_opacity is below 100.
strip_presetNoPreset strip photo, used when strip_type is preset.
strip_opacityNoOpacity of the strip colour or image over the card colour. 100 shows it exactly; 60–85 tints a photo with the card colour so stamps stand out.
initial_stampsNoStamps a new customer starts with (a head start). Must be less than stamps_required.
square_logo_urlNoPublic https URL of a square logo or icon, used as the round logo on Google Wallet.
stamps_requiredNoStamps needed to fill the card. 6, 8 or 10 are common.
strip_image_urlNoPublic https URL of a wide photo for the strip (strip_type image), e.g. a hero image from the brand's website. Cropped to 375×144.
auxiliary_fieldsNoUp to two extra front-of-pass fields, e.g. {label: "Perk", value: "10% off pastries"}.
show_member_fieldNoShow the customer's name on the front of the pass. Default true.
stamp_background_colorNoFill colour of a collected stamp circle, hex. Empty stamp slots use a translucent version of it, so it should stand out from the strip.
show_stamps_to_reward_fieldNoShow how many stamps until the next reward. Default true.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

Score is being calculated.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources