Skip to main content
Glama

Set inventory levels

loyverse_set_inventory
Destructive

Set absolute inventory counts for product variants at a store, replacing current stock with the specified quantity.

Instructions

Set stock to an absolute figure for one or more variants at a store. stock_after is the resulting stock level, not a delta: sending 5 leaves 5 in stock regardless of what was there before. Read the current level with loyverse_get_inventory first if you mean to add or remove a quantity.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
inventory_levelsYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.1

TDQS

A4.6/5.0
Behavior4/5

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

Annotations already mark this as destructive/read-write; the description adds concrete consequence semantics with 'sending 5 leaves 5 in stock regardless of what was there before.' It stops short of mentioning permissions or rollback, but the core overwrite behavior is clearly disclosed.

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?

Two sentences with no filler; the absolute-value semantics are stated first, then the cross-reference to the read tool. Every sentence earns its place.

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 simple one-top-level-parameter write with no output schema, the description covers action, scope, parameter semantics, and the safe workflow for delta adjustments. Multi-variant behavior is implied but not explicitly atomic; that is a minor gap.

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 compensates by explaining the crucial stock_after parameter as an absolute target rather than a delta, and clarifies the payload can cover one or more variants/stores. variant_id and store_id are left to their self-explanatory names, but the main semantic trap is resolved.

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 the action precisely: 'Set stock to an absolute figure for one or more variants at a store.' The 'not a delta' clarification makes it easy to distinguish from any inventory-adjustment or read tool.

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 direction to call loyverse_get_inventory first when the intent is to add or remove a quantity, which is a clear when-to-use rule versus the sibling read tool.

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