Skip to main content
The 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.

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.

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.”

JSON-RPC Call Example (adjust_client_credits)