Skip to main content
Glama

Save Unit of Measure

save_uom
Destructive

Create or edit one unit of measure. Omit id to create (abbreviation, name and type required; type is quantity, weight, volume or dimension); pass id to edit, where every omitted field keeps its value. Abbreviations are unique per tenant. A unit's type cannot change while items or conversions use it. isDefault=true makes it the default unit new items take; the preview names the unit that loses the flag. The tenant always keeps a default: the current one stays default until another unit takes the flag. Requires an operator (unpinned) credential. For bulk onboarding use upsert_uoms.

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": {
      "input": "<input>"
    },
    "name": "save_uom"
  }
}

Input Schema

NameRequiredDescriptionDefault
idNoThe unit id (GUID) to edit; omit to create.
inputYesThe fields to set.
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.
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
uomNo
deletedNo
previewNo
expiresAtNo
actionItemIdNo
confirmationNo
correlationIdNo
approvalResultNo
idempotencyKeyNo
previewReceiptNo
idempotentReplayNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.5/5.0
Behavior4/5

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

Goes well beyond the annotations by disclosing tenant-scoped abbreviation uniqueness, type immutability under usage, the default-flag handoff (including that the preview names the unit losing the flag), the invariant that a tenant always keeps a default, and the operator credential requirement. The main omission is any prose mention of the mandatory preview/commit two-step write, which is a significant invocation behavior — though the schema does cover it fully.

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?

Densely front-loaded: create-vs-edit rules come first, then constraints, then the default-unit semantics, then credentials and the sibling pointer. Every clause carries information, though the description is a long run of stacked sentences rather than visually separated rules.

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

Completeness4/5

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

For a mutating tool with an output schema and full parameter documentation, the description covers modes, constraints, defaults and auth. The notable gap is that a two-call preview→commit protocol is required by the schema but never surfaced in the prose, which an agent skimming only the description would miss.

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: it enumerates the four type values, marks which fields are creation-required, and explains the cross-parameter effect of isDefault (new items inherit it, previous default loses it, current default cannot merely be switched off). It says nothing about preview, previewReceipt or idempotencyKey, leaving that entirely to the schema.

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?

Opens with a specific verb+resource ('Create or edit one unit of measure') and immediately splits the two modes by parameter (omit id to create, pass id to edit). It is clearly distinguishable from the sibling upsert_uoms, which is named as the bulk alternative.

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?

Explicit routing rules: omit id vs pass id, plus 'For bulk onboarding use upsert_uoms' naming the alternative and the condition that selects it. It also states creation prerequisites (abbreviation, name, type) and the constraint that type cannot change while in use.

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