RotaCloud MCP by usefulapi

Read RotaCloud shifts, attendance, leave, availability and payroll; create shifts and handle leave.

我該用這個嗎

品質與安全性

A
說明品質
98%
結構描述完整度
95%
命名品質
78%
汙染風險
100%
權限相符程度
100%
協定合規性
100%

發現項目(2)

  • LOWTool 'rotacloud_list_holiday_allowances' name length outside 3-30 range在 rotacloud_list_holiday_allowances 中
  • LOWTool 'rotacloud_approve_leave_request' name length outside 3-30 range在 rotacloud_approve_leave_request 中

根據工具定義與協定合規性的自動化分析。

上下文成本

~6,405Token(工具定義)
~2.1 KB典型回應大小
顯著的注意力影響(128k 上下文的 5.00%)

這是每次將伺服器的工具載入模型上下文時所消耗的約略 token 數量。數量越高,可用於其他工作的注意力就越少。

安裝

一鍵安裝

將以下內容加入你的 `claude_desktop_config.json` 檔案:

{
  "mcpServers": {
    "rotacloud": {
      "url": "https://rotacloud.usefulapi.io/mcp"
    }
  }
}

遠端端點

https://rotacloud.usefulapi.io/mcpstreamable-http

它能做什麼

工具清單

工具(26)

🟢 唯讀🟡 寫入🔴 刪除⚪ 未知
🟢rotacloud_list_accounts(limit, offset)

The RotaCloud account(s) this API key belongs to: name, plan, time zone, employee count. GET /accounts.

輸入結構描述

{
  "type": "object",
  "properties": {
    "limit": {
      "description": "Results per page, 1-500 (RotaCloud may cap it lower; the reply's total and next_offset show what is left).",
      "type": "integer",
      "exclusiveMinimum": 0,
      "maximum": 500
    },
    "offset": {
      "description": "Index of the first result; pass the previous reply's next_offset.",
      "type": "integer",
      "minimum": 0,
      "maximum": 1000000
    }
  },
  "$schema": "https://json-schema.org/draft/2020-12/schema"
}
🟢rotacloud_list_users(ids, locations, include_deleted, limit, offset)

List employees (users) with their level, roles, locations, contact details and pay settings. Use it to map user ids in shifts, leave and attendance to names. GET /users.

輸入結構描述

{
  "type": "object",
  "properties": {
    "ids": {
      "description": "Only these user ids.",
      "type": "array",
      "items": {
        "type": "integer",
        "exclusiveMinimum": 0,
        "maximum": 9007199254740991
      }
    },
    "locations": {
      "description": "Only users in these location ids.",
      "type": "array",
      "items": {
        "type": "integer",
        "exclusiveMinimum": 0,
        "maximum": 9007199254740991
      }
    },
    "include_deleted": {
      "description": "Include deleted (former) users.",
      "type": "boolean"
    },
    "limit": {
      "description": "Results per page, 1-500 (RotaCloud may cap it lower; the reply's total and next_offset show what is left).",
      "type": "integer",
      "exclusiveMinimum": 0,
      "maximum": 500
    },
    "offset": {
      "description": "Index of the first result; pass the previous reply's next_offset.",
      "type": "integer",
      "minimum": 0,
      "maximum": 1000000
    }
  },
  "$schema": "https://json-schema.org/draft/2020-12/schema"
}
🟢rotacloud_get_user(user_id)

One employee by id. GET /users/{id}.

輸入結構描述

{
  "type": "object",
  "properties": {
    "user_id": {
      "type": "integer",
      "exclusiveMinimum": 0,
      "maximum": 9007199254740991,
      "description": "RotaCloud user id."
    }
  },
  "required": [
    "user_id"
  ],
  "$schema": "https://json-schema.org/draft/2020-12/schema"
}
🟢rotacloud_list_locations(ids, include_deleted, limit, offset)

List locations (sites/branches) with address, time zone and managers. GET /locations.

輸入結構描述

{
  "type": "object",
  "properties": {
    "ids": {
      "description": "Only these location ids.",
      "type": "array",
      "items": {
        "type": "integer",
        "exclusiveMinimum": 0,
        "maximum": 9007199254740991
      }
    },
    "include_deleted": {
      "description": "Include deleted locations.",
      "type": "boolean"
    },
    "limit": {
      "description": "Results per page, 1-500 (RotaCloud may cap it lower; the reply's total and next_offset show what is left).",
      "type": "integer",
      "exclusiveMinimum": 0,
      "maximum": 500
    },
    "offset": {
      "description": "Index of the first result; pass the previous reply's next_offset.",
      "type": "integer",
      "minimum": 0,
      "maximum": 1000000
    }
  },
  "$schema": "https://json-schema.org/draft/2020-12/schema"
}
🟢rotacloud_list_roles(ids, include_deleted, limit, offset)

List job roles (positions) with colour, default break and pay rate. GET /roles.

輸入結構描述

{
  "type": "object",
  "properties": {
    "ids": {
      "description": "Only these role ids.",
      "type": "array",
      "items": {
        "type": "integer",
        "exclusiveMinimum": 0,
        "maximum": 9007199254740991
      }
    },
    "include_deleted": {
      "description": "Include deleted roles.",
      "type": "boolean"
    },
    "limit": {
      "description": "Results per page, 1-500 (RotaCloud may cap it lower; the reply's total and next_offset show what is left).",
      "type": "integer",
      "exclusiveMinimum": 0,
      "maximum": 500
    },
    "offset": {
      "description": "Index of the first result; pass the previous reply's next_offset.",
      "type": "integer",
      "minimum": 0,
      "maximum": 1000000
    }
  },
  "$schema": "https://json-schema.org/draft/2020-12/schema"
}
🟢rotacloud_list_shifts(start, end, users, locations, roles, ...)

List rota shifts in a time range: start/end times (Unix seconds), break, assigned user (null = open shift), location, role, notes, published and acknowledged state. Filter by users, locations, roles, open or published. GET /shifts.

輸入結構描述

{
  "type": "object",
  "properties": {
    "start": {
      "anyOf": [
        {
          "type": "integer",
          "minimum": -9007199254740991,
          "maximum": 9007199254740991
        },
        {
          "type": "string"
        }
      ],
      "description": "Unix timestamp (seconds), an ISO 8601 date (2026-10-12 = 00:00 UTC) or an ISO 8601 date-time with a time zone (2026-10-12T09:00:00+01:00 or ...Z)."
    },
    "end": {
      "anyOf": [
        {
          "type": "integer",
          "minimum": -9007199254740991,
          "maximum": 9007199254740991
        },
        {
          "type": "string"
        }
      ],
      "description": "Unix timestamp (seconds), an ISO 8601 date (2026-10-12 = 00:00 UTC) or an ISO 8601 date-time with a time zone (2026-10-12T09:00:00+01:00 or ...Z)."
    },
    "users": {
      "description": "Only shifts of these user ids (add 0 to include open shifts).",
      "type": "array",
      "items": {
        "type": "integer",
        "minimum": 0,
        "maximum": 9007199254740991
      }
    },
    "locations": {
      "description": "Only shifts at these location ids.",
      "type": "array",
      "items": {
        "type": "integer",
        "exclusiveMinimum": 0,
        "maximum": 9007199254740991
      }
    },
    "roles": {
      "description": "Only shifts with these role ids.",
      "type": "array",
      "items": {
        "type": "integer",
        "exclusiveMinimum": 0,
        "maximum": 9007199254740991
      }
    },
    "open": {
      "description": "true = only open (unassigned) shifts, false = only assigned shifts.",
      "type": "boolean"
    },
    "published": {
      "description": "true = only published shifts, false = only unpublished (draft) shifts.",
      "type": "boolean"
    },
    "include_deleted": {
      "description": "Include deleted shifts.",
      "type": "boolean"
    },
    "limit": {
      "description": "Results per page, 1-500 (RotaCloud may cap it lower; the reply's total and next_offset show what is left).",
      "type": "integer",
      "exclusiveMinimum": 0,
      "maximum": 500
    },
    "offset": {
      "description": "Index of the first result; pass the previous reply's next_offset.",
      "type": "integer",
      "minimum": 0,
      "maximum": 1000000
    }
  },
  "required": [
    "start",
    "end"
  ],
  "$schema": "https://json-schema.org/draft/2020-12/schema"
}
🟢rotacloud_get_shift(shift_id)

One shift by id. GET /shifts/{id}.

輸入結構描述

{
  "type": "object",
  "properties": {
    "shift_id": {
      "type": "integer",
      "exclusiveMinimum": 0,
      "maximum": 9007199254740991,
      "description": "RotaCloud shift id."
    }
  },
  "required": [
    "shift_id"
  ],
  "$schema": "https://json-schema.org/draft/2020-12/schema"
}
🟢rotacloud_list_swap_requests(include_deleted, limit, offset)

List shift swap requests with their status, the shifts and the users involved. GET /swap_requests.

輸入結構描述

{
  "type": "object",
  "properties": {
    "include_deleted": {
      "description": "Include deleted swap requests.",
      "type": "boolean"
    },
    "limit": {
      "description": "Results per page, 1-500 (RotaCloud may cap it lower; the reply's total and next_offset show what is left).",
      "type": "integer",
      "exclusiveMinimum": 0,
      "maximum": 500
    },
    "offset": {
      "description": "Index of the first result; pass the previous reply's next_offset.",
      "type": "integer",
      "minimum": 0,
      "maximum": 1000000
    }
  },
  "$schema": "https://json-schema.org/draft/2020-12/schema"
}
🟢rotacloud_list_day_notes(start, end, location, limit, offset)

List day notes (notices pinned to rota dates, e.g. events or deliveries), optionally for one location. GET /day_notes.

輸入結構描述

{
  "type": "object",
  "properties": {
    "start": {
      "description": "First date (yyyy-mm-dd).",
      "type": "string",
      "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
    },
    "end": {
      "description": "Last date (yyyy-mm-dd).",
      "type": "string",
      "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
    },
    "location": {
      "description": "Only notes for this location id.",
      "type": "integer",
      "exclusiveMinimum": 0,
      "maximum": 9007199254740991
    },
    "limit": {
      "description": "Results per page, 1-500 (RotaCloud may cap it lower; the reply's total and next_offset show what is left).",
      "type": "integer",
      "exclusiveMinimum": 0,
      "maximum": 500
    },
    "offset": {
      "description": "Index of the first result; pass the previous reply's next_offset.",
      "type": "integer",
      "minimum": 0,
      "maximum": 1000000
    }
  },
  "$schema": "https://json-schema.org/draft/2020-12/schema"
}
🟢rotacloud_list_attendance(start, end, users, locations, roles, ...)

List time & attendance records (clock-in/out times, breaks, minutes late, hours, approval state) in a time range. GET /attendance.

輸入結構描述

{
  "type": "object",
  "properties": {
    "start": {
      "anyOf": [
        {
          "type": "integer",
          "minimum": -9007199254740991,
          "maximum": 9007199254740991
        },
        {
          "type": "string"
        }
      ],
      "description": "Unix timestamp (seconds), an ISO 8601 date (2026-10-12 = 00:00 UTC) or an ISO 8601 date-time with a time zone (2026-10-12T09:00:00+01:00 or ...Z)."
    },
    "end": {
      "anyOf": [
        {
          "type": "integer",
          "minimum": -9007199254740991,
          "maximum": 9007199254740991
        },
        {
          "type": "string"
        }
      ],
      "description": "Unix timestamp (seconds), an ISO 8601 date (2026-10-12 = 00:00 UTC) or an ISO 8601 date-time with a time zone (2026-10-12T09:00:00+01:00 or ...Z)."
    },
    "users": {
      "description": "Only these user ids.",
      "type": "array",
      "items": {
        "type": "integer",
        "exclusiveMinimum": 0,
        "maximum": 9007199254740991
      }
    },
    "locations": {
      "description": "Only these location ids.",
      "type": "array",
      "items": {
        "type": "integer",
        "exclusiveMinimum": 0,
        "maximum": 9007199254740991
      }
    },
    "roles": {
      "description": "Only these role ids.",
      "type": "array",
      "items": {
        "type": "integer",
        "exclusiveMinimum": 0,
        "maximum": 9007199254740991
      }
    },
    "approved": {
      "description": "true = only approved records, false = only unapproved.",
      "type": "boolean"
    },
    "include_deleted": {
      "description": "Include deleted records.",
      "type": "boolean"
    },
    "limit": {
      "description": "Results per page, 1-500 (RotaCloud may cap it lower; the reply's total and next_offset show what is left).",
      "type": "integer",
      "exclusiveMinimum": 0,
      "maximum": 500
    },
    "offset": {
      "description": "Index of the first result; pass the previous reply's next_offset.",
      "type": "integer",
      "minimum": 0,
      "maximum": 1000000
    }
  },
  "required": [
    "start",
    "end"
  ],
  "$schema": "https://json-schema.org/draft/2020-12/schema"
}
🟢rotacloud_list_clocked_in(limit, offset)

Who is clocked in right now: user, location, role, clock-in time, minutes late and break state. GET /users_clocked_in.

輸入結構描述

{
  "type": "object",
  "properties": {
    "limit": {
      "description": "Results per page, 1-500 (RotaCloud may cap it lower; the reply's total and next_offset show what is left).",
      "type": "integer",
      "exclusiveMinimum": 0,
      "maximum": 500
    },
    "offset": {
      "description": "Index of the first result; pass the previous reply's next_offset.",
      "type": "integer",
      "minimum": 0,
      "maximum": 1000000
    }
  },
  "$schema": "https://json-schema.org/draft/2020-12/schema"
}
🟢rotacloud_list_leave(start, end, year, users, types, ...)

List booked leave (holiday, sickness, etc.) with type, user, dates, hours and status. Filter by date range or leave year, users and leave types; pending/denied/expired requests are excluded unless asked for. GET /leave.

輸入結構描述

{
  "type": "object",
  "properties": {
    "start": {
      "description": "First date (yyyy-mm-dd).",
      "type": "string",
      "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
    },
    "end": {
      "description": "Last date (yyyy-mm-dd).",
      "type": "string",
      "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
    },
    "year": {
      "description": "Leave year instead of a date range.",
      "type": "integer",
      "minimum": 2000,
      "maximum": 2100
    },
    "users": {
      "description": "Only these user ids.",
      "type": "array",
      "items": {
        "type": "integer",
        "exclusiveMinimum": 0,
        "maximum": 9007199254740991
      }
    },
    "types": {
      "description": "Only these leave type ids (see rotacloud_list_leave_types).",
      "type": "array",
      "items": {
        "type": "integer",
        "exclusiveMinimum": 0,
        "maximum": 9007199254740991
      }
    },
    "include_requested": {
      "description": "Include pending leave requests.",
      "type": "boolean"
    },
    "include_denied": {
      "description": "Include denied leave requests.",
      "type": "boolean"
    },
    "include_expired": {
      "description": "Include expired leave requests.",
      "type": "boolean"
    },
    "include_deleted": {
      "description": "Include deleted leave.",
      "type": "boolean"
    },
    "limit": {
      "description": "Results per page, 1-500 (RotaCloud may cap it lower; the reply's total and next_offset show what is left).",
      "type": "integer",
      "exclusiveMinimum": 0,
      "maximum": 500
    },
    "offset": {
      "description": "Index of the first result; pass the previous reply's next_offset.",
      "type": "integer",
      "minimum": 0,
      "maximum": 1000000
    }
  },
  "$schema": "https://json-schema.org/draft/2020-12/schema"
}
🟢rotacloud_list_leave_requests(include_deleted, limit, offset)

List leave requests awaiting a decision (and past ones): user, leave type, dates, half days, the employee's message. GET /leave_requests.

輸入結構描述

{
  "type": "object",
  "properties": {
    "include_deleted": {
      "description": "Include deleted requests.",
      "type": "boolean"
    },
    "limit": {
      "description": "Results per page, 1-500 (RotaCloud may cap it lower; the reply's total and next_offset show what is left).",
      "type": "integer",
      "exclusiveMinimum": 0,
      "maximum": 500
    },
    "offset": {
      "description": "Index of the first result; pass the previous reply's next_offset.",
      "type": "integer",
      "minimum": 0,
      "maximum": 1000000
    }
  },
  "$schema": "https://json-schema.org/draft/2020-12/schema"
}
🟢rotacloud_get_leave_request(request_id)

One leave request by id, with the per-day breakdown. GET /leave_requests/{id}.

輸入結構描述

{
  "type": "object",
  "properties": {
    "request_id": {
      "type": "integer",
      "exclusiveMinimum": 0,
      "maximum": 9007199254740991,
      "description": "Leave request id."
    }
  },
  "required": [
    "request_id"
  ],
  "$schema": "https://json-schema.org/draft/2020-12/schema"
}
🟢rotacloud_list_leave_types(limit, offset)

List leave types (Holiday, Sickness, Unpaid, ...) with id, short name and whether employees can request them. GET /leave_types.

輸入結構描述

{
  "type": "object",
  "properties": {
    "limit": {
      "description": "Results per page, 1-500 (RotaCloud may cap it lower; the reply's total and next_offset show what is left).",
      "type": "integer",
      "exclusiveMinimum": 0,
      "maximum": 500
    },
    "offset": {
      "description": "Index of the first result; pass the previous reply's next_offset.",
      "type": "integer",
      "minimum": 0,
      "maximum": 1000000
    }
  },
  "$schema": "https://json-schema.org/draft/2020-12/schema"
}
🟢rotacloud_list_holiday_allowances(year, limit, offset)

Every employee's holiday allowance for a leave year (default and custom allowance, unit, carried over). GET /holiday_allowances/{year}.

輸入結構描述

{
  "type": "object",
  "properties": {
    "year": {
      "type": "integer",
      "minimum": 2000,
      "maximum": 2100,
      "description": "Leave year, e.g. 2026."
    },
    "limit": {
      "description": "Results per page, 1-500 (RotaCloud may cap it lower; the reply's total and next_offset show what is left).",
      "type": "integer",
      "exclusiveMinimum": 0,
      "maximum": 500
    },
    "offset": {
      "description": "Index of the first result; pass the previous reply's next_offset.",
      "type": "integer",
      "minimum": 0,
      "maximum": 1000000
    }
  },
  "required": [
    "year"
  ],
  "$schema": "https://json-schema.org/draft/2020-12/schema"
}
🟢rotacloud_get_availability(start, end, users, limit, offset)

Employees' availability per date in a range (available / unavailable times). GET /availability.

輸入結構描述

{
  "type": "object",
  "properties": {
    "start": {
      "type": "string",
      "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
      "description": "First date (yyyy-mm-dd)."
    },
    "end": {
      "type": "string",
      "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
      "description": "Last date (yyyy-mm-dd)."
    },
    "users": {
      "description": "Only these user ids.",
      "type": "array",
      "items": {
        "type": "integer",
        "exclusiveMinimum": 0,
        "maximum": 9007199254740991
      }
    },
    "limit": {
      "description": "Results per page, 1-500 (RotaCloud may cap it lower; the reply's total and next_offset show what is left).",
      "type": "integer",
      "exclusiveMinimum": 0,
      "maximum": 500
    },
    "offset": {
      "description": "Index of the first result; pass the previous reply's next_offset.",
      "type": "integer",
      "minimum": 0,
      "maximum": 1000000
    }
  },
  "required": [
    "start",
    "end"
  ],
  "$schema": "https://json-schema.org/draft/2020-12/schema"
}
🟢rotacloud_list_days_off(start, end, users, limit, offset)

Employees' scheduled days off per date in a range. GET /days_off.

輸入結構描述

{
  "type": "object",
  "properties": {
    "start": {
      "type": "string",
      "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
      "description": "First date (yyyy-mm-dd)."
    },
    "end": {
      "type": "string",
      "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
      "description": "Last date (yyyy-mm-dd)."
    },
    "users": {
      "description": "Only these user ids.",
      "type": "array",
      "items": {
        "type": "integer",
        "exclusiveMinimum": 0,
        "maximum": 9007199254740991
      }
    },
    "limit": {
      "description": "Results per page, 1-500 (RotaCloud may cap it lower; the reply's total and next_offset show what is left).",
      "type": "integer",
      "exclusiveMinimum": 0,
      "maximum": 500
    },
    "offset": {
      "description": "Index of the first result; pass the previous reply's next_offset.",
      "type": "integer",
      "minimum": 0,
      "maximum": 1000000
    }
  },
  "required": [
    "start",
    "end"
  ],
  "$schema": "https://json-schema.org/draft/2020-12/schema"
}
🟢rotacloud_list_pay_periods(start, end, limit, offset)

List pay periods overlapping a date range (id, name, start/end date, locked). GET /pay_periods.

輸入結構描述

{
  "type": "object",
  "properties": {
    "start": {
      "type": "string",
      "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
      "description": "First date (yyyy-mm-dd)."
    },
    "end": {
      "type": "string",
      "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
      "description": "Last date (yyyy-mm-dd)."
    },
    "limit": {
      "description": "Results per page, 1-500 (RotaCloud may cap it lower; the reply's total and next_offset show what is left).",
      "type": "integer",
      "exclusiveMinimum": 0,
      "maximum": 500
    },
    "offset": {
      "description": "Index of the first result; pass the previous reply's next_offset.",
      "type": "integer",
      "minimum": 0,
      "maximum": 1000000
    }
  },
  "required": [
    "start",
    "end"
  ],
  "$schema": "https://json-schema.org/draft/2020-12/schema"
}
🟢rotacloud_get_payroll(pay_period_id, limit, offset)

Payroll for one pay period, per employee: pay settings, attendance worked, paid/unpaid leave, overtime and pay totals. Contains pay data. GET /pay_periods/{id}/payroll.

輸入結構描述

{
  "type": "object",
  "properties": {
    "pay_period_id": {
      "type": "integer",
      "exclusiveMinimum": 0,
      "maximum": 9007199254740991,
      "description": "Pay period id (from rotacloud_list_pay_periods)."
    },
    "limit": {
      "description": "Results per page, 1-500 (RotaCloud may cap it lower; the reply's total and next_offset show what is left).",
      "type": "integer",
      "exclusiveMinimum": 0,
      "maximum": 500
    },
    "offset": {
      "description": "Index of the first result; pass the previous reply's next_offset.",
      "type": "integer",
      "minimum": 0,
      "maximum": 1000000
    }
  },
  "required": [
    "pay_period_id"
  ],
  "$schema": "https://json-schema.org/draft/2020-12/schema"
}
🔴rotacloud_create_shift(start_time, end_time, location_id, user_id, role_id, ...)

WRITE: create a shift on the rota. Leave user_id out for an open shift. Unpublished by default (employees see it once published). POST /shifts.

輸入結構描述

{
  "type": "object",
  "properties": {
    "start_time": {
      "anyOf": [
        {
          "type": "integer",
          "minimum": -9007199254740991,
          "maximum": 9007199254740991
        },
        {
          "type": "string"
        }
      ],
      "description": "Unix timestamp (seconds), an ISO 8601 date (2026-10-12 = 00:00 UTC) or an ISO 8601 date-time with a time zone (2026-10-12T09:00:00+01:00 or ...Z)."
    },
    "end_time": {
      "anyOf": [
        {
          "type": "integer",
          "minimum": -9007199254740991,
          "maximum": 9007199254740991
        },
        {
          "type": "string"
        }
      ],
      "description": "Unix timestamp (seconds), an ISO 8601 date (2026-10-12 = 00:00 UTC) or an ISO 8601 date-time with a time zone (2026-10-12T09:00:00+01:00 or ...Z)."
    },
    "location_id": {
      "type": "integer",
      "exclusiveMinimum": 0,
      "maximum": 9007199254740991,
      "description": "Location id."
    },
    "user_id": {
      "description": "Assigned user id; omit for an open shift.",
      "type": "integer",
      "exclusiveMinimum": 0,
      "maximum": 9007199254740991
    },
    "role_id": {
      "description": "Role id.",
      "type": "integer",
      "exclusiveMinimum": 0,
      "maximum": 9007199254740991
    },
    "minutes_break": {
      "description": "Unpaid break in minutes.",
      "type": "integer",
      "minimum": 0,
      "maximum": 9007199254740991
    },
    "notes": {
      "description": "Shift notes shown to the employee.",
      "type": "string",
      "maxLength": 2000
    },
    "published": {
      "description": "Publish immediately (default false).",
      "type": "boolean"
    }
  },
  "required": [
    "start_time",
    "end_time",
    "location_id"
  ],
  "$schema": "https://json-schema.org/draft/2020-12/schema"
}
🔴rotacloud_update_shift(shift_id, start_time, end_time, user_id, location_id, ...)

WRITE: change a shift's times, assignee, location, role, break, notes or published state. Only the fields you pass change. POST /shifts/{id}.

輸入結構描述

{
  "type": "object",
  "properties": {
    "shift_id": {
      "type": "integer",
      "exclusiveMinimum": 0,
      "maximum": 9007199254740991,
      "description": "Shift id."
    },
    "start_time": {
      "anyOf": [
        {
          "type": "integer",
          "minimum": -9007199254740991,
          "maximum": 9007199254740991
        },
        {
          "type": "string"
        }
      ],
      "description": "Unix timestamp (seconds), an ISO 8601 date (2026-10-12 = 00:00 UTC) or an ISO 8601 date-time with a time zone (2026-10-12T09:00:00+01:00 or ...Z)."
    },
    "end_time": {
      "anyOf": [
        {
          "type": "integer",
          "minimum": -9007199254740991,
          "maximum": 9007199254740991
        },
        {
          "type": "string"
        }
      ],
      "description": "Unix timestamp (seconds), an ISO 8601 date (2026-10-12 = 00:00 UTC) or an ISO 8601 date-time with a time zone (2026-10-12T09:00:00+01:00 or ...Z)."
    },
    "user_id": {
      "description": "New assignee; null makes it an open shift.",
      "anyOf": [
        {
          "type": "integer",
          "exclusiveMinimum": 0,
          "maximum": 9007199254740991
        },
        {
          "type": "null"
        }
      ]
    },
    "location_id": {
      "description": "New location id.",
      "type": "integer",
      "exclusiveMinimum": 0,
      "maximum": 9007199254740991
    },
    "role_id": {
      "description": "New role id.",
      "type": "integer",
      "exclusiveMinimum": 0,
      "maximum": 9007199254740991
    },
    "minutes_break": {
      "description": "Unpaid break in minutes.",
      "type": "integer",
      "minimum": 0,
      "maximum": 9007199254740991
    },
    "notes": {
      "description": "Shift notes.",
      "type": "string",
      "maxLength": 2000
    },
    "published": {
      "description": "Published state.",
      "type": "boolean"
    }
  },
  "required": [
    "shift_id"
  ],
  "$schema": "https://json-schema.org/draft/2020-12/schema"
}
🔴rotacloud_publish_shifts(shift_ids)

WRITE: publish shifts so the assigned employees see them (and get notified). POST /shifts_published.

輸入結構描述

{
  "type": "object",
  "properties": {
    "shift_ids": {
      "minItems": 1,
      "maxItems": 500,
      "type": "array",
      "items": {
        "type": "integer",
        "exclusiveMinimum": 0,
        "maximum": 9007199254740991
      },
      "description": "Ids of the shifts to publish."
    }
  },
  "required": [
    "shift_ids"
  ],
  "$schema": "https://json-schema.org/draft/2020-12/schema"
}
🔴rotacloud_create_leave_request(user_id, leave_type_id, start_date, end_date, start_am_pm, ...)

WRITE: submit a leave request on behalf of an employee (sent as that user, for a manager to approve). POST /leave_requests with the User header.

輸入結構描述

{
  "type": "object",
  "properties": {
    "user_id": {
      "type": "integer",
      "exclusiveMinimum": 0,
      "maximum": 9007199254740991,
      "description": "The employee requesting leave (the request is made as this user)."
    },
    "leave_type_id": {
      "type": "integer",
      "exclusiveMinimum": 0,
      "maximum": 9007199254740991,
      "description": "Leave type id (see rotacloud_list_leave_types; must be requestable)."
    },
    "start_date": {
      "type": "string",
      "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
      "description": "First day (yyyy-mm-dd)."
    },
    "end_date": {
      "type": "string",
      "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
      "description": "Last day (yyyy-mm-dd)."
    },
    "start_am_pm": {
      "description": "'pm' starts at midday (half day); default 'am'.",
      "type": "string",
      "enum": [
        "am",
        "pm"
      ]
    },
    "end_am_pm": {
      "description": "'am' ends at midday (half day); default 'pm'.",
      "type": "string",
      "enum": [
        "am",
        "pm"
      ]
    },
    "message": {
      "description": "Message from the employee to the manager.",
      "type": "string",
      "maxLength": 2000
    }
  },
  "required": [
    "user_id",
    "leave_type_id",
    "start_date",
    "end_date"
  ],
  "$schema": "https://json-schema.org/draft/2020-12/schema"
}
🔴rotacloud_approve_leave_request(request_id, admin_message)

WRITE: approve a pending leave request (it becomes booked leave and the employee is notified). POST /leave_requests/{id}/approve.

輸入結構描述

{
  "type": "object",
  "properties": {
    "request_id": {
      "type": "integer",
      "exclusiveMinimum": 0,
      "maximum": 9007199254740991,
      "description": "Leave request id."
    },
    "admin_message": {
      "description": "Message to the employee.",
      "type": "string",
      "maxLength": 2000
    }
  },
  "required": [
    "request_id"
  ],
  "$schema": "https://json-schema.org/draft/2020-12/schema"
}
🔴rotacloud_deny_leave_request(request_id, admin_message)

WRITE: deny a pending leave request (the employee is notified). POST /leave_requests/{id}/deny.

輸入結構描述

{
  "type": "object",
  "properties": {
    "request_id": {
      "type": "integer",
      "exclusiveMinimum": 0,
      "maximum": 9007199254740991,
      "description": "Leave request id."
    },
    "admin_message": {
      "description": "Reason shown to the employee.",
      "type": "string",
      "maxLength": 2000
    }
  },
  "required": [
    "request_id"
  ],
  "$schema": "https://json-schema.org/draft/2020-12/schema"
}

社群

為此伺服器評分

證據

近期觀測

已驗證未記錄版本26 個工具