AI tools — Gym Master

57 tools. The latest schema is always in gym_tool_catalog once connected.

Book a class

Write proposalScope: gym:write
gym_book_class

Book a group class session (Yoga, Zumba…) for a member with a class package, by class name and date. Creates a proposal; it only runs after the user taps Confirm in the app.

ParameterTypeRequiredDescription
memberCodestringnoMember code (e.g. HV001)
classNamestringyesClass name
datestringyesDate (yyyy-MM-dd)
startTimestringnoStart time (HH:mm)
packagestringnoClass package name when the member has several
MCP call example (for AI assistants)

AI assistants send this call themselves when you ask in plain words; you only need it when debugging an MCP connection.

{
  "name": "gym_book_class",
  "arguments": {
    "args": {
      "memberCode": "HV001",
      "className": "Yoga cơ bản",
      "date": "2026-10-30",
      "startTime": "18:00"
    }
  }
}

Book a PT session

Write proposalScope: gym:write
gym_book_pt_session

Book a 1-on-1 PT session for a member with a PT package, with a specific trainer and time. Creates a proposal; it only runs after the user taps Confirm in the app.

ParameterTypeRequiredDescription
memberCodestringnoMember code (e.g. HV001)
trainerstringyesPT trainer name or staff code
datestringyesDate (yyyy-MM-dd)
startTimestringyesStart time (HH:mm)
endTimestringnoEnd time (HH:mm)
contractCodestringnoContract code
notesstringnoNotes
MCP call example (for AI assistants)

AI assistants send this call themselves when you ask in plain words; you only need it when debugging an MCP connection.

{
  "name": "gym_book_pt_session",
  "arguments": {
    "args": {
      "memberCode": "HV001",
      "trainer": "Trần Minh Khoa",
      "date": "2026-10-30",
      "startTime": "07:00",
      "endTime": "08:00"
    }
  }
}

Check-ins

ReadScope: gym:read
gym_checkins_query

Query check-ins: count, list or group; filter by date, member, currently in the gym.

ParameterTypeRequiredDescription
opstringnocount = count only, list = list (default), group = count by groupBy
filterobject[]noFilters [{field, op, value}]; dates as yyyy-MM-dd or periods (today, this_week…)
matchstringnoall = every condition (default), any = any condition
groupBystringnoGroup by
sortstringnoSort "<key> asc|desc"
limitintegernoMax rows
pageintegernoPage, starting at 1
fieldsstring[]noFields to return
idsstring[]noRecord ids from a previous result
searchstringnoName, code or phone
inGymNowbooleannotrue = currently in the gym (not checked out)
branchstringnoBranch name or id; empty = all visible branches

Or call over REST with an API key

curl -X POST https://api.nextx.vn/api/v1/ai/tools/gym/gym_checkins_query/read \
  -H "X-Api-Key: $API_KEY" -H "Content-Type: application/json" \
  -d '{"op":"count","filter":[{"field":"date","op":"eq","value":"today"}]}'
MCP call example (for AI assistants)

AI assistants send this call themselves when you ask in plain words; you only need it when debugging an MCP connection.

{
  "name": "gym_checkins_query",
  "arguments": {
    "args": {
      "op": "count",
      "filter": [
        {
          "field": "date",
          "op": "eq",
          "value": "today"
        }
      ]
    }
  }
}

Class bookings

ReadScope: gym:read
gym_classbookings_query

Query class bookings: who booked, busiest classes, no-shows, cancellations; count, list or group.

ParameterTypeRequiredDescription
opstringnocount = count only, list = list (default), group = count by groupBy
filterobject[]noFilters [{field, op, value}]; dates as yyyy-MM-dd or periods (today, this_week…)
matchstringnoall = every condition (default), any = any condition
groupBystringnoGroup by
sortstringnoSort "<key> asc|desc"
limitintegernoMax rows
pageintegernoPage, starting at 1
fieldsstring[]noFields to return
idsstring[]noRecord ids from a previous result
searchstringnoName, code or phone
branchstringnoBranch name or id; empty = all visible branches

Or call over REST with an API key

curl -X POST https://api.nextx.vn/api/v1/ai/tools/gym/gym_classbookings_query/read \
  -H "X-Api-Key: $API_KEY" -H "Content-Type: application/json" \
  -d '{"op":"list","limit":10}'
MCP call example (for AI assistants)

AI assistants send this call themselves when you ask in plain words; you only need it when debugging an MCP connection.

{
  "name": "gym_classbookings_query",
  "arguments": {
    "args": {
      "op": "list",
      "limit": 10
    }
  }
}

Staff commissions

ReadScope: gym:read
gym_commissions_query

Staff commission slips (PT, sales) by period and payout status.

ParameterTypeRequiredDescription
periodstringnoPeriod: today, week, month, last_month…
fromstring (date)noFrom date (yyyy-MM-dd)
tostring (date)noTo date (yyyy-MM-dd)
branchstringnoBranch name or id; empty = all visible branches
staffIdstring (uuid)noStaff id
staffTypestringnoStaff type (PT, sales…)
statusstringnoStatus
pageintegernoPage, starting at 1
limitintegernoMax rows

Or call over REST with an API key

curl -X POST https://api.nextx.vn/api/v1/ai/tools/gym/gym_commissions_query/read \
  -H "X-Api-Key: $API_KEY" -H "Content-Type: application/json" \
  -d '{"period":"month","staffType":"PT"}'
MCP call example (for AI assistants)

AI assistants send this call themselves when you ask in plain words; you only need it when debugging an MCP connection.

{
  "name": "gym_commissions_query",
  "arguments": {
    "args": {
      "period": "month",
      "staffType": "PT"
    }
  }
}

Export contracts

ExportScope: gym:export
gym_contracts_export

Export contracts to Excel by filter or id list; returns an export proposal and confirmation link.

ParameterTypeRequiredDescription
filterobject[]noFilters [{field, op, value}]; dates as yyyy-MM-dd or periods (today, this_week…)
matchstringnoall = every condition (default), any = any condition
idsstring[]noRecord ids from a previous result
MCP call example (for AI assistants)

AI assistants send this call themselves when you ask in plain words; you only need it when debugging an MCP connection.

{
  "name": "gym_contracts_export",
  "arguments": {
    "args": {
      "ids": [
        "0199a1b2-c3d4-7e5f-8a9b-0c1d2e3f4a5b"
      ]
    }
  }
}

Membership contracts

ReadScope: gym:read
gym_contracts_query

Query member contracts: unpaid, frozen, expiring, total receivable; count, list or group.

ParameterTypeRequiredDescription
opstringnocount = count only, list = list (default), group = count by groupBy
filterobject[]noFilters [{field, op, value}]; dates as yyyy-MM-dd or periods (today, this_week…)
matchstringnoall = every condition (default), any = any condition
groupBystringnoGroup by
sortstringnoSort "<key> asc|desc"
limitintegernoMax rows
pageintegernoPage, starting at 1
fieldsstring[]noFields to return
idsstring[]noRecord ids from a previous result
searchstringnoName, code or phone
expiringWithinDaysintegernoExpiring from today to N days ahead
sumFieldsstring[]noTotals to compute over the whole set, returned in totals
branchstringnoBranch name or id; empty = all visible branches

Or call over REST with an API key

curl -X POST https://api.nextx.vn/api/v1/ai/tools/gym/gym_contracts_query/read \
  -H "X-Api-Key: $API_KEY" -H "Content-Type: application/json" \
  -d '{"op":"group","groupBy":"status"}'
MCP call example (for AI assistants)

AI assistants send this call themselves when you ask in plain words; you only need it when debugging an MCP connection.

{
  "name": "gym_contracts_query",
  "arguments": {
    "args": {
      "op": "group",
      "groupBy": "status"
    }
  }
}

Create a membership package

Write proposalScope: gym:write
gym_create_package

Create a gym package with a name, type, term or session count, and price. Does not sell it or take payment. Creates a proposal; it only runs after the user taps Confirm in the app.

ParameterTypeRequiredDescription
namestringyesPackage name
packageTypestringnoSTANDARD, PT or CLASS
unitstringnoTIME_BASED or SESSION_BASED
durationMonthsintegernoMonths
durationDaysintegernoDays
sessionCountintegernoSessions
pricenumberyesPrice
MCP call example (for AI assistants)

AI assistants send this call themselves when you ask in plain words; you only need it when debugging an MCP connection.

{
  "name": "gym_create_package",
  "arguments": {
    "args": {
      "name": "Gói 12 tháng",
      "packageType": "STANDARD",
      "unit": "TIME_BASED",
      "durationMonths": 12,
      "price": 6000000
    }
  }
}

Check-in device status

ReadScope: gym:read
gym_devices_status

Check-in devices and agents per branch: online or offline, last contact.

ParameterTypeRequiredDescription
branchstringnoBranch name or id

Or call over REST with an API key

curl -X POST https://api.nextx.vn/api/v1/ai/tools/gym/gym_devices_status/read \
  -H "X-Api-Key: $API_KEY" -H "Content-Type: application/json" \
  -d '{}'
MCP call example (for AI assistants)

AI assistants send this call themselves when you ask in plain words; you only need it when debugging an MCP connection.

{
  "name": "gym_devices_status",
  "arguments": {
    "args": {}
  }
}

Explain an error code

ReadScope: gym:read
gym_errors_explain

Explain a gym error code or message: meaning, cause, what to do next.

ParameterTypeRequiredDescription
errorstringyesError code or message to explain

Or call over REST with an API key

curl -X POST https://api.nextx.vn/api/v1/ai/tools/gym/gym_errors_explain/read \
  -H "X-Api-Key: $API_KEY" -H "Content-Type: application/json" \
  -d '{"error":"DeniedExpired"}'
MCP call example (for AI assistants)

AI assistants send this call themselves when you ask in plain words; you only need it when debugging an MCP connection.

{
  "name": "gym_errors_explain",
  "arguments": {
    "args": {
      "error": "DeniedExpired"
    }
  }
}

Freeze a contract

Write proposalScope: gym:write
gym_freeze_contract

Freeze a gym contract from today (or a future date) until the resume date, without a freeze fee. Creates a proposal; it only runs after the user taps Confirm in the app.

ParameterTypeRequiredDescription
contractCodestringnoContract code
memberCodestringnoMember code (e.g. HV001)
resumeDatestringyesResume date (yyyy-MM-dd)
freezeDatestringnoFreeze start date (yyyy-MM-dd, default today)
reasonstringnoReason
MCP call example (for AI assistants)

AI assistants send this call themselves when you ask in plain words; you only need it when debugging an MCP connection.

{
  "name": "gym_freeze_contract",
  "arguments": {
    "args": {
      "contractCode": "HD00123",
      "resumeDate": "2026-11-30",
      "reason": "Đi công tác"
    }
  }
}

Locker status

ReadScope: gym:read
gym_lockers_report

Current locker status: total, rented, free, by locker type.

No parameters.

Or call over REST with an API key

curl -X POST https://api.nextx.vn/api/v1/ai/tools/gym/gym_lockers_report/read \
  -H "X-Api-Key: $API_KEY" -H "Content-Type: application/json" \
  -d '{}'
MCP call example (for AI assistants)

AI assistants send this call themselves when you ask in plain words; you only need it when debugging an MCP connection.

{
  "name": "gym_lockers_report",
  "arguments": {
    "args": {}
  }
}

Loyalty points

ReadScope: gym:read
gym_loyalty_report

Loyalty overview: members with cards, total outstanding points and top members.

ParameterTypeRequiredDescription
topCountintegernoTop members by points (default 10, max 20)

Or call over REST with an API key

curl -X POST https://api.nextx.vn/api/v1/ai/tools/gym/gym_loyalty_report/read \
  -H "X-Api-Key: $API_KEY" -H "Content-Type: application/json" \
  -d '{"topCount":10}'
MCP call example (for AI assistants)

AI assistants send this call themselves when you ask in plain words; you only need it when debugging an MCP connection.

{
  "name": "gym_loyalty_report",
  "arguments": {
    "args": {
      "topCount": 10
    }
  }
}

Manual check-in

Write proposalScope: gym:write
gym_manual_checkin

Manually check in a member. Creates a proposal; it only runs after the user taps Confirm in the app.

ParameterTypeRequiredDescription
member_querystringnoMember code, phone or full name
MCP call example (for AI assistants)

AI assistants send this call themselves when you ask in plain words; you only need it when debugging an MCP connection.

{
  "name": "gym_manual_checkin",
  "arguments": {
    "args": {
      "member_query": "HV001"
    }
  }
}

Member change log

ReadScope: gym:read
gym_member_changes

Who changed what and when on one member and their contracts and receipts.

ParameterTypeRequiredDescription
codestringnoMember code or contract code
memberstringnoMember profile id

Or call over REST with an API key

curl -X POST https://api.nextx.vn/api/v1/ai/tools/gym/gym_member_changes/read \
  -H "X-Api-Key: $API_KEY" -H "Content-Type: application/json" \
  -d '{"code":"HV001"}'
MCP call example (for AI assistants)

AI assistants send this call themselves when you ask in plain words; you only need it when debugging an MCP connection.

{
  "name": "gym_member_changes",
  "arguments": {
    "args": {
      "code": "HV001"
    }
  }
}

Member history

ReadScope: gym:read
gym_member_history

Contract and payment history of one member by code.

ParameterTypeRequiredDescription
codestringnoMember code or contract code
memberstringnoMember profile id

Or call over REST with an API key

curl -X POST https://api.nextx.vn/api/v1/ai/tools/gym/gym_member_history/read \
  -H "X-Api-Key: $API_KEY" -H "Content-Type: application/json" \
  -d '{"code":"HV001"}'
MCP call example (for AI assistants)

AI assistants send this call themselves when you ask in plain words; you only need it when debugging an MCP connection.

{
  "name": "gym_member_history",
  "arguments": {
    "args": {
      "code": "HV001"
    }
  }
}

Export members

ExportScope: gym:export
gym_members_export

Export members to Excel by filter; returns an export proposal and confirmation link.

ParameterTypeRequiredDescription
filterobject[]noFilters [{field, op, value}]; dates as yyyy-MM-dd or periods (today, this_week…)
matchstringnoall = every condition (default), any = any condition
MCP call example (for AI assistants)

AI assistants send this call themselves when you ask in plain words; you only need it when debugging an MCP connection.

{
  "name": "gym_members_export",
  "arguments": {
    "args": {
      "match": "all",
      "filter": [
        {
          "field": "status",
          "op": "eq",
          "value": "ACTIVE"
        }
      ]
    }
  }
}

Members

ReadScope: gym:read
gym_members_query

Query members: list, count, expiring, new, birthdays, inactive; count, list or group.

ParameterTypeRequiredDescription
opstringnocount = count only, list = list (default), group = count by groupBy
filterobject[]noFilters [{field, op, value}]; dates as yyyy-MM-dd or periods (today, this_week…)
matchstringnoall = every condition (default), any = any condition
groupBystringnoGroup by
sortstringnoSort "<key> asc|desc"
limitintegernoMax rows
pageintegernoPage, starting at 1
fieldsstring[]noFields to return
idsstring[]noRecord ids from a previous result
searchstringnoName, code or phone
memberStatusstringnoCard status: ACTIVE, EXPIRING_SOON, FROZEN…
expiringInDaysintegernoExpiring within N days (0 = today)
cardExpiresWithinDaysintegernoCard expires within N days
birthdayWithinDaysintegernoBirthday within N days (0 = today, max 31)
noCheckinDaysintegernoNo check-in for N days
neverCheckedInbooleannotrue = never checked in
hasActivePackagestringnoHas an active package of this type
phonesstring[]noPhone numbers
branchstringnoBranch name or id; empty = all visible branches

Or call over REST with an API key

curl -X POST https://api.nextx.vn/api/v1/ai/tools/gym/gym_members_query/read \
  -H "X-Api-Key: $API_KEY" -H "Content-Type: application/json" \
  -d '{"op":"group","groupBy":"status"}'
MCP call example (for AI assistants)

AI assistants send this call themselves when you ask in plain words; you only need it when debugging an MCP connection.

{
  "name": "gym_members_query",
  "arguments": {
    "args": {
      "op": "group",
      "groupBy": "status"
    }
  }
}

Print a contract

Write proposalScope: gym:write
gym_print_contract

Prepare the print of one gym contract by contract code or member code. Creates a proposal; it renders only after the user taps Confirm in the app.

ParameterTypeRequiredDescription
contractCodestringnoContract code
memberCodestringnoMember code
templateNamestringnoPrint template name
MCP call example (for AI assistants)

AI assistants send this call themselves when you ask in plain words; you only need it when debugging an MCP connection.

{
  "name": "gym_print_contract",
  "arguments": {
    "args": {
      "contractCode": "HD00123"
    }
  }
}

Print a ticket receipt

Write proposalScope: gym:write
gym_print_ticket

Prepare the receipt of one gym ticket by phone, member code, or QR. Creates a proposal; it renders only after the user taps Confirm in the app.

ParameterTypeRequiredDescription
ticketQuerystringyesPhone, member code, or QR
MCP call example (for AI assistants)

AI assistants send this call themselves when you ask in plain words; you only need it when debugging an MCP connection.

{
  "name": "gym_print_ticket",
  "arguments": {
    "args": {
      "ticketQuery": "0901234567"
    }
  }
}

PT sessions

ReadScope: gym:read
gym_ptsessions_query

Query PT sessions: today, completed, cancelled, no-show, by trainer; count, list or group.

ParameterTypeRequiredDescription
opstringnocount = count only, list = list (default), group = count by groupBy
filterobject[]noFilters [{field, op, value}]; dates as yyyy-MM-dd or periods (today, this_week…)
matchstringnoall = every condition (default), any = any condition
groupBystringnoGroup by
sortstringnoSort "<key> asc|desc"
limitintegernoMax rows
pageintegernoPage, starting at 1
fieldsstring[]noFields to return
idsstring[]noRecord ids from a previous result
searchstringnoName, code or phone
branchstringnoBranch name or id; empty = all visible branches

Or call over REST with an API key

curl -X POST https://api.nextx.vn/api/v1/ai/tools/gym/gym_ptsessions_query/read \
  -H "X-Api-Key: $API_KEY" -H "Content-Type: application/json" \
  -d '{"op":"group","groupBy":"pt_name"}'
MCP call example (for AI assistants)

AI assistants send this call themselves when you ask in plain words; you only need it when debugging an MCP connection.

{
  "name": "gym_ptsessions_query",
  "arguments": {
    "args": {
      "op": "group",
      "groupBy": "pt_name"
    }
  }
}

Register a new member

Write proposalScope: gym:write
gym_register_member

Register a new member profile at the current branch (no package, no payment). Creates a proposal; it only runs after the user taps Confirm in the app.

ParameterTypeRequiredDescription
fullNamestringyesFull name
phonestringnoPhone (0… or +84…)
emailstringnoEmail
dateOfBirthstringnoDate of birth (yyyy-MM-dd)
notesstringnoNotes
MCP call example (for AI assistants)

AI assistants send this call themselves when you ask in plain words; you only need it when debugging an MCP connection.

{
  "name": "gym_register_member",
  "arguments": {
    "args": {
      "fullName": "Nguyễn Văn An",
      "phone": "0901234567",
      "dateOfBirth": "1995-05-20"
    }
  }
}

Access control report

ReadScope: gym:read
gym_reports_access_query

Gym report — Access control: overview, traffic by zone, denied entries.

ParameterTypeRequiredDescription
branchstringnoBranch name or id; empty = all visible branches
pageintegernoPage, starting at 1
limitintegernoMax rows
periodstringnoPeriod: today, week, month, last_month…
fromstring (date)noFrom date (yyyy-MM-dd)
tostring (date)noTo date (yyyy-MM-dd)
decisionstringnoDenial reason (e.g. DeniedExpired, DeniedNoSubscription)

Or call over REST with an API key

curl -X POST https://api.nextx.vn/api/v1/ai/tools/gym/gym_reports_access_query/read \
  -H "X-Api-Key: $API_KEY" -H "Content-Type: application/json" \
  -d '{"period":"month"}'
MCP call example (for AI assistants)

AI assistants send this call themselves when you ask in plain words; you only need it when debugging an MCP connection.

{
  "name": "gym_reports_access_query",
  "arguments": {
    "args": {
      "period": "month"
    }
  }
}

Revenue allocation report

ReadScope: gym:read
gym_reports_allocation_query

Gym report — Contract value allocation by year.

ParameterTypeRequiredDescription
branchstringnoBranch name or id; empty = all visible branches
pageintegernoPage, starting at 1
limitintegernoMax rows
yearintegernoYear
reportSubTypestringnoReport subtype
allocationTypestringnoAllocation type
serviceCodestringnoService code

Or call over REST with an API key

curl -X POST https://api.nextx.vn/api/v1/ai/tools/gym/gym_reports_allocation_query/read \
  -H "X-Api-Key: $API_KEY" -H "Content-Type: application/json" \
  -d '{"year":2026}'
MCP call example (for AI assistants)

AI assistants send this call themselves when you ask in plain words; you only need it when debugging an MCP connection.

{
  "name": "gym_reports_allocation_query",
  "arguments": {
    "args": {
      "year": 2026
    }
  }
}

Branch summary report

ReadScope: gym:read
gym_reports_branch_query

Gym report — Compare branches across the 12 months of a year.

ParameterTypeRequiredDescription
branchstringnoBranch name or id; empty = all visible branches
pageintegernoPage, starting at 1
limitintegernoMax rows
yearintegernoYear
reportTypestringnoReport type

Or call over REST with an API key

curl -X POST https://api.nextx.vn/api/v1/ai/tools/gym/gym_reports_branch_query/read \
  -H "X-Api-Key: $API_KEY" -H "Content-Type: application/json" \
  -d '{"year":2026}'
MCP call example (for AI assistants)

AI assistants send this call themselves when you ask in plain words; you only need it when debugging an MCP connection.

{
  "name": "gym_reports_branch_query",
  "arguments": {
    "args": {
      "year": 2026
    }
  }
}

Business activity report

ReadScope: gym:read
gym_reports_business_query

Gym report — Business activity by period: receipts and payments, new contracts, new members.

ParameterTypeRequiredDescription
branchstringnoBranch name or id; empty = all visible branches
pageintegernoPage, starting at 1
limitintegernoMax rows
periodstringnoPeriod: today, week, month, last_month…
fromstring (date)noFrom date (yyyy-MM-dd)
tostring (date)noTo date (yyyy-MM-dd)
paymentMethodstringnoPayment method

Or call over REST with an API key

curl -X POST https://api.nextx.vn/api/v1/ai/tools/gym/gym_reports_business_query/read \
  -H "X-Api-Key: $API_KEY" -H "Content-Type: application/json" \
  -d '{"period":"month"}'
MCP call example (for AI assistants)

AI assistants send this call themselves when you ask in plain words; you only need it when debugging an MCP connection.

{
  "name": "gym_reports_business_query",
  "arguments": {
    "args": {
      "period": "month"
    }
  }
}

Check-ins by period report

ReadScope: gym:read
gym_reports_checkin_by_period_query

Gym report — Check-ins by month, quarter or year.

ParameterTypeRequiredDescription
branchstringnoBranch name or id; empty = all visible branches
pageintegernoPage, starting at 1
limitintegernoMax rows
periodstringnoPeriod: today, week, month, last_month…
fromstring (date)noFrom date (yyyy-MM-dd)
tostring (date)noTo date (yyyy-MM-dd)
groupBystringnoGroup by

Or call over REST with an API key

curl -X POST https://api.nextx.vn/api/v1/ai/tools/gym/gym_reports_checkin_by_period_query/read \
  -H "X-Api-Key: $API_KEY" -H "Content-Type: application/json" \
  -d '{"from":"2026-01-01","to":"2026-10-27","groupBy":"month"}'
MCP call example (for AI assistants)

AI assistants send this call themselves when you ask in plain words; you only need it when debugging an MCP connection.

{
  "name": "gym_reports_checkin_by_period_query",
  "arguments": {
    "args": {
      "from": "2026-01-01",
      "to": "2026-10-27",
      "groupBy": "month"
    }
  }
}

Check-in detail report

ReadScope: gym:read
gym_reports_checkin_detail_query

Gym report — Detailed check-in list for members or PT.

ParameterTypeRequiredDescription
branchstringnoBranch name or id; empty = all visible branches
pageintegernoPage, starting at 1
limitintegernoMax rows
periodstringnoPeriod: today, week, month, last_month…
fromstring (date)noFrom date (yyyy-MM-dd)
tostring (date)noTo date (yyyy-MM-dd)
subTypestringnoSubtype (e.g. DETAIL, SUMMARY, MEMBER, PT)
serviceTypestringnoService type
signStatusstringnoSigning status
searchstringnoName, code or phone
serviceCodestringnoService code

Or call over REST with an API key

curl -X POST https://api.nextx.vn/api/v1/ai/tools/gym/gym_reports_checkin_detail_query/read \
  -H "X-Api-Key: $API_KEY" -H "Content-Type: application/json" \
  -d '{"period":"week","subType":"MEMBER"}'
MCP call example (for AI assistants)

AI assistants send this call themselves when you ask in plain words; you only need it when debugging an MCP connection.

{
  "name": "gym_reports_checkin_detail_query",
  "arguments": {
    "args": {
      "period": "week",
      "subType": "MEMBER"
    }
  }
}

Member churn report

ReadScope: gym:read
gym_reports_churn_query

Gym report — Members whose package ended in the period without renewal.

ParameterTypeRequiredDescription
branchstringnoBranch name or id; empty = all visible branches
pageintegernoPage, starting at 1
limitintegernoMax rows
periodstringnoPeriod: today, week, month, last_month…
fromstring (date)noFrom date (yyyy-MM-dd)
tostring (date)noTo date (yyyy-MM-dd)
packageTypestringnoPackage type
minDaysStoppedintegernoStopped for at least N days

Or call over REST with an API key

curl -X POST https://api.nextx.vn/api/v1/ai/tools/gym/gym_reports_churn_query/read \
  -H "X-Api-Key: $API_KEY" -H "Content-Type: application/json" \
  -d '{"period":"month","packageType":"STANDARD"}'
MCP call example (for AI assistants)

AI assistants send this call themselves when you ask in plain words; you only need it when debugging an MCP connection.

{
  "name": "gym_reports_churn_query",
  "arguments": {
    "args": {
      "period": "month",
      "packageType": "STANDARD"
    }
  }
}

Churn risk report

ReadScope: gym:read
gym_reports_churn_risk_query

Gym report — Members at risk of churn, by level.

ParameterTypeRequiredDescription
branchstringnoBranch name or id; empty = all visible branches
pageintegernoPage, starting at 1
limitintegernoMax rows
levelstringnoRisk level (HIGH, MEDIUM…)
searchstringnoName, code or phone

Or call over REST with an API key

curl -X POST https://api.nextx.vn/api/v1/ai/tools/gym/gym_reports_churn_risk_query/read \
  -H "X-Api-Key: $API_KEY" -H "Content-Type: application/json" \
  -d '{"level":"HIGH"}'
MCP call example (for AI assistants)

AI assistants send this call themselves when you ask in plain words; you only need it when debugging an MCP connection.

{
  "name": "gym_reports_churn_risk_query",
  "arguments": {
    "args": {
      "level": "HIGH"
    }
  }
}

Classes and PT report

ReadScope: gym:read
gym_reports_class_pt_query

Gym report — Class fill rate, booking trend and class/PT trainer performance.

ParameterTypeRequiredDescription
branchstringnoBranch name or id; empty = all visible branches
pageintegernoPage, starting at 1
limitintegernoMax rows
periodstringnoPeriod: today, week, month, last_month…
fromstring (date)noFrom date (yyyy-MM-dd)
tostring (date)noTo date (yyyy-MM-dd)

Or call over REST with an API key

curl -X POST https://api.nextx.vn/api/v1/ai/tools/gym/gym_reports_class_pt_query/read \
  -H "X-Api-Key: $API_KEY" -H "Content-Type: application/json" \
  -d '{"period":"month"}'
MCP call example (for AI assistants)

AI assistants send this call themselves when you ask in plain words; you only need it when debugging an MCP connection.

{
  "name": "gym_reports_class_pt_query",
  "arguments": {
    "args": {
      "period": "month"
    }
  }
}

Customer analytics report

ReadScope: gym:read
gym_reports_customer_analytics_query

Gym report — Customer analytics: contract mix by package, type and source.

ParameterTypeRequiredDescription
branchstringnoBranch name or id; empty = all visible branches
pageintegernoPage, starting at 1
limitintegernoMax rows
periodstringnoPeriod: today, week, month, last_month…
fromstring (date)noFrom date (yyyy-MM-dd)
tostring (date)noTo date (yyyy-MM-dd)

Or call over REST with an API key

curl -X POST https://api.nextx.vn/api/v1/ai/tools/gym/gym_reports_customer_analytics_query/read \
  -H "X-Api-Key: $API_KEY" -H "Content-Type: application/json" \
  -d '{"period":"month"}'
MCP call example (for AI assistants)

AI assistants send this call themselves when you ask in plain words; you only need it when debugging an MCP connection.

{
  "name": "gym_reports_customer_analytics_query",
  "arguments": {
    "args": {
      "period": "month"
    }
  }
}

Receivables report

ReadScope: gym:read
gym_reports_debt_query

Gym report — Contract receivables by period.

ParameterTypeRequiredDescription
branchstringnoBranch name or id; empty = all visible branches
pageintegernoPage, starting at 1
limitintegernoMax rows
periodstringnoPeriod: today, week, month, last_month…
fromstring (date)noFrom date (yyyy-MM-dd)
tostring (date)noTo date (yyyy-MM-dd)
staffIdstring (uuid)noStaff id
serviceTypestringnoService type
searchstringnoName, code or phone

Or call over REST with an API key

curl -X POST https://api.nextx.vn/api/v1/ai/tools/gym/gym_reports_debt_query/read \
  -H "X-Api-Key: $API_KEY" -H "Content-Type: application/json" \
  -d '{"period":"month"}'
MCP call example (for AI assistants)

AI assistants send this call themselves when you ask in plain words; you only need it when debugging an MCP connection.

{
  "name": "gym_reports_debt_query",
  "arguments": {
    "args": {
      "period": "month"
    }
  }
}

Export a gym report

ExportScope: gym:export
gym_reports_export

Export a gym report to Excel by its menu name; returns an export proposal and link, or the export job status.

ParameterTypeRequiredDescription
reportstringnoReport name as on the menu
periodstringnoPeriod: today, week, month, last_month…
fromstring (date)noFrom date (yyyy-MM-dd)
tostring (date)noTo date (yyyy-MM-dd)
branchstringnoBranch name or id; empty = all visible branches
yearintegernoYear
monthstringnoMonth (yyyy-MM)
checkbooleannotrue = check only, no export proposal yet
jobIdstringnoExport job id to check status
MCP call example (for AI assistants)

AI assistants send this call themselves when you ask in plain words; you only need it when debugging an MCP connection.

{
  "name": "gym_reports_export",
  "arguments": {
    "args": {
      "report": "Doanh thu",
      "period": "month"
    }
  }
}

Cash book report

ReadScope: gym:read
gym_reports_fund_query

Gym report — Cash book receipts and payments by period.

ParameterTypeRequiredDescription
branchstringnoBranch name or id; empty = all visible branches
pageintegernoPage, starting at 1
limitintegernoMax rows
periodstringnoPeriod: today, week, month, last_month…
fromstring (date)noFrom date (yyyy-MM-dd)
tostring (date)noTo date (yyyy-MM-dd)
transactionTypestringnoINCOME = receipts, EXPENSE = payments

Or call over REST with an API key

curl -X POST https://api.nextx.vn/api/v1/ai/tools/gym/gym_reports_fund_query/read \
  -H "X-Api-Key: $API_KEY" -H "Content-Type: application/json" \
  -d '{"period":"month","transactionType":"INCOME"}'
MCP call example (for AI assistants)

AI assistants send this call themselves when you ask in plain words; you only need it when debugging an MCP connection.

{
  "name": "gym_reports_fund_query",
  "arguments": {
    "args": {
      "period": "month",
      "transactionType": "INCOME"
    }
  }
}

Training outcomes report

ReadScope: gym:read
gym_reports_goal_outcomes_query

Gym report — Members' training outcomes by grade and period.

ParameterTypeRequiredDescription
branchstringnoBranch name or id; empty = all visible branches
pageintegernoPage, starting at 1
limitintegernoMax rows
periodstringnoPeriod: today, week, month, last_month…
fromstring (date)noFrom date (yyyy-MM-dd)
tostring (date)noTo date (yyyy-MM-dd)
groupBystringnoGroup by

Or call over REST with an API key

curl -X POST https://api.nextx.vn/api/v1/ai/tools/gym/gym_reports_goal_outcomes_query/read \
  -H "X-Api-Key: $API_KEY" -H "Content-Type: application/json" \
  -d '{"from":"2026-01-01","to":"2026-10-27","groupBy":"quarter"}'
MCP call example (for AI assistants)

AI assistants send this call themselves when you ask in plain words; you only need it when debugging an MCP connection.

{
  "name": "gym_reports_goal_outcomes_query",
  "arguments": {
    "args": {
      "from": "2026-01-01",
      "to": "2026-10-27",
      "groupBy": "quarter"
    }
  }
}

Goal progress report

ReadScope: gym:read
gym_reports_goal_progress_query

Gym report — Progress of members' open goals.

ParameterTypeRequiredDescription
branchstringnoBranch name or id; empty = all visible branches
pageintegernoPage, starting at 1
limitintegernoMax rows
statusstringnoStatus
sourcestringnoSource
searchstringnoName, code or phone

Or call over REST with an API key

curl -X POST https://api.nextx.vn/api/v1/ai/tools/gym/gym_reports_goal_progress_query/read \
  -H "X-Api-Key: $API_KEY" -H "Content-Type: application/json" \
  -d '{"status":"BEHIND"}'
MCP call example (for AI assistants)

AI assistants send this call themselves when you ask in plain words; you only need it when debugging an MCP connection.

{
  "name": "gym_reports_goal_progress_query",
  "arguments": {
    "args": {
      "status": "BEHIND"
    }
  }
}

Staff KPI report

ReadScope: gym:read
gym_reports_kpi_query

Gym report — Staff KPI by month.

ParameterTypeRequiredDescription
branchstringnoBranch name or id; empty = all visible branches
pageintegernoPage, starting at 1
limitintegernoMax rows
monthstringnoMonth (yyyy-MM)
staffIdstring (uuid)noStaff id

Or call over REST with an API key

curl -X POST https://api.nextx.vn/api/v1/ai/tools/gym/gym_reports_kpi_query/read \
  -H "X-Api-Key: $API_KEY" -H "Content-Type: application/json" \
  -d '{"month":"2026-10"}'
MCP call example (for AI assistants)

AI assistants send this call themselves when you ask in plain words; you only need it when debugging an MCP connection.

{
  "name": "gym_reports_kpi_query",
  "arguments": {
    "args": {
      "month": "2026-10"
    }
  }
}

Lead-to-contract report

ReadScope: gym:read
gym_reports_lead_funnel_query

Gym report — Lead sources converted into gym contracts by period.

ParameterTypeRequiredDescription
branchstringnoBranch name or id; empty = all visible branches
pageintegernoPage, starting at 1
limitintegernoMax rows
periodstringnoPeriod: today, week, month, last_month…
fromstring (date)noFrom date (yyyy-MM-dd)
tostring (date)noTo date (yyyy-MM-dd)

Or call over REST with an API key

curl -X POST https://api.nextx.vn/api/v1/ai/tools/gym/gym_reports_lead_funnel_query/read \
  -H "X-Api-Key: $API_KEY" -H "Content-Type: application/json" \
  -d '{"period":"month"}'
MCP call example (for AI assistants)

AI assistants send this call themselves when you ask in plain words; you only need it when debugging an MCP connection.

{
  "name": "gym_reports_lead_funnel_query",
  "arguments": {
    "args": {
      "period": "month"
    }
  }
}

Loyalty program report

ReadScope: gym:read
gym_reports_loyalty_query

Gym report — Loyalty program analytics: tiers and points.

ParameterTypeRequiredDescription
branchstringnoBranch name or id; empty = all visible branches
pageintegernoPage, starting at 1
limitintegernoMax rows

Or call over REST with an API key

curl -X POST https://api.nextx.vn/api/v1/ai/tools/gym/gym_reports_loyalty_query/read \
  -H "X-Api-Key: $API_KEY" -H "Content-Type: application/json" \
  -d '{"limit":20}'
MCP call example (for AI assistants)

AI assistants send this call themselves when you ask in plain words; you only need it when debugging an MCP connection.

{
  "name": "gym_reports_loyalty_query",
  "arguments": {
    "args": {
      "limit": 20
    }
  }
}

Packages and check-ins report

ReadScope: gym:read
gym_reports_members_query

Gym report — Packages and check-ins: new, active, expiring soon, long inactive members.

ParameterTypeRequiredDescription
branchstringnoBranch name or id; empty = all visible branches
pageintegernoPage, starting at 1
limitintegernoMax rows
periodstringnoPeriod: today, week, month, last_month…
fromstring (date)noFrom date (yyyy-MM-dd)
tostring (date)noTo date (yyyy-MM-dd)
expireInDaysintegernoPackage expiring within N days (default 7)
inactiveDaysintegernoInactive for N days

Or call over REST with an API key

curl -X POST https://api.nextx.vn/api/v1/ai/tools/gym/gym_reports_members_query/read \
  -H "X-Api-Key: $API_KEY" -H "Content-Type: application/json" \
  -d '{"period":"month","expireInDays":7}'
MCP call example (for AI assistants)

AI assistants send this call themselves when you ask in plain words; you only need it when debugging an MCP connection.

{
  "name": "gym_reports_members_query",
  "arguments": {
    "args": {
      "period": "month",
      "expireInDays": 7
    }
  }
}

Contract usage report

ReadScope: gym:read
gym_reports_progress_query

Gym report — Package usage progress per contract: used and remaining.

ParameterTypeRequiredDescription
branchstringnoBranch name or id; empty = all visible branches
pageintegernoPage, starting at 1
limitintegernoMax rows
periodstringnoPeriod: today, week, month, last_month…
fromstring (date)noFrom date (yyyy-MM-dd)
tostring (date)noTo date (yyyy-MM-dd)
activationStatusstringnoContract activation status
paymentStatusstringnoPayment status
ptIdstring (uuid)noPT trainer id
staffIdstring (uuid)noStaff id
serviceTypestringnoService type
serviceCodestringnoService code
searchstringnoName, code or phone

Or call over REST with an API key

curl -X POST https://api.nextx.vn/api/v1/ai/tools/gym/gym_reports_progress_query/read \
  -H "X-Api-Key: $API_KEY" -H "Content-Type: application/json" \
  -d '{"period":"month"}'
MCP call example (for AI assistants)

AI assistants send this call themselves when you ask in plain words; you only need it when debugging an MCP connection.

{
  "name": "gym_reports_progress_query",
  "arguments": {
    "args": {
      "period": "month"
    }
  }
}

PT commission report

ReadScope: gym:read
gym_reports_pt_commission_query

Gym report — PT commission detail by service.

ParameterTypeRequiredDescription
branchstringnoBranch name or id; empty = all visible branches
pageintegernoPage, starting at 1
limitintegernoMax rows
periodstringnoPeriod: today, week, month, last_month…
fromstring (date)noFrom date (yyyy-MM-dd)
tostring (date)noTo date (yyyy-MM-dd)
ptIdstring (uuid)noPT trainer id
serviceCodestringnoService code

Or call over REST with an API key

curl -X POST https://api.nextx.vn/api/v1/ai/tools/gym/gym_reports_pt_commission_query/read \
  -H "X-Api-Key: $API_KEY" -H "Content-Type: application/json" \
  -d '{"period":"month"}'
MCP call example (for AI assistants)

AI assistants send this call themselves when you ask in plain words; you only need it when debugging an MCP connection.

{
  "name": "gym_reports_pt_commission_query",
  "arguments": {
    "args": {
      "period": "month"
    }
  }
}

PT training report

ReadScope: gym:read
gym_reports_pt_training_query

Gym report — PT sessions taught and allocated value by trainer.

ParameterTypeRequiredDescription
branchstringnoBranch name or id; empty = all visible branches
pageintegernoPage, starting at 1
limitintegernoMax rows
periodstringnoPeriod: today, week, month, last_month…
fromstring (date)noFrom date (yyyy-MM-dd)
tostring (date)noTo date (yyyy-MM-dd)
ptIdstring (uuid)noPT trainer id
searchstringnoName, code or phone
serviceCodestringnoService code
packageTypestringnoPackage type
sessionFormstringnoSession format

Or call over REST with an API key

curl -X POST https://api.nextx.vn/api/v1/ai/tools/gym/gym_reports_pt_training_query/read \
  -H "X-Api-Key: $API_KEY" -H "Content-Type: application/json" \
  -d '{"period":"month"}'
MCP call example (for AI assistants)

AI assistants send this call themselves when you ask in plain words; you only need it when debugging an MCP connection.

{
  "name": "gym_reports_pt_training_query",
  "arguments": {
    "args": {
      "period": "month"
    }
  }
}

Registrations by period report

ReadScope: gym:read
gym_reports_registrations_query

Gym report — New registrations by month, quarter or year.

ParameterTypeRequiredDescription
branchstringnoBranch name or id; empty = all visible branches
pageintegernoPage, starting at 1
limitintegernoMax rows
periodstringnoPeriod: today, week, month, last_month…
fromstring (date)noFrom date (yyyy-MM-dd)
tostring (date)noTo date (yyyy-MM-dd)
groupBystringnoGroup by

Or call over REST with an API key

curl -X POST https://api.nextx.vn/api/v1/ai/tools/gym/gym_reports_registrations_query/read \
  -H "X-Api-Key: $API_KEY" -H "Content-Type: application/json" \
  -d '{"from":"2026-01-01","to":"2026-10-27","groupBy":"month"}'
MCP call example (for AI assistants)

AI assistants send this call themselves when you ask in plain words; you only need it when debugging an MCP connection.

{
  "name": "gym_reports_registrations_query",
  "arguments": {
    "args": {
      "from": "2026-01-01",
      "to": "2026-10-27",
      "groupBy": "month"
    }
  }
}

Remaining contract value report

ReadScope: gym:read
gym_reports_remaining_query

Gym report — Unused contract value as of a date.

ParameterTypeRequiredDescription
branchstringnoBranch name or id; empty = all visible branches
pageintegernoPage, starting at 1
limitintegernoMax rows
asOfDatestring (date)noAs-of date (yyyy-MM-dd)
contractTypestringnoContract type
activationStatusstringnoContract activation status
staffIdstring (uuid)noStaff id

Or call over REST with an API key

curl -X POST https://api.nextx.vn/api/v1/ai/tools/gym/gym_reports_remaining_query/read \
  -H "X-Api-Key: $API_KEY" -H "Content-Type: application/json" \
  -d '{"asOfDate":"2026-10-27"}'
MCP call example (for AI assistants)

AI assistants send this call themselves when you ask in plain words; you only need it when debugging an MCP connection.

{
  "name": "gym_reports_remaining_query",
  "arguments": {
    "args": {
      "asOfDate": "2026-10-27"
    }
  }
}

Lockers and rentals report

ReadScope: gym:read
gym_reports_rental_query

Gym report — Locker, towel and equipment rentals by period and locker occupancy.

ParameterTypeRequiredDescription
branchstringnoBranch name or id; empty = all visible branches
pageintegernoPage, starting at 1
limitintegernoMax rows
periodstringnoPeriod: today, week, month, last_month…
fromstring (date)noFrom date (yyyy-MM-dd)
tostring (date)noTo date (yyyy-MM-dd)

Or call over REST with an API key

curl -X POST https://api.nextx.vn/api/v1/ai/tools/gym/gym_reports_rental_query/read \
  -H "X-Api-Key: $API_KEY" -H "Content-Type: application/json" \
  -d '{"period":"month"}'
MCP call example (for AI assistants)

AI assistants send this call themselves when you ask in plain words; you only need it when debugging an MCP connection.

{
  "name": "gym_reports_rental_query",
  "arguments": {
    "args": {
      "period": "month"
    }
  }
}

Revenue breakdown report

ReadScope: gym:read
gym_reports_revenue_breakdown_query

Gym report — Revenue breakdown by category per day, week or month.

ParameterTypeRequiredDescription
branchstringnoBranch name or id; empty = all visible branches
pageintegernoPage, starting at 1
limitintegernoMax rows
periodstringnoPeriod: today, week, month, last_month…
fromstring (date)noFrom date (yyyy-MM-dd)
tostring (date)noTo date (yyyy-MM-dd)
groupBystringnoGroup by
includeServiceBreakdownbooleannotrue = include per-service breakdown

Or call over REST with an API key

curl -X POST https://api.nextx.vn/api/v1/ai/tools/gym/gym_reports_revenue_breakdown_query/read \
  -H "X-Api-Key: $API_KEY" -H "Content-Type: application/json" \
  -d '{"period":"month","groupBy":"week"}'
MCP call example (for AI assistants)

AI assistants send this call themselves when you ask in plain words; you only need it when debugging an MCP connection.

{
  "name": "gym_reports_revenue_breakdown_query",
  "arguments": {
    "args": {
      "period": "month",
      "groupBy": "week"
    }
  }
}

Revenue by service report

ReadScope: gym:read
gym_reports_revenue_by_service_query

Gym report — Revenue allocated by service line.

ParameterTypeRequiredDescription
branchstringnoBranch name or id; empty = all visible branches
pageintegernoPage, starting at 1
limitintegernoMax rows
periodstringnoPeriod: today, week, month, last_month…
fromstring (date)noFrom date (yyyy-MM-dd)
tostring (date)noTo date (yyyy-MM-dd)
groupBystringnoGroup by
serviceCodestringnoService code

Or call over REST with an API key

curl -X POST https://api.nextx.vn/api/v1/ai/tools/gym/gym_reports_revenue_by_service_query/read \
  -H "X-Api-Key: $API_KEY" -H "Content-Type: application/json" \
  -d '{"period":"month","groupBy":"service"}'
MCP call example (for AI assistants)

AI assistants send this call themselves when you ask in plain words; you only need it when debugging an MCP connection.

{
  "name": "gym_reports_revenue_by_service_query",
  "arguments": {
    "args": {
      "period": "month",
      "groupBy": "service"
    }
  }
}

Service frequency report

ReadScope: gym:read
gym_reports_service_frequency_query

Gym report — Usage count and amount by service line (PT, EMS, Yoga…).

ParameterTypeRequiredDescription
branchstringnoBranch name or id; empty = all visible branches
pageintegernoPage, starting at 1
limitintegernoMax rows
periodstringnoPeriod: today, week, month, last_month…
fromstring (date)noFrom date (yyyy-MM-dd)
tostring (date)noTo date (yyyy-MM-dd)
groupBystringnoGroup by
serviceCodestringnoService code

Or call over REST with an API key

curl -X POST https://api.nextx.vn/api/v1/ai/tools/gym/gym_reports_service_frequency_query/read \
  -H "X-Api-Key: $API_KEY" -H "Content-Type: application/json" \
  -d '{"period":"month","groupBy":"service"}'
MCP call example (for AI assistants)

AI assistants send this call themselves when you ask in plain words; you only need it when debugging an MCP connection.

{
  "name": "gym_reports_service_frequency_query",
  "arguments": {
    "args": {
      "period": "month",
      "groupBy": "service"
    }
  }
}

Single-visit tickets report

ReadScope: gym:read
gym_reports_tickets_query

Gym report — Single-visit ticket revenue.

ParameterTypeRequiredDescription
branchstringnoBranch name or id; empty = all visible branches
pageintegernoPage, starting at 1
limitintegernoMax rows
periodstringnoPeriod: today, week, month, last_month…
fromstring (date)noFrom date (yyyy-MM-dd)
tostring (date)noTo date (yyyy-MM-dd)
subTypestringnoSubtype (e.g. DETAIL, SUMMARY, MEMBER, PT)
searchstringnoName, code or phone
ticketTypeIdstring (uuid)noTicket type id

Or call over REST with an API key

curl -X POST https://api.nextx.vn/api/v1/ai/tools/gym/gym_reports_tickets_query/read \
  -H "X-Api-Key: $API_KEY" -H "Content-Type: application/json" \
  -d '{"period":"month"}'
MCP call example (for AI assistants)

AI assistants send this call themselves when you ask in plain words; you only need it when debugging an MCP connection.

{
  "name": "gym_reports_tickets_query",
  "arguments": {
    "args": {
      "period": "month"
    }
  }
}

Renewal report

ReadScope: gym:read
gym_retention_report

Renewal report: due contracts renewed or not, who needs follow-up.

ParameterTypeRequiredDescription
periodstringnoPeriod: today, week, month, last_month…
fromstring (date)noFrom date (yyyy-MM-dd)
tostring (date)noTo date (yyyy-MM-dd)
branchstringnoBranch name or id; empty = all visible branches
staffIdstring (uuid)noStaff id
packageTypesstring[]noPackage types
windowDaysintegernoWindow around expiry date (days)
pageintegernoPage, starting at 1
limitintegernoMax rows

Or call over REST with an API key

curl -X POST https://api.nextx.vn/api/v1/ai/tools/gym/gym_retention_report/read \
  -H "X-Api-Key: $API_KEY" -H "Content-Type: application/json" \
  -d '{"period":"month"}'
MCP call example (for AI assistants)

AI assistants send this call themselves when you ask in plain words; you only need it when debugging an MCP connection.

{
  "name": "gym_retention_report",
  "arguments": {
    "args": {
      "period": "month"
    }
  }
}

Collected revenue

ReadScope: gym:read
gym_revenue_report

Net cash revenue (after refunds) by period and branch, with prior-period comparison.

ParameterTypeRequiredDescription
periodstringnoPeriod: today, week, month, last_month…
fromstring (date)noFrom date (yyyy-MM-dd)
tostring (date)noTo date (yyyy-MM-dd)
branchstringnoBranch name or id; empty = all visible branches
comparePreviousbooleannotrue = compare with previous period
groupBystringnoGroup by

Or call over REST with an API key

curl -X POST https://api.nextx.vn/api/v1/ai/tools/gym/gym_revenue_report/read \
  -H "X-Api-Key: $API_KEY" -H "Content-Type: application/json" \
  -d '{"period":"month","comparePrevious":true}'
MCP call example (for AI assistants)

AI assistants send this call themselves when you ask in plain words; you only need it when debugging an MCP connection.

{
  "name": "gym_revenue_report",
  "arguments": {
    "args": {
      "period": "month",
      "comparePrevious": true
    }
  }
}

Sales report

ReadScope: gym:read
gym_sales_report

Sales by salesperson and package, reconciled with collections.

ParameterTypeRequiredDescription
periodstringnoPeriod: today, week, month, last_month…
fromstring (date)noFrom date (yyyy-MM-dd)
tostring (date)noTo date (yyyy-MM-dd)
branchstringnoBranch name or id; empty = all visible branches
staffIdstring (uuid)noStaff id
serviceCodestringnoService code

Or call over REST with an API key

curl -X POST https://api.nextx.vn/api/v1/ai/tools/gym/gym_sales_report/read \
  -H "X-Api-Key: $API_KEY" -H "Content-Type: application/json" \
  -d '{"period":"month"}'
MCP call example (for AI assistants)

AI assistants send this call themselves when you ask in plain words; you only need it when debugging an MCP connection.

{
  "name": "gym_sales_report",
  "arguments": {
    "args": {
      "period": "month"
    }
  }
}

Gym overview

ReadScope: gym:read
gym_summary_report

Gym overview: total members, active, contracts expiring in 7 days, revenue.

No parameters.

Or call over REST with an API key

curl -X POST https://api.nextx.vn/api/v1/ai/tools/gym/gym_summary_report/read \
  -H "X-Api-Key: $API_KEY" -H "Content-Type: application/json" \
  -d '{}'
MCP call example (for AI assistants)

AI assistants send this call themselves when you ask in plain words; you only need it when debugging an MCP connection.

{
  "name": "gym_summary_report",
  "arguments": {
    "args": {}
  }
}

Unfreeze a contract

Write proposalScope: gym:write
gym_unfreeze_contract

End a contract freeze early so the member resumes today. Creates a proposal; it only runs after the user taps Confirm in the app.

ParameterTypeRequiredDescription
contractCodestringnoContract code
memberCodestringnoMember code (e.g. HV001)
MCP call example (for AI assistants)

AI assistants send this call themselves when you ask in plain words; you only need it when debugging an MCP connection.

{
  "name": "gym_unfreeze_contract",
  "arguments": {
    "args": {
      "contractCode": "HD00123"
    }
  }
}