credits module provides tools to check client credit balances, inspect credit transaction history, and adjust credits.
Available Tools
get_client_credits
Check a client’s available credit balances by type.
- Type: Read-only
- Important Input Fields:
clientId(string, required): Unique identifier for the client.includeInactive(boolean, optional): Also include used, expired or inactive pools.page(integer, optional): Page number, starting at 1.limit(integer, optional): Items per page, default 10, maximum 100.
- Returns:
page,limit,totalandcredits[], ordered by expiry date. Request the next page whilepage * limit < total.totalAvailablealways covers every matching pool, independent of the page.
list_credit_mutations
List transaction history of additions/deductions to a client’s credits.
- Type: Read-only
- Important Input Fields:
clientId(string, required): Unique client ID.page(integer, optional): Page number.limit(integer, optional): Items per page.
adjust_client_credits Write
Manually add or deduct credits from a client’s balance.
- Type: Write
- Important Input Fields:
clientId(string, required): Unique identifier for the client.amount(integer, required): Number of credits to add (positive) or deduct (negative).creditType(string, required): The type of credit (e.g.,session,class).reason(string, optional): Context/reason for the manual adjustment.
list_credit_overdrafts
List bookings that were taken without enough credits (negative balance), with member, lesson, date, credits lost and the credit source. Filter by clientId or date range (YYYY-MM-DD).
- Type: Read
- Input Fields:
clientId(string, optional)startDate(string, optional)endDate(string, optional)page(integer, optional)limit(integer, optional)
Natural Language Examples
- “How many training credits does client client_9823 have remaining?”
- “Deduct 1 training credit from client client_5f81 because they cancelled late.”