Skip to main content
Glama

⚠️ Stock: update

stock_update_stocks
Destructive

Update the stock quantity of listings to control availability. Set quantity to zero to mark listings 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
stocksYesArray of stock entries per listing; from 1 to 200 elements per request.
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).
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 — this is safe by design.
Behavior4/5

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

Annotations already flag destructiveHint=true. Description adds context that quantity=0 marks listings as 'out of stock', which is useful beyond the schema. 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?

Concise two-sentence description with key information front-loaded, no redundant details, and a clear alternative suggestion.

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?

Given the tool's complexity and presence of dryRun and idempotencyKey parameters described in schema, the description sufficiently covers effect, input structure, return format, and usage context.

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

Parameters3/5

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

Schema coverage is 100% with descriptions for all parameters. The description reiterates the structure and range but adds minimal new meaning beyond what schema already provides.

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 clearly states 'Updates the stock (quantity) of items' with a specific verb and resource, and explicitly distinguishes from the sibling tool 'stock_get_stocks_info'.

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?

Provides explicit guidance with 'For current stock, use stock_get_stocks_info.', indicating when to use this tool vs. an alternative, and implies usage for updating stock quantities.

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