Skip to main content
Glama

ERP: Stock adjust

erp_stock_adjust
Destructive

Add to or write off the stock of ONE catalog item: 'delta' is the change in the item's base unit (positive = arrived / found, negative = written off / damaged / used). 'item' is the item's number (SKU) or its name as in the catalog (or its id); when it matches several items the call is refused with the candidates — ask the person which one, never guess. 'warehouse' only when the company has several. 'reason' goes to the stock history. Proposed write: the person confirms a line naming the item, the warehouse and before → after. For goods from a supplier's invoice use purchase_invoice_receive 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": {
      "item": "<item>",
      "delta": "<delta>"
    },
    "name": "erp_stock_adjust"
  }
}

Input Schema

NameRequiredDescriptionDefault
itemYes
deltaYes+ added, − taken away (base unit).
reasonNo
warehouseNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.9/5.0
Behavior5/5

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

Annotations say destructiveHint=true and readOnlyHint=false, but the description supplies the far more important behavior: this is a proposal, not a write — it returns status='confirmation_required' with an action_id and plan_token, and the write occurs only after confirm_action. It also discloses the refusal-with-candidates behavior on ambiguous item matches and the before → after confirmation the person sees.

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?

Front-loaded with the core action and sign convention, followed by per-parameter notes, the sibling exclusion, and finally the confirmation contract in a labeled CONFIRMATION block. It is dense and slightly long, but every sentence maps to a decision the agent must make, so little is wasted.

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?

Despite no output schema, the description explains exactly what comes back (status, action_id, plan_token, refusal candidates) and the follow-up path via confirm_action. For a destructive mutation tool with no annotations covering the proposal flow, that is complete enough to invoke and handle responses correctly.

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?

Schema coverage is only 25%, so the description must carry the load and it does: 'item' accepts SKU, name, or id plus the multi-match refusal rule; 'delta' is signed in the base unit; 'warehouse' is conditional on multi-warehouse companies; 'reason' feeds stock history. All four parameters gain meaning beyond the bare schema types.

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 opens with a specific verb+resource+scope: add to or write off the stock of ONE catalog item, and immediately defines the sign convention of 'delta' (positive = arrived, negative = written off). It also explicitly distinguishes itself from purchase_invoice_receive, so an agent can route without opening either 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?

Gives explicit when-to-use guidance ('for goods from a supplier's invoice use purchase_invoice_receive instead'), conditional-parameter guidance ('warehouse only when the company has several'), and a decision rule for ambiguous item matches (refuse, ask the person, never guess). That is when, when-not, and alternatives in one place.

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