Skip to main content
Glama

When I Work MCP by usefulapi

Update a shift

wheniwork_update_shift
Destructive

Change a shift — reassign it, move it, change position or notes. When I Work requires start_time, end_time and location_id on every update, so fetch the shift first and pass them back. This tool never sends a breaks array; When I Work documents that breaks omitted from an update's breaks list are removed, so re-check the shift's breaks afterwards. When I Work: PUT /2/shifts/{id}.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
colorNoHex colour without #, e.g. cc0000.
notesNoShift notes shown to the employee.
site_idNoJob site for the shift.
user_idNoThe user to assign. 0 (or omitted on create) makes it an open shift.
end_timeYesShift end (required by the API even if unchanged).
shift_idYesThe shift id.
is_sharedNoFor an open shift: a shared open shift.
publishedNoPublish it immediately (default: draft).
break_timeNoUnpaid break length in hours, e.g. 0.5.
start_timeYesShift start (required by the API even if unchanged).
location_idYesThe schedule (location) id.
position_idNoPosition for the shift.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedInput schema / $schema
      Previous value: -"http://json-schema.org/draft-07/schema#"New value: +"https://json-schema.org/draft/2020-12/schema"
  2. First observed

TDQS

A4.6/5.0
Behavior5/5

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

Goes well beyond the single destructiveHint annotation by disclosing two non-obvious API behaviors: required-on-every-update fields (start_time/end_time/location_id) and that omitted breaks are deleted by the API, with a warning to re-check breaks afterwards. This is exactly the kind of hazard an agent cannot infer from annotations or schema.

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?

Four sentences, each carrying distinct operational payload: capability, required-field echo, breaks caveat, API endpoint. Front-loaded with the verb and no filler, though the mandatory-field and breaks sentences could be marginally tighter.

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 mutation tool with no output schema and an invisible breaks array, the description supplies every non-obvious fact needed to call it correctly: required echo fields, the silent-break-deletion hazard, and the named endpoint. An agent has all it needs to avoid data loss.

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 schema already documents all 12 params; baseline would be 3. The description adds genuine value beyond the schema by explaining the server-side requirement that start_time/end_time/location_id must be echoed back, and by flagging the implicit breaks-array behavior that has no corresponding schema property.

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?

States a specific verb (change/update) and enumerates the actual mutable aspects — reassign, move, change position or notes — and anchors to the concrete API operation PUT /2/shifts/{id}. Clearly distinguishable from sibling wheniwork_create_shift and wheniwork_get_shift.

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?

Gives a concrete procedural instruction: fetch the shift first and pass back start_time, end_time and location_id. However, it never names sibling alternatives (e.g. create vs update vs publish_shifts) or states when-not to use this tool, so routing guidance is implicit rather than explicit.

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.