List Shifts
list_shiftsRetrieve paginated on-call shifts filtered by user, schedule, or date range, with enriched user details and calculated hours.
Instructions
List on-call shifts with reliable filtering, enrichment, and MCP-level pagination.
Unlike the raw API, this tool:
Actually filters by user_ids (client-side filtering)
Includes user_name, user_email, schedule_name, team_name
Calculates total_hours for each shift
Returns a predictable paginated result for MCP clients
Use this instead of the auto-generated listShifts when you need user filtering or dependable pagination on large tenants.
Answers questions about individual shifts: who is on call at a given time, when a handoff happens, which shifts were overrides, or one person's schedule (via user_ids). For questions about totals across a team -- hours per responder, coverage, load -- use get_oncall_schedule_summary, whose response size depends on team size rather than on how long a range you asked for.
Ranges longer than the upstream cap are split into windows and merged automatically, so a multi-month range is a normal request.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "list_shifts"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| to_date | No | End date/time for shift query (ISO 8601 format, e.g., '2026-02-15T23:59:59Z'). Required when from_date is given. | |
| user_ids | No | Comma-separated list of user IDs to filter by (e.g., '2381,94178'). Only returns shifts for these users. | |
| from_date | No | Start date/time for shift query (ISO 8601 format, e.g., '2026-02-09T00:00:00Z'). Omit both from_date and to_date for the next 7 days starting now. | |
| page_size | No | Number of enriched shifts to return per page (max: 100). This paginates the MCP response even when the upstream shifts API does not. | |
| page_number | No | Page number of enriched shifts to return (1-indexed). Use this instead of relying on the generated listShifts pagination. | |
| schedule_ids | No | Comma-separated list of schedule IDs to filter by (optional) | |
| include_user_details | No | Include user name and email in response (default: True) |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||