Skip to main content
Glama

update_commerce_inventory

Destructive

Set or adjust stock for one variant.

Use quantity for an absolute level, or delta to add/subtract (negative allowed). Stock never goes below zero. Products without variations use variant_id "default".

Args: project_id: The project ID. product_id: The product ID. variant_id: The variant ID. Use "default" for products with no variations. quantity: Absolute stock level. Takes precedence over delta. Leave -1 to use delta. delta: Relative change, e.g. -3 to remove three units. Must be non-zero when quantity is -1.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
deltaNo
quantityNo
product_idYes
project_idYes
variant_idNodefault

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.2/5.0
Behavior4/5

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

Annotations already declare destructiveHint=true and readOnlyHint=false, so the safety profile is covered. The description adds genuine behavioral context beyond that: 'Stock never goes below zero' (a clamping guarantee) and the precedence rule that quantity overrides delta. It stops short of noting permission requirements or reversibility.

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?

Front-loaded with the core action, followed by usage rules, then a compact Args list. Every line earns its place given the schema provides no parameter documentation of its own.

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?

An output schema exists, so return values need no explanation, and the mutation behavior is adequately conveyed. For a destructive, 5-parameter write tool the coverage is strong, though auth/permission expectations remain unstated.

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?

With 0% schema description coverage, the description carries the full burden and mostly delivers: it documents quantity precedence, the -1 sentinel meaning 'use delta', negative delta semantics, and the 'default' variant_id convention. project_id and product_id are documented only tautologically, which is the one gap.

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 opens with a specific verb+resource: 'Set or adjust stock for one variant.' The stock-level focus and 'one variant' scope clearly distinguish it from siblings like update_commerce_variant, update_commerce_product, and update_commerce_price.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description explains how to use the parameters (quantity vs delta) but never states when this tool should be chosen over alternatives such as update_commerce_variant, nor any prerequisites. Usage is only implied by the stock-management framing.

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