Skip to main content
Glama
Rootly MCP server

Rootly MCP server

Official
by rootlyhq

List Shifts

list_shifts
Read-only

Retrieve 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

NameRequiredDescriptionDefault
to_dateNoEnd date/time for shift query (ISO 8601 format, e.g., '2026-02-15T23:59:59Z'). Required when from_date is given.
user_idsNoComma-separated list of user IDs to filter by (e.g., '2381,94178'). Only returns shifts for these users.
from_dateNoStart 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_sizeNoNumber of enriched shifts to return per page (max: 100). This paginates the MCP response even when the upstream shifts API does not.
page_numberNoPage number of enriched shifts to return (1-indexed). Use this instead of relying on the generated listShifts pagination.
schedule_idsNoComma-separated list of schedule IDs to filter by (optional)
include_user_detailsNoInclude user name and email in response (default: True)

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed5 schema fields changedv3.0.0
    • addedInput schema / properties / from_date / default
      Added value: +""
    • changedInput schema / properties / from_date / description
      Previous value: -"Start date/time for shift query (ISO 8601 format, e.g., '2026-02-09T00:00:00Z')"New value: +"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."
    • addedInput schema / properties / to_date / default
      Added value: +""
    • changedInput schema / properties / to_date / description
      Previous value: -"End date/time for shift query (ISO 8601 format, e.g., '2026-02-15T23:59:59Z')"New value: +"End date/time for shift query (ISO 8601 format, e.g., '2026-02-15T23:59:59Z'). Required when from_date is given."
    • removedInput schema / required
      Removed value: -[
      -  "from_date",
      -  "to_date"
      -]
  2. Addedv2.4.0

TDQS

A4.8/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already declare readOnly/openWorld/non-destructive, but the description adds real behavioral context beyond them: filtering happens client-side, results are enriched with user_name, user_email, schedule_name and team_name, total_hours is computed, and pagination is MCP-level rather than upstream. Crucially, it discloses that ranges exceeding the upstream cap are split into windows and merged automatically, which materially changes what the agent can expect from a long request.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

It is front-loaded with the core purpose, then a benefit list, then routing guidance, which is a sensible order. There is mild redundancy: MCP-level pagination is stated in the intro bullet and restated in the closing paragraph, and the 'Unlike the raw API' bullet cluster is longer than strictly necessary.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

An output schema exists, so return values need not be explained, yet the description still names the enrichment fields an agent can rely on. Combined with the windowing behavior and explicit sibling routing for team-level aggregates, nothing an agent needs to call this correctly for a multi-month range is missing.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so the baseline is 3; the description earns extra by clarifying that user_ids filtering is applied client-side relative to the raw API and by tying user_ids to the 'one person's schedule' use case. It does not add format or interaction detail for from_date/to_date or page_size beyond the schema, keeping it short of a 5.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description opens with a specific verb and resource ('List on-call shifts') and immediately narrows scope with 'individual shifts' vs. team-level totals. It explicitly contrasts itself with two named alternatives, the auto-generated listShifts and get_oncall_schedule_summary, so an agent can choose without opening either schema.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

It states concrete when-to-use conditions ('when you need user filtering or dependable pagination on large tenants') and names the exact alternative tool plus the condition that selects it ('questions about totals across a team ... use get_oncall_schedule_summary'). It also supplies example question archetypes (who is on call, handoff time, overrides, one person's schedule) that map to this tool.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Deploy Server

Other Tools