Skip to main content
Glama

Upsert Item Vendor Terms

upsert_item_vendor_terms
DestructiveIdempotent

Create or update the vendor terms for an (item, vendor) pair. If a live link already exists it is updated; otherwise it is created. minimumOrderQuantity is the vendor's minimum order quantity for the item (item base UOM): pass a value greater than zero to set it, or omit/null to record no minimum. Terms are surfaced, never enforced. The item and vendor must both belong to the tenant and the partner must actually be a vendor. Requires an operator (unpinned) org token.

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": {
      "itemId": "<itemId>",
      "supplierId": "<supplierId>"
    },
    "name": "upsert_item_vendor_terms"
  }
}

Input Schema

NameRequiredDescriptionDefault
itemIdYesThe item id (GUID) the terms apply to.
previewNoStep 1 of the required two-step write: set true to validate and receive a structured preview plus a single-use previewReceipt. Nothing is changed until the commit call.
supplierIdYesThe vendor id (GUID) these terms are for.
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.
minimumOrderQuantityNoThe vendor's minimum order quantity for this item (greater than zero). Omit or null to record no minimum.

Output Schema

NameRequiredDescriptionDefault
okNo
termsNo
createdNo
previewNo
expiresAtNo
actionItemIdNo
confirmationNo
correlationIdNo
approvalResultNo
idempotencyKeyNo
previewReceiptNo
idempotentReplayNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.2/5.0
Behavior4/5

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

Annotations declare destructiveHint=true and idempotentHint=true; the description adds genuinely useful context beyond them — that terms are 'surfaced, never enforced' (i.e., a bad value won't block ordering), the tenant/partner validation rules, and the token requirement. The one notable omission is the mandatory two-step preview-then-commit protocol, which is a major behavioral trait left entirely to the schema.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Four tight sentences, front-loaded with the action and upsert branch, then the field semantics, then prerequisites. No filler and nothing repeated for its own sake.

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?

With an output schema present and full parameter coverage, the description covers purpose, semantics, and authorization. The remaining gap is that it presents this as a single call while the tool actually requires a preview call followed by a receipt-bearing commit, which is material for a destructive write.

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?

Schema description coverage is 100%, so the baseline is 3. The description's minimumOrderQuantity sentence largely restates the schema, adding only the 'item base UOM' framing; it says nothing about preview, previewReceipt, or idempotencyKey semantics, so it does not meaningfully exceed what the schema already provides.

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 ('Create or update the vendor terms') with an explicit scope: an (item, vendor) pair. The upsert branch is spelled out ('If a live link already exists it is updated; otherwise it is created'), which cleanly separates it from the read-only sibling list_item_vendor_terms.

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 clear preconditions for calling it (both entities in the tenant, partner must actually be a vendor, operator/unpinned org token required) and explains the create-vs-update branching. It never names an alternative tool for reading terms, and it omits any hint that the write must go through a preview/commit flow, so the guidance stops short of explicit when/when-not routing.

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