Skip to main content
Glama

InvoiceVista Invoice Maker

Update a stock quantity

set_inventory_quantity
DestructiveIdempotent

Use this when someone asks to correct or update how much of an item a business has in stock, such as after a count or a delivery. Returns the item with its previous and new quantity; the number given replaces the stored one. Not for adding a new stock item.

Input Schema

NameRequiredDescriptionDefault
quantityYesThe quantity now in stock, in the item unit. It replaces the stored quantity rather than adding to it.
inventoryItemIdYesStock item id: 24 lowercase hexadecimal characters.
expectedLastEditTimeYesThe item's lastEditTime as last read; an item changed since then is refused.

Output Schema

NameRequiredDescriptionDefault
itemYes
statusYes
previousQuantityYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A3.9/5.0
Behavior3/5

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

Annotations already declare idempotentHint=true, destructiveHint=true and readOnlyHint=false, so the safety profile is covered. The description adds return contents (previous and new quantity) and that the value replaces rather than adds, but it omits the optimistic-concurrency refusal and the destructive nature of overwriting a prior count, both of which live only in the schema.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Three short sentences with zero filler, front-loaded with the usage trigger before the behavioral detail. Tight and readable, though the return-value sentence could be trimmed since an output schema exists.

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?

Complete for a three-parameter mutation: purpose, exclusion, replace semantics and return shape are all stated, and an output schema covers return values. A note about the concurrency check failing or about permission requirements would close the remaining gap for a destructive write.

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 description coverage is 100%, so all three parameters, including the expectedLastEditTime guard and id format, are documented in the schema. The description reinforces replace-not-add semantics for quantity but adds nothing beyond the schema text, making the baseline 3 appropriate.

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 a specific verb and resource ('correct or update how much of an item a business has in stock') plus the triggering situations (after a count or a delivery). It also explicitly excludes the adjacent create operation, so an agent can separate it from list_inventory_items and from item creation.

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?

Gives clear when-to-use context ('when someone asks to correct or update... after a count or a delivery') and a when-not condition ('Not for adding a new stock item'). It does not name a concrete alternative tool, since the create counterpart is not in the sibling list, but the exclusion still routes the agent away from a wrong write.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources