Skip to main content
Glama
A1-x-Tech

mcp-shopify-admin

Задать остатки

set_inventory
Idempotent

Set absolute available stock levels for product variants at specific locations. Provide inventoryItemId, locationId, and quantity; reason defaults to correction.

Instructions

Устанавливает АБСОЛЮТНЫЙ доступный остаток (available) позиций на локациях — «стало N», не «изменить на N»: повторный вызов с теми же числами ничего не меняет. Каждый элемент quantities несёт inventoryItemId (id inventoryItem варианта — он в ответе get_product, это НЕ id варианта), locationId (из list_locations) и quantity >= 0. reason — из закрытого словаря Shopify, по умолчанию correction. Историю движений не пишет и резервы не трогает. Провал приходит как ошибка с userErrors — например, если позиция не отслеживается (inventory tracking выключен) или не привязана к локации.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
reasonNoПричина изменения из словаря Shopify (correction, received, damaged, restock, …). По умолчанию correction.
quantitiesYesПозиции и их новые абсолютные остатки.
Behavior5/5

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

Beyond the annotations (idempotentHint, readOnlyHint=false), the description discloses that repeated calls with the same numbers are no-ops, that reservations are untouched, that movement history is not written, and that failures surface as userErrors. This is exactly the kind of behavioral context that helps an agent predict side effects. No contradiction with annotations.

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?

Three dense, purposeful sentences. The most important semantic distinction (absolute set, not delta) is first, followed by parameter provenance, then behavioral side effects and failure mode. There is zero redundancy or filler.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a two-parameter mutation with no output schema, the description covers the operation's core semantics, required parameter sources, default values, side effects, and error behavior. The failure examples (untracked items, unlinked locations) are particularly useful for an agent to diagnose errors. Nothing essential is missing.

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?

Although the schema already documents all parameters (100% coverage), the description adds critical semantic clarification: inventoryItemId is the inventoryItem variant id from get_product and explicitly NOT the variant id, locationId comes from list_locations, and reason defaults to correction. This prevents a highly likely misuse of the wrong ID.

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: 'Устанавливает АБСОЛЮТНЫЙ доступный остаток позиций на локациях' and explicitly contrasts with incremental changes ('не «изменить на N»'), making it unambiguous and distinct from sibling mutation tools like update_variant. The key nuance of absolute vs delta is front and center.

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?

The description gives clear operational context: it tells the agent how to source inventoryItemId from get_product and locationId from list_locations, and states the default reason. It also provides implicit exclusions ('Историю движений не пишет и резервы не трогает'), but it does not explicitly name an alternative tool for cases like incremental adjustments or history-writing operations.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/A1-x-Tech/mcp-shopify-admin'

If you have feedback or need assistance with the MCP directory API, please join our Discord server