Skip to main content
Glama
Shopify MCP Server

Shopify MCP Server

by kisasa

update-inventory-item

Set an inventory item's unit cost or inventory tracking status by inventory item ID, then read the cost back with get-inventory-items.

Instructions

Set an inventory item's unit cost and/or whether its inventory is tracked. Provide at least one of cost or tracked. Read the cost back with get-inventory-items.

Input Schema

NameRequiredDescriptionDefault
costNoUnit cost in the shop's currency, as a number or decimal string (e.g. 12.5 or "12.50"). Must be >= 0.
trackedNoWhether Shopify tracks inventory for this item
inventoryItemIdYesThe inventory item ID (e.g. gid://shopify/InventoryItem/123 or just 123). This is not the variant ID; get it from get-inventory-items or get-product-variants-detailed.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv1.2.0

TDQS

A3.9/5.0
Behavior3/5

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

With no annotations, the description carries the full behavioral burden. It does disclose useful traits: this is a mutation, it is a partial update ("and/or" plus the at-least-one rule), and verification requires a separate get-inventory-items call — implying the write does not return the resulting cost. It says nothing about required permissions, whether unspecified fields are left untouched, or failure behavior.

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 short sentences, front-loaded with the action and fields, followed by the call constraint and the verification path. No filler or restatement of the name.

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 3-parameter mutation with no annotations and no output schema, the description covers what changes, the validity constraint, and how to confirm the result. It stops short of describing the response or permission requirements, which an agent would still have to discover by calling.

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 field-level meaning is already documented and the baseline is 3. The description adds a genuine cross-parameter constraint the schema cannot express: at least one of cost or tracked must be supplied even though inventoryItemId is the only required property.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

"Set an inventory item's unit cost and/or whether its inventory is tracked" names a concrete verb (Set) and the exact two writable fields, so the agent knows precisely what changes. It does not explicitly contrast itself with the sibling inventory-set-quantities, which is the tool an agent could most plausibly confuse it with.

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?

"Provide at least one of cost or tracked" states the precondition for a valid call, and "Read the cost back with get-inventory-items" routes the agent to the correct follow-up sibling. It gives no when-not guidance and does not clarify the boundary against inventory-set-quantities or update-product.

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