Tool reference · 8 tools

Staff scheduling and time clock

The weekly staff rota, shifts filled from classes, copying last week, and time clock settings.

Ask it in plain words

  • "Copy last week's shifts to next week."
  • "Fill next week's coach shifts from the class schedule."

get_work_schedule

Staff schedule Reads

The staff schedule for a week: each shift's day, times, hours, person (or Open shift), job, location, draft or published, gratuity rate, cover requests, and for past shifts how the time clock compares (ok, late, early, missed, not-in).

ParameterTypeDescription
weekstringAny day of the week YYYY-MM-DD (default this week)
locationstringA location key (default all the person may see)
Call shape
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "get_work_schedule",
    "arguments": {}
  }
}

add_work_shift

Add a shift to the staff schedule Changes

Adds a draft shift to the staff schedule (owners and managers). It stays a draft until someone publishes the week in the back office, which tells each person their shifts.

ParameterTypeDescription
personstringThe staff member's full name (leave out for an open shift)
day requiredstringYYYY-MM-DD
start requiredstringHH:MM, 24-hour
end requiredstringHH:MM, 24-hour
locationstringLocation name or key (brands with several locations)
jobstringe.g. Front desk, Coach, Party host
gratuity_ratebooleanPaid at the gratuity (tipped work) rate, as for parties
Call shape
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "add_work_shift",
    "arguments": {
      "day": "<day>",
      "start": "<start>",
      "end": "<end>"
    }
  }
}

update_work_shift

Change a shift on the staff schedule Changesdry_run

Change a shift on People > Staff schedule (owners and managers): who, the day, times, location, job, note or the gratuity rate. Only what the owner mentions changes. The shift becomes a draft again: nobody is told until someone presses Publish for the week in the back office (that sends each person their shifts).

ParameterTypeDescription
shift_id requiredstringThe id from get_work_schedule
personstring,nullThe staff member's full name; null = make it an open shift
daystringYYYY-MM-DD
startstringe.g. 9:00 or 4:30 PM
endstringe.g. 5:00 or 9:30 PM
locationstringLocation name or key (brands with several locations)
jobstringe.g. Front desk, Coach, Party host
notestringA short note on the shift
gratuity_ratebooleanPaid at the gratuity (tipped work) rate, as for parties
dry_runbooleantrue = only show what would change, save nothing. Use it first for anything the owner hasn't seen yet.
Call shape
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "update_work_shift",
    "arguments": {
      "shift_id": "<shift_id>",
      "dry_run": true
    }
  }
}

remove_work_shift

Remove a shift from the staff schedule Changesdry_runconfirm

Remove a shift from People > Staff schedule (owners and managers). A draft shift is deleted; a published one is marked removed, and the person hears about it only when someone publishes the week in the back office. Needs confirm: true after the owner says yes.

ParameterTypeDescription
shift_id requiredstringThe id from get_work_schedule
dry_runbooleantrue = only show what would change, save nothing. Use it first for anything the owner hasn't seen yet.
confirmbooleanMust be true, after the owner has said yes
Call shape
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "remove_work_shift",
    "arguments": {
      "shift_id": "<shift_id>",
      "dry_run": true
    }
  }
}

copy_last_week_shifts

Copy last week's shifts Changesdry_run

Copy the week before's shifts into a week on People > Staff schedule (owners and managers), as Copy last week does. Shifts already there are skipped. The copies are drafts: nobody is told until the week is published in the back office.

ParameterTypeDescription
week requiredstringAny day of the week to fill, YYYY-MM-DD
locationstringLocation name or key (brands with several locations; default the first one you work at)
dry_runbooleantrue = only show what would change, save nothing. Use it first for anything the owner hasn't seen yet.
Call shape
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "copy_last_week_shifts",
    "arguments": {
      "week": "<week>",
      "dry_run": true
    }
  }
}

fill_shifts_from_classes

Add shifts for the week's classes and parties Changesdry_run

Add a draft shift for each class and booked party in a week whose coach is a staff member and has no shift yet (owners and managers), as Shifts for classes and parties does on People > Staff schedule. Party shifts use the gratuity rate. Nothing is published or sent.

ParameterTypeDescription
week requiredstringAny day of the week, YYYY-MM-DD
locationstringLocation name or key (brands with several locations)
dry_runbooleantrue = only show what would change, save nothing. Use it first for anything the owner hasn't seen yet.
Call shape
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "fill_shifts_from_classes",
    "arguments": {
      "week": "<week>",
      "dry_run": true
    }
  }
}

get_time_clock_settings

Time clock settings Reads

The time clock's settings on People > Timesheets (owners): whether staff can clock in, smart reminders, how close counts as at the gym, when clock-in is refused, and the reminder and automatic clock-out hours. Never anyone's hours or pay.

Takes no parameters.

Call shape
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "get_time_clock_settings",
    "arguments": {}
  }
}

set_time_clock_settings

Change the time clock settings Changesdry_runconfirm

Change the time clock settings on People > Timesheets (owners only), as its Time clock settings box does. Only what the owner mentions changes. Turning the clock or the smart reminders off needs confirm: true after the owner says yes. Setting the gym's location needs a phone at the gym, so it stays in the back office.

ParameterTypeDescription
clock_in_onbooleanStaff can clock in and out
smart_remindersbooleanA notification when someone is due to clock in or forgot to clock out
at_gym_within_metersintegerCounts as at the gym within this distance (150 suits most buildings)
refuse_beyond_metersintegerClock-in is refused farther than this; in between it's allowed with a note and flagged
remind_to_clock_out_after_hoursintegerRemind someone to clock out after this many hours on the clock (2 to 20)
clock_out_automatically_after_hoursintegerClock someone out by themselves after this many hours (3 to 24)
dry_runbooleantrue = only show what would change, save nothing. Use it first for anything the owner hasn't seen yet.
confirmbooleanMust be true, after the owner has said yes
Call shape
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "set_time_clock_settings",
    "arguments": {
      "dry_run": true
    }
  }
}

All 318 tools

Ask NinjaHQ

Answers from our Help Center and website

Ask anything about NinjaHQ, or try:

AI answers from NinjaHQ's own pages and can make mistakes. Your questions are sent to Anthropic, the AI company, to answer; NinjaHQ doesn't keep them. Privacy