Deputy MCP by usefulapi
v1.41.1See rosters, timesheets, leave and staff in Deputy, and create shifts, leave and memos.
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
deputy_whoami Who am I
Return the Deputy user the token belongs to — name, employee id, company and permissions. A cheap way to confirm DEPUTY_INSTALL and the token are right. Deputy: GET /api/v1/me.
deputy_list_locations List locations
List the install's locations (workplaces). Deputy calls a location a Company; its Id is what other tools take as location_id. Deputy: GET /api/v1/resource/Company.
deputy_list_areas List areas
List areas (Deputy OperationalUnits — the rosterable sections of a location, e.g. Kitchen, Front of house). Shifts and timesheets belong to an area. Optionally only one location's areas. Deputy: GET /api/v1/resource/OperationalUnit, or POST .../OperationalUnit/QUERY when filtered.
| Parameter | Type | Description |
|---|---|---|
active | boolean | Only active (true) or inactive (false) areas. |
location_id | integer | Only areas of this location (Company id). |
max | integer | Page size, 1-500 (Deputy's cap). Default 100. |
start | integer | Pagination offset (0-based). Pass the previous page's next_start. |
deputy_list_employees List employees
Search employees by name, location or active status. Returns Id, DisplayName, Company (main location), Active, StartDate, Role and more. Deputy: POST /api/v1/resource/Employee/QUERY.
| Parameter | Type | Description |
|---|---|---|
active | boolean | true = current staff only; false = terminated/inactive only. |
location_id | integer | Only employees whose main location is this Company id. |
max | integer | Page size, 1-500 (Deputy's cap). Default 100. |
name_contains | string | Only employees whose DisplayName contains this text. |
start | integer | Pagination offset (0-based). Pass the previous page's next_start. |
deputy_get_employee Get one employee
Fetch one employee's details as a supervisor sees them — contact, locations, role and employment. Deputy: GET /api/v1/supervise/employee/{id}.
| Parameter | Type | Description |
|---|---|---|
employee_id * | integer | The employee id. |
deputy_list_shifts List shifts
Search the roster (scheduled shifts) by time window, employee, area, and published/open state. Each record has StartTime/EndTime (unix), StartTimeLocalized, Employee (0 or null when open), OperationalUnit (area), Published, Open, Cost and _DPMetaData with names. Deputy: POST /api/v1/resource/Roster/QUERY.
| Parameter | Type | Description |
|---|---|---|
area_id | integer | Only shifts in this area (OperationalUnit id). |
employee_id | integer | Only this employee's shifts. |
from | Only shifts starting at or after this time: a unix timestamp in seconds, or an ISO 8601 date/datetime (include an offset for local times). | |
max | integer | Page size, 1-500 (Deputy's cap). Default 25; page through with next_start. |
open | boolean | true = open (unfilled) shifts only. |
published | boolean | true = published only; false = drafts only. |
start | integer | Pagination offset (0-based). Pass the previous page's next_start. |
to | Only shifts starting at or before this time: a unix timestamp in seconds, or an ISO 8601 date/datetime (include an offset for local times). |
deputy_get_shift Get one shift
Fetch one shift (Roster record) by id. Deputy: GET /api/v1/resource/Roster/{id}.
| Parameter | Type | Description |
|---|---|---|
shift_id * | integer | The shift (Roster) id. |
deputy_list_timesheets List timesheets
Search timesheets (actual worked time) by time window, employee, area and approval state. Each record has StartTime/EndTime (unix; EndTime null while in progress), TotalTime (hours), Cost, TimeApproved, PayRuleApproved, IsInProgress, IsLeave, Roster (linked shift) and Exported. Deputy: POST /api/v1/resource/Timesheet/QUERY.
| Parameter | Type | Description |
|---|---|---|
area_id | integer | Only timesheets in this area (OperationalUnit id). |
employee_id | integer | Only this employee's timesheets. |
from | Only timesheets starting at or after this time: a unix timestamp in seconds, or an ISO 8601 date/datetime (include an offset for local times). | |
in_progress | boolean | true = only people currently on the clock. |
max | integer | Page size, 1-500 (Deputy's cap). Default 25; page through with next_start. |
pay_approved | boolean | Filter on PayRuleApproved (approved for payroll export). |
start | integer | Pagination offset (0-based). Pass the previous page's next_start. |
time_approved | boolean | Filter on TimeApproved (supervisor approved the times). |
to | Only timesheets starting at or before this time: a unix timestamp in seconds, or an ISO 8601 date/datetime (include an offset for local times). |
deputy_get_timesheet Get one timesheet
Fetch one timesheet's full details, including breaks and approval state. Deputy: GET /api/v1/supervise/timesheet/{id}/details.
| Parameter | Type | Description |
|---|---|---|
timesheet_id * | integer | The timesheet id. |
deputy_list_leave List leave requests
Search leave requests by employee, location, status and time window. Status: 0 awaiting approval, 1 approved, 2 declined, 3 cancelled, 4 date approved without pay, 5 pay approved without date. Start/End are unix; LeaveRule is the leave type id. Deputy: POST /api/v1/resource/Leave/QUERY.
| Parameter | Type | Description |
|---|---|---|
employee_id | integer | Only this employee's leave. |
from | Only leave starting at or after this time: a unix timestamp in seconds, or an ISO 8601 date/datetime (include an offset for local times). | |
location_id | integer | Only leave against this location (Company id). |
max | integer | Page size, 1-500 (Deputy's cap). Default 25; page through with next_start. |
start | integer | Pagination offset (0-based). Pass the previous page's next_start. |
status | integer | Only this status (0-5, see description). |
to | Only leave starting at or before this time: a unix timestamp in seconds, or an ISO 8601 date/datetime (include an offset for local times). |
deputy_query_resource Query any Deputy resource
Run a Resource API search on any business object (leave types, pay rules, public holidays, memos, events, shift templates, pay lines, availability, sales data, …). `search` is Deputy's clause map, e.g. {"s1":{"field":"Employee","data":12,"type":"eq"}}; operators: eq ne gt lt ge le is 'is not' in 'not in' starts contains. Use deputy_describe_resource to see an object's fields and joins. Read-only. Deputy: POST /api/v1/resource/{Object}/QUERY.
| Parameter | Type | Description |
|---|---|---|
object * | string | Resource API object. Deputy names: Company = location, OperationalUnit = area, Roster = shift, LeaveRules = leave types, TimesheetPayReturn = approved pay lines. |
join | array | Related objects to expand inline, e.g. ["TimesheetObject"] on TimesheetPayReturn. |
max | integer | Page size, 1-500 (Deputy's cap). Default 25, or 10 when join is set (joined records are larger); page through with next_start. |
search | object | Clauses keyed by any id (s1, s2, …). All must match. |
sort | object | Field → asc/desc, e.g. {"Id":"desc"}. |
start | integer | Pagination offset (0-based). Pass the previous page's next_start. |
deputy_describe_resource Describe a Deputy resource
Return a Resource API object's field list, field types and joinable associations — what deputy_query_resource can filter, sort and join on. Deputy: GET /api/v1/resource/{Object}/INFO.
| Parameter | Type | Description |
|---|---|---|
object * | string | Resource API object. Deputy names: Company = location, OperationalUnit = area, Roster = shift, LeaveRules = leave types, TimesheetPayReturn = approved pay lines. |
deputy_create_shift Create a shift
Add a shift to the roster, assigned to an employee or left open. Created as a DRAFT unless publish is true (publishing can notify the employee). Deputy returns an empty 200 on success — use deputy_list_shifts to find the new shift's id. Deputy: POST /api/v1/supervise/roster.
| Parameter | Type | Description |
|---|---|---|
area_id * | integer | Area (OperationalUnit id) the shift is for. |
end_time * | Shift end: a unix timestamp in seconds, or an ISO 8601 datetime (include an offset for local times). | |
start_time * | Shift start: a unix timestamp in seconds, or an ISO 8601 datetime (include an offset for local times). | |
comment | string | Comment shown on the shift. |
confirmed | boolean | Mark the shift as confirmed. |
employee_id | integer | Employee to put on the shift. Omit (and set open: true) for an unfilled shift. |
force_overwrite | boolean | Overwrite a clashing shift for the same employee. Default false. |
mealbreak_minutes | integer | Unpaid meal break length in minutes. |
open | boolean | Show the shift as open for employees to claim. |
publish | boolean | Publish now. Publishing can notify the employee. Default false (draft). |
deputy_update_shift Update a shift
Change an existing shift's times, area, employee, break or comment. Send the full intended shift (same fields as create) — Deputy's update is the add call with the shift id. Deputy: POST /api/v1/supervise/roster with intRosterId.
| Parameter | Type | Description |
|---|---|---|
area_id * | integer | Area (OperationalUnit id) the shift is for. |
end_time * | Shift end: a unix timestamp in seconds, or an ISO 8601 datetime (include an offset for local times). | |
shift_id * | integer | The shift (Roster) id. |
start_time * | Shift start: a unix timestamp in seconds, or an ISO 8601 datetime (include an offset for local times). | |
comment | string | Comment shown on the shift. |
confirmed | boolean | Mark the shift as confirmed. |
employee_id | integer | Employee to put on the shift. Omit (and set open: true) for an unfilled shift. |
force_overwrite | boolean | Overwrite a clashing shift for the same employee. Default false. |
mealbreak_minutes | integer | Unpaid meal break length in minutes. |
open | boolean | Show the shift as open for employees to claim. |
publish | boolean | Publish now. Publishing can notify the employee. Default false (draft). |
deputy_publish_shifts Publish shifts
Publish draft shifts so employees see them, choosing how they are notified: 1 SMS and email, 2 SMS, 3 email, 4 no notification, 5 confirmation required. Only the listed shift ids are published. Deputy: POST /api/v1/supervise/roster/publish.
| Parameter | Type | Description |
|---|---|---|
notify_mode * | integer | 1 SMS+email, 2 SMS, 3 email, 4 none, 5 confirmation required. |
shift_ids * | array | Roster ids to publish. |
deputy_create_leave_request Create a leave request
Add a leave request for an employee. By default it waits for manager approval (status 0); pass status 1 only when your system is the source of truth and the leave is already approved. Deputy tracks leave in hours, so give exact start and end times. Find leave type ids with deputy_query_resource on LeaveRules. Deputy: POST /api/v1/resource/Leave.
| Parameter | Type | Description |
|---|---|---|
comment * | string | The employee's note to the manager. |
employee_id * | integer | The employee id. |
end_date * | string | Last day, YYYY-MM-DD. |
end_time * | Leave end: a unix timestamp in seconds, or an ISO 8601 datetime (include an offset for local times). | |
leave_rule_id * | integer | Leave type (LeaveRules id), e.g. annual leave. |
location_id * | integer | Location (Company id) the leave is recorded against. |
start_date * | string | First day, YYYY-MM-DD. |
start_time * | Leave start: a unix timestamp in seconds, or an ISO 8601 datetime (include an offset for local times). | |
approval_comment | string | Manager's comment, when status is 1. |
status | 0 awaiting approval (default), 1 already approved. |
deputy_create_memo Post a memo
Post a memo to a location's news feed, optionally requiring staff to confirm they read it, or targeted to specific locations or users. Visible to staff immediately. Deputy: PUT /api/v1/supervise/memo.
| Parameter | Type | Description |
|---|---|---|
content * | string | The memo text. |
location_id * | integer | Location (Company id) to post to. |
location_ids | array | Also show at these locations. |
require_confirm | boolean | Ask staff to confirm they have read it. Default false. |
user_ids | array | Only these USER ids (not employee ids) receive it. |
deputy_update_timesheet Update a timesheet
Correct an existing timesheet's start/end time, area, meal break or supervisor comment. Times cannot be in the future. Deputy: POST /api/v1/supervise/timesheet/update.
| Parameter | Type | Description |
|---|---|---|
area_id * | integer | Area (OperationalUnit id) the time was worked in. |
end_time * | Timesheet end: a unix timestamp in seconds, or an ISO 8601 datetime (include an offset for local times). | |
start_time * | Timesheet start: a unix timestamp in seconds, or an ISO 8601 datetime (include an offset for local times). | |
timesheet_id * | integer | The timesheet id. |
comment | string | Comment attached to the timesheet. |
mealbreak_minutes | integer | Total unscheduled meal break, minutes. |
deputy_approve_timesheet Approve a timesheet
Approve one timesheet's times as a supervisor. Approved timesheets flow toward payroll export, so check it first with deputy_get_timesheet. Deputy: POST /api/v1/supervise/timesheet/approve.
| Parameter | Type | Description |
|---|---|---|
timesheet_id * | integer | The timesheet id. |