Skip to main content
Glama

ERP: Change the stock of several items

erp_stock_batch
Destructive

Change the stock of SEVERAL catalog items in ONE proposal (one confirmation card for all lines). mode='recount': each 'quantity' is what was counted («актуальний залишок B1 — 50, C — 120»); mode='receive': each 'quantity' arrived without a document («прийшло 100 шт B1»; the stock history says «Надходження»); mode='adjust': each 'quantity' is a ± change (write-offs negative). Use it also for ONE line when the person reports a count or an arrival. 'item' as the person said it (name words, number/SKU or barcode) — the server finds the item; any line that matches several items or none refuses the proposal and names the candidates of every such line: ask the person once (offer the candidates as choices), then call again with ALL lines using the item numbers. 'warehouse' only when the company has several (the refusal lists them). Proposed write: the card shows item: before → after for each line. A supplier's invoice or receipt as a photo/PDF goes through the bot's intake instead. CONFIRMATION: this tool is PROPOSED, never performed directly. You get status='confirmation_required' with an action_id and a plan_token, and the write happens only after confirm_action.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "mode": "<mode>",
      "lines": "<lines>"
    },
    "name": "erp_stock_batch"
  }
}

Input Schema

NameRequiredDescriptionDefault
modeYes
linesYes
reasonNo
warehouseNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.8/5.0
Behavior5/5

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

Annotations only declare the write/destructive profile; the description adds the crucial behavioral fact that nothing is written directly — the call returns status='confirmation_required' with action_id and plan_token and only confirm_action performs the write. It also discloses the all-or-nothing refusal on ambiguous or unmatched lines and what the confirmation card previews (item: before → after).

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?

A single dense paragraph that front-loads purpose, then modes, then ambiguity handling, then the confirmation contract — a logical order with no filler sentences. It is long and uses parenthesised Ukrainian/Russian examples that add length, but each phrase carries operational meaning.

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 destructive batch mutation with no output schema, the definition supplies what an agent actually needs: mode semantics, item resolution and retry protocol, warehouse condition, refusal behavior, and the two-step confirmation contract. Only the optional 'reason' param is left unexplained, which is minor.

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?

With 0% schema description coverage the description carries the burden and does most of it: it redefines 'quantity' per mode (absolute count, received amount, signed delta), explains that 'item' accepts free-text name words, number/SKU or barcode and is resolved server-side, and states the condition for 'warehouse'. The 'reason' parameter is never mentioned, leaving one of four params undocumented.

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 with explicit batch scope: change stock of SEVERAL catalog items in ONE proposal, and clarifies it also handles a single line. That scope statement ('one confirmation card for all lines') lets an agent tell it apart from single-line stock tools without opening a schema.

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?

Every mode is defined with a concrete example (recount = counted balance, receive = arrived without a document, adjust = signed delta with write-offs negative), plus when 'warehouse' is needed, when to route a supplier invoice to bot intake instead, and the exact recovery procedure when item matching is ambiguous. When-to-use, when-not-to-use and the fallback path are all explicit.

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