Skip to main content
Glama

⚠️ Stock: update

stock_update_stocks
Destructive

Update stock quantities for multiple listings at once. Set quantity to 0 to mark an item as out of stock.

Instructions

⚠️ Updates the stock (quantity) of items across listings in the warehouse (update_stocks). Affects whether listings are available to order: quantity=0 marks a listing as "out of stock". Accepts an array of {item_id, quantity, external_id?}; quantity is an integer 0..999999. Returns success and errors for each listing. For current stock, use stock_get_stocks_info.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
dryRunNov0.7.0: if true — returns a preview of the HTTP request without calling the Avito API. Safe for inspecting exactly what would be done. Default: the value of AVITO_MCP_DRY_RUN_DEFAULT (usually false).
stocksYesArray of stock entries per listing; from 1 to 200 elements per request.
idempotencyKeyNov0.7.0: optional key for duplicate protection. A repeat call with the same key within AVITO_MCP_IDEMPOTENCY_TTL_SEC returns the cached result. The same key with different args returns a conflict error. Keys are stored as bounded SHA-256 fingerprints.
Behavior4/5

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

Annotations declare destructiveHint=true and readOnlyHint=false, already indicating mutation. The description adds context about the effect on availability ('quantity=0 marks a listing as out of stock') and the return format ('Returns success and errors for each listing'). This provides useful behavioral insight beyond the 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?

The description is four sentences with no redundant information. It starts with the core action, then explains the effect, then the input format, and finally directs to the sibling 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?

Given the moderate complexity (3 parameters, one nested array) and absence of an output schema, the description covers the key aspects: purpose, effect, input format, and hints at return shape. It relies on the schema for parameter details but adds high-level context. Annotations are present and consistent.

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 description does not need to add much. However, it summarizes the main parameter ('array of {item_id, quantity, external_id?}') and explains the significance of quantity (0 means out of stock, range 0..999999). This adds clarity beyond the schema's technical descriptions.

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 uses a specific verb ('Updates') and resource ('stock (quantity) of items across listings') and explicitly distinguishes from the sibling tool 'stock_get_stocks_info' by directing users to it for current stock. The purpose is clear and unambiguous.

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?

The description provides explicit guidance on when to use the tool (updating stock), what the effect is (quantity=0 marks out of stock), and which sibling to use instead for reading stock (stock_get_stocks_info). It also mentions input structure and constraints (array of objects, max 200 items).

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/elchin92/avito-mcp'

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