Skip to main content
Glama

Variants Update Stock

tiendanube_variants_update_stock

Set exact stock or adjust by delta for product variants; omit variant ID to update all variants at once.

Instructions

Set or adjust stock. action 'replace' sets an exact value (value null = infinite stock); 'variation' adds/subtracts a delta. Omit id to apply to all variants of the product. HTTP: POST /products/{product_id}/variants/stock Required scope: write_products API version: 2025-03

Input Schema

NameRequiredDescriptionDefault
idNoVariant ID; omit to apply to every variant
valueYesInteger quantity (or delta for 'variation'); null with 'replace' = infinite stock
actionYesStock operation (replace | variation)
product_idYesProduct ID
location_idNoLocation ID for multi-location stores
additional_fieldsNoExtra raw API body fields not covered above; merged into the request body

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A4.2/5.0
Behavior4/5

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

Annotations already state that this is a mutating, non-read-only operation with destructiveHint false. The description adds meaningful context beyond annotations: required write_products scope, the HTTP endpoint, API version, and important mutation semantics such as null value meaning infinite stock. It does not describe response shape or error behavior, but with annotations present the added context is substantial.

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?

The description is short and front-loaded with the core purpose: 'Set or adjust stock.' The second sentence explains both action modes and the all-variants case, and the final lines give endpoint, scope, and API version without filler. Every sentence contributes operational value.

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 six-parameter mutation tool with full schema coverage and annotations, the description provides the key operational context: scope, endpoint, action semantics, and id omission behavior. It does not describe return values, but no output schema exists and the main invocation semantics are covered. Sibling routing is the only notable 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?

Schema description coverage is 100%, so the baseline is 3. The description adds useful meaning beyond the schema by explaining that 'replace' sets an exact value while 'variation' applies a delta, and by reiterating that omitting id applies to all variants. It does not explain location_id or additional_fields, but those are already documented in the schema.

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 states a specific verb and resource: 'Set or adjust stock' for product variants. It also clarifies that the operation is stock-specific and can target one variant or all variants of a product, which distinguishes it from general variant updates. An agent can identify this as the dedicated stock-adjustment tool 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 Guidelines3/5

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

The description explains the action modes: 'replace' sets an exact value and 'variation' adds/subtracts a delta, plus omitting id applies to all variants. However, it does not explicitly say when to use this tool versus siblings such as tiendanube_variants_update, tiendanube_variants_batch_update, or tiendanube_products_batch_stock_price. Usage is implied by the stock-specific framing rather than fully guided.

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

Deploy Server

Other Tools