Skip to main content
Glama

Set Labor Calendar

set_labor_calendar
DestructiveIdempotent

Set a worker's recurring calendar, as the labor resources screen's recurring editor does: the local days it covers (firstDate to lastDate, YYYY-MM-DD, at most 365 days), weekly shift and break windows on the local clock, and dated exceptions (one-off shifts, breaks, absences and authorized overtime, as instants with an offset). It replaces the worker's whole calendar; inside the covered days time not on a shift is off duty, outside them capacity is unknown, and commitments check crews against it. The time zone defaults to the account's. Admin; operator credentials only. Preview first; the in-app assistant gets a confirm card.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "worker": "<worker>",
      "firstDate": "<firstDate>",
      "lastDate": "<lastDate>"
    },
    "name": "set_labor_calendar"
  }
}

Input Schema

NameRequiredDescriptionDefault
workerYesThe worker, by id or full name.
previewNoStep 1 of the required two-step write: set true to validate and receive a structured preview plus a single-use previewReceipt. Nothing changes until the commit call.
lastDateYesThe last local day the calendar covers, YYYY-MM-DD.
timeZoneNoAn IANA time zone, e.g. America/Denver; defaults to the account's.
firstDateYesThe first local day the calendar covers, YYYY-MM-DD.
exceptionsNoDated exceptions, at most 500: start and end (ISO 8601 with an offset or Z) and kind (shift, break, absence or overtime).
weeklyWindowsNoWeekly windows, at most 50: day (one weekday, monday … sunday; add a window for each further day), start and end on the local clock (HH:mm; an end at or before the start runs past midnight), and kind (shift, the default, or break).
idempotencyKeyNoCaller-generated idempotency key; required with previewReceipt to commit.
previewReceiptNoStep 2 of the required two-step write: the receipt returned by the preview call. Supply together with a fresh idempotencyKey to commit; calls without it are refused.
repeatedTimePolicyNoWhen the clock repeats an hour (daylight saving ends): earlier (default) or later.

Output Schema

NameRequiredDescriptionDefault
okNo
previewNo
requestNo
committedNo
expiresAtNo
actionItemIdNo
confirmationNo
correlationIdNo
approvalResultNo
idempotencyKeyNo
previewReceiptNo
idempotentReplayNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.6/5.0
Behavior5/5

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

Beyond the annotations, it discloses the consequences that matter: the whole calendar is replaced, time inside covered days that is not on a shift counts as off duty, time outside the range leaves capacity unknown, and commitments validate crews against it. It also surfaces credential requirements and the two-step preview/commit flow, which is exactly the context destructiveHint alone cannot convey.

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?

Three sentences, front-loaded with the action and then the replacement semantics before the operational constraints. It is dense but every clause carries information; a light structural break between the what and the how would make it easier to scan.

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?

For a destructive, ten-parameter write with an output schema already documenting returns, the description covers replacement scope, coverage semantics, credentialing, and the mandatory preview step. An agent has everything needed to decide and call it correctly.

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, but the description adds real meaning: the date range is local days capped at 365, windows are on the local clock with breaks and shifts, exceptions are instants with an offset, and the time zone defaults to the account's. That is interpretive context the schema fields do not supply.

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 ("Set a worker's recurring calendar") and immediately anchors it to the labor resources screen's recurring editor, so the agent knows exactly which artifact is being written. It also states the key differentiator from other labor tools: this replaces the whole calendar rather than amending it.

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

Usage Guidelines4/5

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

It gives a clear required workflow ("Preview first") and an access condition ("Admin; operator credentials only"), plus a note that the in-app assistant surfaces a confirm card. What it lacks is an explicit pointer to alternatives, e.g. when to use worker-level tools like save_labor_worker instead of replacing a whole calendar.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources