Skip to main content
Glama
trhonpavel
by trhonpavel

Set stock level

set_stock_level

Set or adjust an inventory item's stock level at a location by providing an absolute quantity or a +/- adjustment, identified by SKU or inventory_item_id.

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.

Input Schema

TableJSON 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.5/5.0
Behavior4/5

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

Annotations already declare the write/idempotency/destructiveness profile, so the description's added value is the mutually exclusive quantity modes and the default behavior when location_id is omitted ("the item's only location is used"). It does not disclose permission requirements or what happens if both quantity fields are supplied. Notably it implicitly clarifies why idempotentHint=false: adjust_by is relative.

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, front-loaded with the core action, then input modes, identification, and the location default. No filler.

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 5-param mutation tool with no output schema and partial schema coverage, the description covers the operation, the input alternatives, and location resolution. It stops short of error behavior (e.g., both quantity params provided) and permission prerequisites.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is only 20% (just adjust_by), so the description must compensate, and it does: it defines stocked_quantity as absolute, adjust_by as relative with +/- semantics, names the two identifier options, and explains location_id's default resolution.

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 (sets the stocked quantity of an item at a location) and is clearly distinguishable from inventory read tools like list_inventory and product-mutation tools like update_product.

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?

Explains how to supply the quantity (absolute stocked_quantity vs relative adjust_by) and how to identify the item (inventory_item_id or SKU), plus the location fallback. No guidance on when-not-to-use or how this relates to sibling tools, but the invocation context is clear.

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