Skip to main content
Glama

Save variant

save_variant

Create or update a variant. Pass an id to update it; omit id to create a new one. Returns the new variant id on create. To create/update many at once, send an items array — one all-or-nothing transaction with a single ledger recompute; each item with an id updates, each without creates.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idNoVariant id. Present → update that variant; omit → create a new one.
skuNoStock-keeping unit / product code.
costNoCost price per unit.
nameNoDisplay name / description of the variant.
imageNoVariant image URL; pass "$delete" to remove the existing image.
itemsNoVector of variant objects to create/update in one all-or-nothing batch. Preferred over repeated calls. Each item with an id updates; each without creates.
notesNoFree-text notes.
priceNoSelling price per unit, in the record's currency.
unitsNoUnit of measure label (e.g. "each", "hour", "kg").
barcodeNoBarcode value for this variant.
currencyNoISO 4217 currency code (e.g. "ZAR", "USD"). Defaults to the business currency.
productidNoParent product id this variant belongs to (see list_products).
descriptionNoVariant description.
salestaxidsNoSales tax ids to link to this variant.
costcurrencyNoISO 4217 currency code for the cost price.
salestaxexclusiveNoWhether the price excludes sales tax.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.4/5.0
Behavior4/5

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

The description discloses the all-or-nothing transaction behavior for the items array and the single ledger recompute, which are behavioral traits beyond the annotations. It also mentions the return of the new variant id on create. It doesn't fully describe what happens on update (e.g., response format), but given the readOnlyHint:false and destructiveHint:false annotations, the write nature is known and the description adds useful context.

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?

The description is a single, dense paragraph with no fluff. It leads with the primary action (create/update), then the id logic, then the batch behavior. Every sentence serves a purpose and is front-loaded with the most important information.

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 16-parameter tool with no output schema, the description covers the essential decision points: how to create vs update, batch behavior, and return on create. It does not mention what is returned on update (possibly nothing or the updated variant), which is a minor gap. However, given the complexity and that all parameters are documented in the schema, the description is sufficiently complete for an agent to call it correctly.

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% with each parameter described. The description adds critical semantic meaning for the id parameter (presence indicates update vs create) and the items array (batch all-or-nothing). It also highlights the image '$delete' mechanism indirectly via schema, but the description's explanation of id and items goes beyond the schema. This adds value without redundancy.

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?

The description clearly states the tool's purpose: create or update a variant, with explicit distinction between create (no id) and update (with id). It also covers the batch mode via items array. This clearly differentiates from sibling tools like save_product or save_client by its focus on variants and the upsert pattern.

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?

The description provides explicit guidance on when to use id vs omit id for create/update, and explains when to use the items array for batch operations. It doesn't explicitly mention alternatives (e.g., save_product for products), but the resource name and context make it clear. It could mention when not to use this tool, but the guidance is otherwise strong.

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