Shiftbase MCP by usefulapi

v1.33.1
io.usefulapi/shiftbase Checked 1 day ago Published 9 hours ago

Read Shiftbase rosters, timesheets, absences and availability; schedule shifts and review absences.

These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.

shiftbase_get_account Get account

The Shiftbase account this API key belongs to: company, country, time zone, working-day start/end, plan facts. GET /accounts.

shiftbase_list_users List employees

List employees (users) with their teams and departments, contact details, employee number, start/end dates and plus-min hours balance. Use it to map user ids in schedules, timesheets and absences to names. Identity, bank and birth data are never returned. GET /users.

ParameterTypeDescription
activebooleantrue = only active employees, false = only inactive. Default: both.
department_idintegerOnly employees of this department.
include_hiddenbooleanAlso include hidden users.
limitintegerResults per page, 1-200 (default 10). The reply's total and next_offset show what is left.
offsetintegerIndex of the first result; pass the previous reply's next_offset.

shiftbase_get_user Get employee

One employee by user id or email address, with teams and departments. GET /users/{identifier}.

ParameterTypeDescription
emailstringOr the employee's email address.
user_idintegerShiftbase user id.

shiftbase_list_departments List departments

List departments (sites/branches that own teams, shifts and schedules) with address and timesheet/clocking settings. GET /departments.

ParameterTypeDescription
limitintegerResults per page, 1-200 (default 50). The reply's total and next_offset show what is left.
offsetintegerIndex of the first result; pass the previous reply's next_offset.

shiftbase_list_teams List teams

List teams (the rows of the schedule within a department), optionally for one department. GET /teams.

ParameterTypeDescription
department_idintegerOnly teams of this department.
limitintegerResults per page, 1-200 (default 50). The reply's total and next_offset show what is left.
offsetintegerIndex of the first result; pass the previous reply's next_offset.

shiftbase_list_locations List locations

List active locations (addresses that group departments). GET /locations.

ParameterTypeDescription
limitintegerResults per page, 1-200 (default 50). The reply's total and next_offset show what is left.
offsetintegerIndex of the first result; pass the previous reply's next_offset.

shiftbase_list_shift_types List shift types

List shift types (the templates a scheduled shift uses: name, short name, default start/end time and break), optionally for one department. Their ids are the shift_id for shiftbase_create_roster. GET /shifts.

ParameterTypeDescription
department_idintegerOnly shift types of this department.
include_deletedbooleanAlso include deleted shift types.
limitintegerResults per page, 1-200 (default 10). The reply's total and next_offset show what is left.
offsetintegerIndex of the first result; pass the previous reply's next_offset.

shiftbase_list_rosters List scheduled shifts

List the schedule (rosters = shifts assigned to employees) for a date range of at most 62 days: date, start/end time, break, employee, team, shift type, department, published state, hours and cost. Each item's occurrence_id identifies it for shiftbase_get_roster and shiftbase_update_roster. GET /rosters.

ParameterTypeDescription
max_date *stringLast date (yyyy-mm-dd), at most 62 days after min_date.
min_date *stringFirst date (yyyy-mm-dd).
department_idintegerOnly shifts in this department.
limitintegerResults per page, 1-200 (default 25). The reply's total and next_offset show what is left.
offsetintegerIndex of the first result; pass the previous reply's next_offset.
user_idintegerOnly shifts of this employee.

shiftbase_get_roster Get scheduled shift

One scheduled shift by its occurrence_id, with the employee, shift type, team and who created/changed it. GET /rosters/{occurrenceId}.

ParameterTypeDescription
occurrence_id *stringThe occurrence_id from shiftbase_list_rosters: "<roster id>" or, for a recurring shift, "<roster id>:<yyyy-mm-dd>".

shiftbase_list_open_shifts List open shifts

List open (unassigned) shifts that employees can pick up, for a date range of at most 62 days (default: today). Needs the Basic plan or higher. GET /open_shifts.

ParameterTypeDescription
department_idintegerOnly open shifts in this department.
limitintegerResults per page, 1-200 (default 50). The reply's total and next_offset show what is left.
max_datestringLast date (yyyy-mm-dd).
min_datestringFirst date (yyyy-mm-dd). Give both dates or neither (= today).
offsetintegerIndex of the first result; pass the previous reply's next_offset.
user_idintegerOnly open shifts this employee can take.

shiftbase_get_availability Get employee availability

Employee availability (available / unavailable, all day or from a time) for a date range of at most 62 days, from Shiftbase's availability report. Needs the Basic plan and the "View reports" permission. POST /reports/availability (export json; reads only).

ParameterTypeDescription
from *stringFirst date (yyyy-mm-dd).
to *stringLast date (yyyy-mm-dd), at most 62 days after from.
department_idsarrayOnly these departments.
limitintegerResults per page, 1-200 (default 50). The reply's total and next_offset show what is left.
offsetintegerIndex of the first result; pass the previous reply's next_offset.
statusesarrayOnly these availability types.
user_idintegerOnly this employee.

shiftbase_list_timesheets List timesheets

List timesheets (worked hours: clock in/out, breaks, total, status Approved/Declined/Pending, wage and surcharges) for a date range of at most 62 days. GET /timesheets.

ParameterTypeDescription
max_date *stringLast date (yyyy-mm-dd), at most 62 days after min_date.
min_date *stringFirst date (yyyy-mm-dd).
department_idintegerOnly this department.
limitintegerResults per page, 1-200 (default 10). The reply's total and next_offset show what is left.
offsetintegerIndex of the first result; pass the previous reply's next_offset.
statusstringOnly timesheets with this status.
user_idintegerOnly this employee.

shiftbase_get_timesheet Get timesheet

One timesheet by id, with its clocked breaks. GET /timesheets/{timesheetId}.

ParameterTypeDescription
timesheet_id *integerShiftbase timesheet id.

shiftbase_list_clocked_in List clocked-in employees

Who is clocked in right now: employee, since when, their scheduled shift, team, department and location. GET /timesheets/clock.

ParameterTypeDescription
limitintegerResults per page, 1-200 (default 50). The reply's total and next_offset show what is left.
offsetintegerIndex of the first result; pass the previous reply's next_offset.

shiftbase_list_absences List absences

List absences (leave, sick leave, other time off) overlapping a date range of at most 366 days: employee, absence type, start/end date, hours or days, status Approved/Declined/Pending and who reviewed it. Needs the Basic plan. GET /absentees.

ParameterTypeDescription
max_date *stringLast date (yyyy-mm-dd), at most 366 days after min_date.
min_date *stringFirst date (yyyy-mm-dd).
absence_type_idsarrayOnly these absence types (ids from shiftbase_list_absence_types).
includestringAdd related data: the per-day breakdown, the employee or the absence type.
limitintegerResults per page, 1-200 (default 25). The reply's total and next_offset show what is left.
offsetintegerIndex of the first result; pass the previous reply's next_offset.
only_open_endedbooleanOnly open-ended absences (no end date yet, e.g. long-term sick leave).
statusstringOnly absences with this status (Pending = requests waiting for review).
user_idintegerOnly this employee.

shiftbase_get_absence Get absence

One absence by id, with the per-day hours and who reviewed it. GET /absentees/{absenteeId}.

ParameterTypeDescription
absence_id *integerShiftbase absence (absentee) id.

shiftbase_list_absence_types List absence types

List absence types (e.g. Holiday, Sick, Unpaid leave): name, unit (hours or days), whether it costs leave hours, colour. Their ids are the absence_type_id for absences. GET /absentee_options.

ParameterTypeDescription
limitintegerResults per page, 1-200 (default 50). The reply's total and next_offset show what is left.
offsetintegerIndex of the first result; pass the previous reply's next_offset.

shiftbase_get_expected_absence_hours Get expected absence hours

How many hours an absence would cost for an employee, per day and in total (from the schedule or the contract, per the absence policy), for a period of at most 366 days. Changes nothing. POST /absentees/expected.

ParameterTypeDescription
absence_type_id *integerAbsence type id (shiftbase_list_absence_types).
end_date *stringLast day (yyyy-mm-dd).
start_date *stringFirst day (yyyy-mm-dd).
user_id *integerThe employee.

shiftbase_create_roster Schedule a shift

WRITE: put one employee on the schedule for one date (a single, non-recurring shift) in a team, with a shift type, start/end time and break. The employee is notified only when notify is true. POST /rosters.

ParameterTypeDescription
date *stringDate of the shift (yyyy-mm-dd).
department_id *integerDepartment of the team.
end_time *stringEnd, 24-hour hh:mm (e.g. 17:30); earlier than start = ends the next day.
shift_id *integerShift type (shiftbase_list_shift_types).
start_time *stringStart, 24-hour hh:mm (e.g. 09:00).
team_id *integerTeam (shiftbase_list_teams).
user_id *integerThe employee to schedule.
break_minutesintegerUnpaid break in minutes (default 0).
descriptionstringNote shown on the shift.
notifybooleanNotify the employee (default false).
paid_break_minutesintegerPaid break in minutes (default 0).

shiftbase_update_roster Change a scheduled shift

WRITE: change a scheduled shift: move it to another date, time, employee, team or shift type, or change its break or note. Reads the shift first and sends it back with your changes. For a recurring shift, scope says what changes: "occurrence" (this date only), "sequence" (this date and all later ones) or "original" (the whole series; also the right scope for a non-recurring shift). PUT /rosters/{occurrenceId}/{scope}.

ParameterTypeDescription
occurrence_id *stringoccurrence_id from shiftbase_list_rosters.
scope *string"original" for a non-recurring shift; see the description for recurring ones.
break_minutesintegerNew unpaid break in minutes.
datestringNew date (yyyy-mm-dd).
department_idintegerNew department (when moving to a team of another department).
descriptionstringNew note.
end_timestringNew end, hh:mm.
notifybooleanNotify the employee (default false).
paid_break_minutesintegerNew paid break in minutes.
shift_idintegerNew shift type.
start_timestringNew start, hh:mm.
team_idintegerNew team.
user_idintegerNew employee.

shiftbase_request_absence Request an absence

WRITE: add an absence (leave/time-off request) for an employee. By default it is a Pending request for a manager to review; status Approved books it directly (needs the approve-absence permission). The hours per day come from Shiftbase's own expected-hours calculation (the same as shiftbase_get_expected_absence_hours). Needs the Basic plan. POST /absentees.

ParameterTypeDescription
absence_type_id *integerAbsence type id (shiftbase_list_absence_types).
end_date *stringLast day (yyyy-mm-dd), at most 366 days after start_date.
start_date *stringFirst day (yyyy-mm-dd).
user_id *integerThe employee.
notestringNote from the requester.
notify_employeebooleanNotify the employee (default false).
statusstringPending (default) = a request to review; Approved = book it directly.

shiftbase_review_absence Approve or decline an absence

WRITE: approve or decline an absence request. Reads the absence first and sends it back unchanged except for the status (needs the approve-absence permission). PUT /absentees/{absenteeId}.

ParameterTypeDescription
absence_id *integerAbsence (absentee) id, e.g. from shiftbase_list_absences with status Pending.
decision *stringApproved or Declined.
notify_employeebooleanNotify the employee (default false).