Skip to main content
Glama
trhonpavel
by trhonpavel

Set stock level

set_stock_level

Set an item's stocked quantity at a location or adjust it by +/- using inventory_item_id or SKU; if not stocked there, it is added.

Instructions

Sets the stocked quantity of an item at a location. Provide either an absolute 'stocked_quantity' or a relative 'adjust_by' (+/-). Identify the item by inventory_item_id or SKU. Without location_id the item's only location is used. If the item is not stocked at the given location yet, it is added there.

Input Schema

NameRequiredDescriptionDefault
skuNo
adjust_byNoE.g. +10 when restocking, -2 when writing off
location_idNo
stocked_quantityNo
inventory_item_idNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.4/5.0
Behavior4/5

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

Annotations declare the safety profile (readOnly=false, idempotent=false, destructive=false, openWorld=true), so the bar is lower. The description adds real side-effect context: omitting location_id falls back to the item's only location, and an unstocked item is auto-added at that location. It does not, however, spell out the non-idempotent nature of 'adjust_by'.

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?

Four short sentences, fully front-loaded with the core action first, followed by the quantity mode, the identification modes, and the location fallback. No filler or repetition.

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?

With no output schema, the description must cover behavior; it does describe the write and its auto-create side effect. Minor gaps remain on error/failure behavior and whether the two quantity parameters are mutually exclusive or mandatory.

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 only 20%, so the description carries most of the load: it explains the stocked_quantity/adjust_by mutual alternative and the sku/inventory_item_id identification choice, and clarifies location_id's defaulting behavior. It does not state whether exactly one of the two quantity modes must be supplied (required count is 0).

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 with scope: 'Sets the stocked quantity of an item at a location.' It is unmistakably distinct from the sibling read tool list_inventory and from the variant/price tools, so an agent can select it without opening the schema.

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?

Gives clear operational context: absolute 'stocked_quantity' vs relative 'adjust_by', and the id-or-SKU identification choice. It stops short of naming an alternative tool for reading stock levels (e.g. list_inventory) or stating any when-not-to-use condition.

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