Skip to main content
Glama

shopify_inventory_adjust_quantities

Adjust Shopify stock by a relative delta and pass the expected current quantity so racing updates cannot both succeed.

Instructions

Move stock by a relative amount: delta of 5 adds five, -5 removes five. This is not a way to set an absolute count. Every change must also carry change_from_quantity, the count you expect to be overwriting — read it with variant_inventory_level immediately before — so two adjustments racing each other cannot both win. committed is never writable, and on_hand cannot be named here although adjusting available moves it by the same delta. The result reports the deltas applied and leaves quantity_after_change null, so read the level back for the new count. Since 2026-04 adjusting an item that is not stocked at the location succeeds and creates an inactive level, so a success does not prove the stock is sellable.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
variablesYesThe adjustment to apply.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.6/5.0
Behavior4/5

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

Annotations only declare readOnlyHint=false and openWorldHint=true, so the description carries most of the load and does it well: `committed` is never writable, `on_hand` cannot be named, the result reports deltas with a null `quantity_after_change` so a read-back is required, and the 2026-04 inactive-level behavior is disclosed. The one gap is it never states permission/auth requirements for a write operation.

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 delta semantics, then layers constraints and edge cases; every sentence earns its place with no filler. It is dense and long for a single-parameter wrapper, which keeps it just short of a 5.

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?

For a mutation tool with no output schema, the description covers the write behavior, the concurrency requirement, the return shape (deltas reported, count null), and the surprising success semantics. Nothing an agent needs to call it safely is missing.

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%, so the baseline is 3, but the description adds meaning beyond the schema: it clarifies delta sign semantics with an example, explains why `change_from_quantity` exists (concurrency guard), and documents which states can and cannot be named (`committed` never writable, `on_hand` excluded). This genuinely extends the schema rather than restating it.

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+resource (adjust inventory quantities) and immediately scopes it as a relative delta operation ('Move stock by a relative amount'), explicitly distinguishing it from an absolute set ('This is not a way to set an absolute count'). An agent can tell it apart from the read sibling `shopify_variant_inventory_level` without opening a 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?

Gives explicit when-to-use conditions and prerequisites: every change must carry `change_from_quantity`, and it must be read with `variant_inventory_level` immediately before to avoid racing adjustments. It also names a surprising edge case (non-stocked item now succeeds and creates an inactive level) so the agent knows success does not imply sellability.

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