Skip to main content
Glama

Apply Labor Default

apply_labor_default
DestructiveIdempotent

Recalculate a run's labor draft from its operation's reviewed default, as the labor planner screen's apply-default does: the default's per-run and per-unit minutes become the draft's elapsed time and attendance, keeping its planned start. Only for a run that is not committed, not started and has no recorded time; the draft then awaits review, which committing it gives. Needs an enabled default (save_labor_default) and a reason for the plan's history. Name the run by operationId, or by workOrder and operationCode. 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": {
      "reason": "<reason>"
    },
    "name": "apply_labor_default"
  }
}

Input Schema

NameRequiredDescriptionDefault
reasonYesWhy, for the plan's history: 1–1000 characters.
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.
workOrderNoThe run's work order number, with operationCode.
operationIdNoThe run's operation id (GUID).
operationCodeNoThe run's operation code, with workOrder.
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.

Output Schema

NameRequiredDescriptionDefault
okNo
previewNo
requestNo
committedNo
expiresAtNo
planVersionNo
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?

Goes well beyond the annotations (which only say destructive, not read-only, idempotent, closed-world): it describes exactly what is overwritten (elapsed time and attendance) and what is preserved (planned start), the post-state (draft awaits review, committing finalizes it), the auth model (Admin; operator credentials only), and UI behavior (confirm card in the in-app assistant). Nothing here contradicts destructiveHint=true or idempotentHint=true.

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?

Front-loaded with the core action and outcome, then preconditions, then addressing, then auth and safety. The sentences are dense and multi-clause, and the closing 'the in-app assistant gets a confirm card' is surface-specific, but no sentence is filler.

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 and full parameter documentation are supplied, so the description only needs to carry intent, preconditions, and side effects — and it does all three, including what the recalculation destroys and what it leaves intact. An agent has everything needed to decide whether to call it and how to sequence the preview/commit pair.

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 a bump by stating the two mutually exclusive addressing modes (operationId alone, or workOrder plus operationCode) and by ordering the write sequence (preview first, then commit), which gives the preview/previewReceipt/idempotencyKey parameters operational meaning. Much of it does echo the schema's per-property text rather than adding new detail.

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 and resource (recalculate a run's labor draft from its operation's reviewed default) and explains the mechanism concretely: default's per-run and per-unit minutes become the draft's elapsed time and attendance, keeping planned start. It also distinguishes itself from the neighboring save_labor_default, which is framed as the prerequisite rather than a substitute.

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 an explicit negative precondition ('Only for a run that is not committed, not started and has no recorded time') plus a prerequisite ('Needs an enabled default (save_labor_default)') and a sequencing rule ('Preview first'). It stops short of naming what to use instead when the run is committed or started, so the alternative path is left to inference.

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