Skip to main content
Glama

Upsert Units of Measure

upsert_uoms
DestructiveIdempotent

Create or update units of measure by abbreviation (max 100 per call, case-insensitive match). name and type (quantity/weight/volume/dimension) are required when creating; updates are preserve-on-omit. isDefault=true moves the default flag. validateOnly=true dry-runs every row. Partial success with per-row errors; resubmitting converges. Requires an operator (unpinned) credential — UoMs are tenant-wide settings. (upsert_items also auto-bootstraps the missing standard UoMs; use this tool for custom units like cases or pallets.)

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": {
      "uoms": "<uoms>"
    },
    "name": "upsert_uoms"
  }
}

Input Schema

NameRequiredDescriptionDefault
uomsYesUoM rows to create/update (max 100). abbreviation is required per row.
validateOnlyNotrue = dry-run: validate + probe every row and report the would-be action per row, writing nothing.

Output Schema

NameRequiredDescriptionDefault
rowsNo
totalNo
failedNo
createdNo
updatedNo
uomsCreatedNo
validateOnlyNo
enabledCustomersNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.2/5.0
Behavior3/5

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

Annotations already declare destruction, idempotency, and closed-world scope, so the bar is lower. The description still adds real context: preserve-on-omit update semantics, partial-success per-row errors, resubmission convergence, the auth requirement, and isDefault clearing the flag on every other UoM. It doesn't dwell on what destruction actually means per row, but the annotation plus these notes cover the safety profile adequately.

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?

Dense and front-loaded, with the identity key, limits, and validation path in the first sentences. Every sentence carries information, though the parenthetical on credentials and the sibling note make it slightly crowded for a two-parameter tool.

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?

Migration-relevant behavior is fully covered: limits, identity matching, required-vs-optional fields on create, dry-run mode, partial success, convergence, and auth prerequisites. Since an output schema exists, it need not describe return values, and it still characterizes per-row error delivery.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

With 100% schema description coverage the schema already defines name, type, isDefault, abbreviation, and validateOnly, so the baseline is 3. The description restates rather than adding new syntax or format detail – it clarifies create-time vs update-time requirements but doesn't go beyond what the schema says.

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 with the identity key: 'Create or update units of measure by abbreviation (max 100 per call, case-insensitive match).' This lets an agent distinguish it from sibling upsert_* tools and from list_uoms without opening any schema.

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?

Explicitly routes the agent away: '(upsert_items also auto-bootstraps the missing standard UoMs; use this tool for custom units like cases or pallets.)' It also names the precondition (operator/unpinned credential) and the safe trial path (validateOnly=true dry-runs every row).

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