Skip to main content
Glama
kisasa

Shopify MCP Server

by kisasa

inventory-set-quantities

Set absolute inventory quantities for items at specific locations, with optional expected-quantity checks and idempotent retries. Use it for inventory corrections and cycle counts.

Instructions

Set absolute inventory quantities for items at specific locations. Use for inventory corrections, cycle counts, etc. Pass changeFromQuantity per item to only apply the change if the current quantity still matches. Returns the idempotencyKey used, so a failed call can be retried with the same key, plus userErrors.

Input Schema

NameRequiredDescriptionDefault
nameYesWhich quantity to set: 'available' or 'on_hand'
reasonYesReason for the quantity change
quantitiesYesQuantities to set for each inventory item at each location
idempotencyKeyNoIdempotency key for this request. Omit it and a new UUID is generated for each call. Reuse a key only to retry the exact same request; a different request with the same key is rejected.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.1.0

TDQS

A4.2/5.0
Behavior4/5

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

With no annotations provided, the description does useful work: it explains that quantities are absolute, describes the conditional changeFromQuantity behavior and resulting CHANGE_FROM_QUANTITY_STALE error, and explains idempotency retry semantics. It still omits permission requirements and whether the whole batch is atomic.

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?

Three sentences, front-loaded with the core operation. Each sentence adds useful information about use cases, conditional safety, and return/retry behavior without waste.

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?

The description covers the mutation's key behavior and compensates for the lack of an output schema by mentioning idempotencyKey and userErrors. It is still missing some operational context, such as permissions and batch atomicity, which matters for a mutation tool with no annotations.

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 schema already fully documents parameters such as changeFromQuantity and idempotencyKey. The description reinforces the conditional check and retry behavior, but adds little parameter meaning beyond 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?

The description states a specific verb and resource: 'Set absolute inventory quantities for items at specific locations.' This is precise enough to distinguish it from sibling read tools such as get-inventory-levels and get-inventory-items.

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?

It gives clear usage context with 'Use for inventory corrections, cycle counts, etc.' However, it does not name when not to use it or explicitly compare it with alternatives, and 'etc.' leaves the scope somewhat open.

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