Digicard MCP tools

By The Digicard team · Read as Markdown

About this reference

Every tool an organization’s owners and admins can use through the Digicard MCP server, generated from the registry the server itself serves. Inputs are named as the server expects them; the organization is always the one the connection was made for.

Looking things up

org_customers: Client customers

One client organization's customers, one row per person (by email), each with their cards and balances — the client's Customers page. 20 per page by default, at most 50. Void cards are left out.

  • Who: owners and admins.

Inputs:

  • search (optional): Matches a name, email or mobile number.
  • status (optional): active, dormant (no visit in 60 days) or new.
  • sort (optional): Defaults to the most recent visit first.
  • cardTemplateId (optional): Only cards from this template.
  • withEmail (optional): Leave out cards with no email address.
  • page (optional)
  • limit (optional)

export_customers: Export client customers

One client organization's customer list as table rows (header + one row per card): name, email, mobile, card, balance, wallet status and every sign-up answer. Same filters as org_customers. At most 2000 rows; truncated is true when there were more. Personal data in bulk — use org_customers for anything narrower. Each call is kept in the client's audit log for two years.

  • Who: owners.

Inputs:

  • search (optional): Matches a name, email or mobile number.
  • status (optional): active, dormant (no visit in 60 days) or new.
  • sort (optional): Defaults to the most recent visit first.
  • cardTemplateId (optional): Only cards from this template.

org_analytics: Client analytics

One client organization's analytics dashboard for a range: new cards, each ledger's earned/redeemed series (named from the card mechanics, e.g. Visits or Points), rewards, returning customers and per-branch figures. Days are Manila days. Optionally narrowed to one branch (teamId) or one card template.

  • Who: owners and admins.

Inputs:

  • range (optional): 30d (default), 90d or 12m.
  • teamId (optional): Only this branch.
  • cardTemplateId (optional)

org_audit_log: Client audit log

Everything done inside one client organization, newest first: its staff's writes and reads, and Digicard staff's support actions. Filter by resource (e.g. resourceType=card + resourceId for one card's history), actor, action, category, card template, date range, or channel="mcp" for only what was done through this MCP server. Cursor-paged: pass nextBefore back as before.

  • Who: owners and admins.

Inputs:

  • resourceType (optional)
  • resourceId (optional)
  • actorId (optional): The user id of who did it.
  • category (optional)
  • action (optional): An exact action, e.g. card.adjust.grant.
  • cardTemplateId (optional)
  • channel (optional)
  • from (optional): ISO time; entries at or after it.
  • to (optional): ISO time; entries at or before it.
  • before (optional): Cursor: entries strictly before this ISO time.
  • limit (optional): Default 50.

get_card: Customer card

One customer's card in a client organization, as the client's card page shows it: details, balance (named from its mechanic), history per ledger, rewards held and offered, which counters and fields can be adjusted or edited, wallet install status and its term. Use org_customers to find the card id.

  • Who: owners and admins.

Inputs:

  • cardId: The card id.

list_templates: List a client's card templates

A client organization's card templates, newest first, in brief: id, title, type, mechanic, enabled plugins and the branches (teamIds) offering it — empty teamIds means every branch. Pass teamId to keep only the templates offered at that branch. Use get_template for one template in full.

  • Who: owners and admins.

Inputs:

  • teamId (optional): A branch (team) id to filter by.

get_template: Get a card template

One of a client's card templates in full, exactly as the dashboard reads it: design, Apple and Google design, rewards, mechanic, enabled plugins, templateConfig, page designs, customer fields, plus walletResolution (the resolved Apple pass type, Google vertical and where each field lands on each pass). Read this before update_template — an edit replaces whole fields, so you need the current value to change part of one.

  • Who: owners and admins.

Inputs:

  • cardTemplateId: The template (from list_templates).

list_card_invites: Card invites (claim links)

The "Send card by email" invites one client organization has sent its customers, newest first: who, which card template, and whether the link is waiting (sent), expired, claimed, revoked or failed. Filter by templateId, status or the recipient's email. Imported customers' links are not listed here. Use an invite's id with resend_card_invite. 20 per page by default, at most 50.

  • Who: owners and admins.

Inputs:

  • templateId (optional)
  • status (optional)
  • email (optional): Only invites to this exact email address.
  • page (optional)
  • limit (optional)

list_staff_invitations: Staff invitations

The invitations one client organization has sent people to join it as owner, admin or member, newest first, with whether each is pending (and if so, expired), accepted, rejected or canceled. Use a pending invitation's id with resend_staff_invitation.

  • Who: owners and admins.

Inputs:

  • status (optional)

list_members: Members

The people in one client organization: name, email, role (owner, admin or member), when they joined and which branches they belong to — plus the invitations still pending (with whether each has expired). Use a member's id with change_member_role or remove_member, and an invitation's id with cancel_staff_invitation or resend_staff_invitation.

  • Who: owners and admins.

list_imported_customers: Imported customers

Customers an organization imported from its physical cards or an old system, in sheet row order, with where each stands: needs_review, ready (can be sent a link), lapsed, excluded, invited (holds a link; hasLiveInvite says whether it still works, sentAt whether staff confirmed sending it) or claimed. Filter by templateId, status, branch (as written on the sheet) or q (name, email, card number, or 4+ digits of the mobile). Also returns counts per status, the branches and templates seen, and per profile what edit_imported_customer may change. Claim links are never listed. 50 per page by default, at most 200.

  • Who: owners and admins.

Inputs:

  • templateId (optional)
  • status (optional)
  • branch (optional)
  • q (optional)
  • page (optional)
  • limit (optional)

org_billing: Billing (as the client sees it)

One organization's bill as its owners and admins see it on their Billing page: Active Cards and the fee per Billing Cycle (last 12 plus the current one, newest first), and each cycle's invoice with what is paid, outstanding or overdue. Amounts are in centavos (PHP 1 = 100). Digicard staff get more detail from get_client.

  • Who: owners and admins.

org_agreement: Client Service Agreement

One organization's Client Service Agreement: whether it may issue cards (standing), the signed agreement and its terms, any open offer awaiting signature, superseded versions, and the program schedule a signature would record. Signing is done on the Agreement page, never here. Reading never creates an offer.

  • Who: owners and admins.

Making changes

adjust_card: Adjust a card's balance or rewards

Correct one customer's balance or rewards in a client organization. operation: grant (add units to a counter; occurredAt dates a missed visit, at most 30 days back), revoke (remove units — refused whole if the card holds fewer), grant_reward / revoke_reward (a reward id the template offers), claimable (mark a perk as claimed or re-arm it: ruleId and claimed, plus inventoryId for a once-per-member perk or year for a birthday one). Counters, rewards and perks come from get_card (adjustableCounters, rewards, perks). Appends or voids ledger entries; never rewrites history. Fails with card_changed if the card was scanned meanwhile — re-read it and retry.

  • Who: owners and admins.
  • Changes data. Takes a reason; the client asks you before running it.

Inputs:

  • cardId: The card id (from org_customers or get_card).
  • operation
  • counterKey (optional): For grant/revoke: a counterKey from get_card.adjustableCounters.
  • amount (optional): For grant/revoke: how many units.
  • occurredAt (optional): For grant: when the visit actually happened (ISO time).
  • rewardId (optional): For grant_reward/revoke_reward: the reward's inventoryId.
  • ruleId (optional): For claimable: the perk's ruleId from get_card.perks.
  • claimed (optional): For claimable: true marks it claimed, false re-arms it.
  • inventoryId (optional): For claimable on a once-per-member perk: its inventoryId.
  • year (optional): For claimable on a birthday perk: the year.
  • reason: Why this change is being made. Recorded in the audit log; write it for a human reader.

amend_entry: Correct a ledger entry

Correct one past entry in a card's history (get_card.history gives ledgerKey and entry ids). operation: void (mark it void; it stays in the history), edit (its metadata — staff, notes… — only the fields get_card.editableEntryFields lists), amend (its amount, by voiding it and adding a replacement that keeps the original date and expiry; give visitType where the card has a visit-type menu, else amount). An entry that already paid for a reward cannot be amended.

  • Who: owners and admins.
  • Changes data. Takes a reason; the client asks you before running it.

Inputs:

  • cardId: The card id (from org_customers or get_card).
  • ledgerKey
  • entryId
  • operation
  • amount (optional): For amend: the corrected amount.
  • visitType (optional): For amend: the visit type, where a menu decides the amount.
  • fields (optional): For edit: the metadata to set.
  • reason: Why this change is being made. Recorded in the audit log; write it for a human reader.

send_card_message: Send a message to a card

Set the message on one customer's wallet pass and push it to Apple and Google Wallet. It replaces the card's current message and the customer sees it on their pass.

  • Who: owners and admins.
  • Changes data. Takes a reason; the client asks you before running it.

Inputs:

  • cardId: The card id (from org_customers or get_card).
  • message
  • reason: Why this change is being made. Recorded in the audit log; write it for a human reader.

edit_card_fields: Edit a card's details

Edit one customer card's details: the customer's name, email and mobile; their answers to the template's sign-up questions (customFields, keys from get_card.customerFields); and the plain values its mechanic allows (cardState, keys from get_card.editableStateFields — e.g. the name printed on the pass). Balances are not edited here: use adjust_card. Messages: use send_card_message. A blank optional answer erases it.

  • Who: owners and admins.
  • Changes data. Takes a reason; the client asks you before running it.

Inputs:

  • cardId: The card id (from org_customers or get_card).
  • name (optional)
  • email (optional)
  • mobileNumber (optional)
  • customFields (optional)
  • cardState (optional)
  • reason: Why this change is being made. Recorded in the audit log; write it for a human reader.

void_card: Void a card

Void one customer's card in a client organization: it stops working at the scanner and its customer page stops opening. There is no un-void from here. confirm must repeat the card id.

  • Who: owners and admins.
  • Changes data and cannot be undone. Takes a reason, and confirm repeating the target id.

Inputs:

  • cardId: The card id (from org_customers or get_card).
  • confirm: Repeat the card id exactly, to confirm this is the one you mean.
  • reason: Why this change is being made. Recorded in the audit log; write it for a human reader.

update_template: Edit a card template

Edits a client's card template through the same path as the dashboard's Save: images must be uploaded URLs (never data: URLs), templateConfig is checked against the mechanic, and the change is audited in the client's activity log. Each field in changes replaces the stored value whole, so read get_template first. Edits to title, description, design, appleDesign, googleDesign, rewards, mechanic, enabledPlugins or teamIds refresh EVERY pass already issued from the template; templateConfig, pageDesigns and customerFields reach cards live with no push. ⚠️ A change to title, design or googleDesign also rewrites the Google Wallet class, which sends a class Google has APPROVED back into review — the client's Google passes may be held until Google re-approves. Such an edit is refused unless confirm repeats the template id; ask the user first.

  • Who: owners and admins.
  • Changes data. Takes a reason; the client asks you before running it.

Inputs:

  • cardTemplateId: The template (from list_templates).
  • changes: The fields to change, any of: title, description, type, rewards, design, appleDesign, googleDesign, mechanic, enabledPlugins, templateConfig, teamIds, pageDesigns, customerFields. Each one REPLACES the stored value whole — send the complete design/appleDesign/googleDesign/templateConfig/rewards/customerFields from get_template with your edit applied, never just the property you are changing.
  • reason: Why this change is being made. Recorded in the audit log; write it for a human reader.
  • confirm (optional): Required only when the edit changes the Google Wallet class (title, design or googleDesign): repeat the template id to confirm the class may go back into Google review.

resend_card_invite: Resend a card invite

Email a customer a NEW claim link for the same card, from an invite in list_card_invites — for a link that expired, failed to send, or that they lost. The previous link stops working. Refused for an invite already claimed, for a customer who already holds that card, and for an imported customer's link.

  • Who: owners and admins.
  • Changes data. Takes a reason; the client asks you before running it.

Inputs:

  • inviteId: The card invite id (from list_card_invites).
  • reason: Why this change is being made. Recorded in the audit log; write it for a human reader.

resend_staff_invitation: Resend a staff invitation

Email a pending invitation to join a client organization again, and give its accept link another 7 days — including one that had expired. Only an owner (or Digicard staff) can resend an invitation to become an owner. Refused for an invitation already accepted, rejected or canceled, and for someone already a member.

  • Who: owners and admins.
  • Changes data. Takes a reason; the client asks you before running it.

Inputs:

  • invitationId: The invitation id (from list_staff_invitations).
  • reason: Why this change is being made. Recorded in the audit log; write it for a human reader.

invite_member: Invite a member

Email someone an invitation to join a client organization as owner, admin or member; the link lasts 7 days. Optionally name the branches (team ids from list_members) they will join on accepting. If they already have a pending invitation for the same role, that one is resent instead of a second being made. Only an owner (or Digicard staff) can invite an owner. Refused for someone already a member.

  • Who: owners and admins.
  • Changes data. Takes a reason; the client asks you before running it.

Inputs:

  • email: Their email address.
  • role: owner, admin or member (scan-only staff).
  • teamIds (optional)
  • reason: Why this change is being made. Recorded in the audit log; write it for a human reader.

cancel_staff_invitation: Cancel a staff invitation

Cancel a pending invitation to join a client organization, so its accept link stops working. Only a pending invitation can be cancelled; one already accepted is a member (use remove_member). Only an owner (or Digicard staff) can cancel an invitation to become an owner.

  • Who: owners and admins.
  • Changes data. Takes a reason; the client asks you before running it.

Inputs:

  • invitationId: The invitation id (from list_members or list_staff_invitations).
  • reason: Why this change is being made. Recorded in the audit log; write it for a human reader.

change_member_role: Change a member's role

Make a member of a client organization an owner, admin or member (scan-only). Only an owner (or Digicard staff) can change an owner's role or make someone an owner, and the organization's last owner cannot be demoted — make someone else an owner first.

  • Who: owners and admins.
  • Changes data. Takes a reason; the client asks you before running it.

Inputs:

  • memberId: The member id (from list_members).
  • role: owner, admin or member (scan-only staff).
  • reason: Why this change is being made. Recorded in the audit log; write it for a human reader.

remove_member: Remove a member

Remove someone from a client organization: they lose access at once and leave every branch of it. Their account is kept; inviting them again brings them back. Only an owner (or Digicard staff) can remove an owner, and never the last owner. Cannot be undone from here.

  • Who: owners and admins.
  • Changes data and cannot be undone. Takes a reason, and confirm repeating the target id.

Inputs:

  • memberId: The member id (from list_members).
  • confirm: Repeat the member id exactly, to confirm this is the one you mean.
  • reason: Why this change is being made. Recorded in the audit log; write it for a human reader.

send_card_invite: Send a card by email

Email one or more people a claim link for a card template ("Send card by email" on the template page). At most 20 recipients per call, each with a name and email (mobileNumber optional); a repeated email is sent once. Someone who already holds this card is skipped, and any earlier unclaimed link to the same person stops working. Returns each recipient's status (sent, skipped_existing_card, failed) and a summary. Refused with agreement_required for an organization that must sign its Client Service Agreement first.

  • Who: owners and admins.
  • Changes data. Takes a reason; the client asks you before running it.

Inputs:

  • cardTemplateId: The card template id (from list_templates).
  • recipients: Who to send the card to, at most 20.
  • reason: Why this change is being made. Recorded in the audit log; write it for a human reader.

broadcast_template_message: Message every cardholder of a template

Set one message on EVERY customer card of a template (void cards excepted) and push it to Apple and Google Wallet: it replaces each card's current message and every cardholder sees it on their pass. There is no undo. At most 500 characters. confirm must repeat the cardTemplateId. Returns how many cards it reached. To message one customer, use send_card_message.

  • Who: owners and admins.
  • Changes data and cannot be undone. Takes a reason, and confirm repeating the target id.

Inputs:

  • cardTemplateId: The card template id (from list_templates).
  • message
  • confirm: Repeat the card template id exactly, to confirm this is the one you mean.
  • reason: Why this change is being made. Recorded in the audit log; write it for a human reader.

send_import_invite: Send an imported customer their claim link

Make (or replace) one imported customer's claim link; any earlier link stops working. channel: email (sends it to the address on file), viber (returns the link and a ready-to-paste message for staff to send — then call mark_import_invite_sent once they have), in_store (returns the link to show as a QR). Only for a customer who is ready or invited. Refused with agreement_required for an organization that must sign its Client Service Agreement first.

  • Who: owners and admins.
  • Changes data. Takes a reason; the client asks you before running it.

Inputs:

  • importedCustomerId: The imported customer id (from list_imported_customers).
  • channel
  • reason: Why this change is being made. Recorded in the audit log; write it for a human reader.

send_import_invites_batch: Email the next batch of imported customers

Email claim links to the next 20 imported customers of a template who are ready and have an email address, in sheet row order. Returns sent, remaining and each row's result. Call again while remaining is above zero, but STOP when sent is 0: a failed address stays ready and would be picked again forever.

  • Who: owners and admins.
  • Changes data. Takes a reason; the client asks you before running it.

Inputs:

  • templateId: The card template id (from list_templates).
  • reason: Why this change is being made. Recorded in the audit log; write it for a human reader.

edit_imported_customer: Correct an imported customer

Correct one imported customer before they claim: name, email, mobile, customFields (keys from the profile in list_imported_customers; a blank value erases), issuedAt (purchase date, YYYY-MM-DD; the expiry follows), usedRewardRoles (which held rewards were already used, by role), seedYears (years recorded per editable key), or action: approve (a needs_review row), exclude, restore (an excluded row). A pending link is updated to match, or revoked when the row is excluded or lapses. A later re-import will not undo the edit. Refused once claimed — correct the card instead (edit_card_fields).

  • Who: owners and admins.
  • Changes data. Takes a reason; the client asks you before running it.

Inputs:

  • importedCustomerId: The imported customer id (from list_imported_customers).
  • name (optional)
  • email (optional): An empty string removes the email.
  • mobile (optional)
  • customFields (optional)
  • issuedAt (optional)
  • usedRewardRoles (optional)
  • seedYears (optional)
  • action (optional)
  • reason: Why this change is being made. Recorded in the audit log; write it for a human reader.

mark_import_invite_sent: Confirm an import link was sent

Record that staff actually sent an imported customer the link made by send_import_invite (viber or in_store), so the tracking page stops listing them as made-but-not-sent. Only for a customer with a pending link (invited).

  • Who: owners and admins.
  • Changes data. Takes a reason; the client asks you before running it.

Inputs:

  • importedCustomerId: The imported customer id (from list_imported_customers).
  • reason: Why this change is being made. Recorded in the audit log; write it for a human reader.

The connection itself

list_my_organizations: My organizations

What this connection is acting on now, and what it can switch to: the organizations this person belongs to (with their role in each), and Digicard staff mode for platform admins. Use before switch_organization, when unsure which organization a request is about, or when tools seem to be missing (it says why the current organization is unavailable).

  • Who: anyone connected.

switch_organization: Switch organization

Change which organization this connection acts on, without reconnecting: give organizationId (one from list_my_organizations) to act as a member of it with your role there, or staff: true (platform admins) to act as Digicard staff across clients. Lasts until switched again or the connection is disconnected. Confirm with the person before switching if the request does not make the organization clear.

  • Who: anyone connected.

Inputs:

  • staff (optional): Act as Digicard staff instead of as a member of one organization.