Skip to main content
Glama
camerone05

shopify-admin-mcp-server

by camerone05

Set Shopify Inventory (absolute)

shopify_set_inventory
Idempotent

Sets stock to an exact quantity at one or more Shopify locations for stocktakes or syncing from a source-of-truth system. Uses compare-and-set to reject writes if inventory changed concurrently.

Instructions

Set stock to an EXACT number at one or more locations — e.g. quantity: 42 means "there are now 42".

Use this for stocktakes and when syncing from a system that is the source of truth. For relative changes ("we sold 3"), use shopify_adjust_inventory instead.

Concurrency: by default this uses compare-and-set — pass compareQuantity (the quantity you believe is currently there) and Shopify rejects the write if someone changed it underneath you. Set ignoreCompareQuantity: true to force the write regardless, which risks clobbering a concurrent update.

The variant must already be stocked at the location — activate it first with shopify_set_variant_locations.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
skuNoExact variant SKU
nameNoWhich quantity to setavailable
reasonNocorrection
quantitiesYes
inventoryItemIdNoInventoryItem GID — alternative to sku
referenceDocumentUriNoTraceability URI e.g. 'logistics://warehouse/stocktake/2026-01-14'
ignoreCompareQuantityNoSkip the compare-and-set safety check

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv4.0.1

TDQS

A4.8/5.0
Behavior5/5

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

Annotations only cover the safety profile (idempotent, non-destructive, open-world). The description goes well beyond them by explaining the compare-and-set concurrency model, the role of compareQuantity, and the data-loss risk of ignoreCompareQuantity: true clobbering a concurrent update, plus an activation prerequisite.

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-loads the core semantics and the alternative tool in the first two sentences, then the concurrency caveat, then the prerequisite. Slightly long with a few adjacent restatements of compareQuantity, but every section carries operational information.

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?

With no output schema needed and 7 parameters, the description covers the mutation semantics, the safety/override switch, the sibling routing, and the activation prerequisite — everything required to invoke it correctly, including the risky path.

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 71% and the description compensates by explaining what compareQuantity means (the quantity you believe is currently there), what ignoreCompareQuantity does, and that quantity is the exact target. It does not clarify the name enum (available vs on_hand) or reason values, which the schema carries.

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 (set stock to an exact number) with a concrete example showing that quantity: 42 means 'there are now 42', and explicitly contrasts the absolute semantics with the relative sibling shopify_adjust_inventory.

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?

Gives explicit when-to-use ('stocktakes', 'syncing from a source of truth') and when-not ('we sold 3' → use shopify_adjust_inventory), and adds a prerequisite: the variant must already be stocked at the location, activated via shopify_set_variant_locations.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.