Skip to main content
Glama

Mango Inventory

Set restock threshold

set_min_stock
DestructiveIdempotent

Set or clear the restock threshold (minimum stock) for a quantity-tracked item at ONE location: "alert us when Room 201 drops below 5". Thresholds are per item PER LOCATION, so locationId is required alongside itemId: every row of check_item_availability's distribution carries the locationId of a level that stocks the item, and search_resources (type: "location") returns the id of a location that does not stock it yet. minStock is a number, or null to clear the threshold. "Low" is measured against AVAILABLE stock, the shelf count MINUS what active orders reserved: 14 on hand with 10 reserved against a threshold of 5 IS low (4 available); check_item_availability reports that verdict per level as isLow. While the location is low a restock task is open for the order handlers; raising, lowering or clearing the threshold re-evaluates it immediately. Person-held stock cannot carry a threshold. Requires the manager role. Idempotent: the same value again changes nothing.

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": {
      "itemId": "<itemId>",
      "locationId": "<locationId>",
      "minStock": "<minStock>"
    },
    "name": "set_min_stock"
  }
}

Input Schema

NameRequiredDescriptionDefault
itemIdYesItem id (must be a quantity-tracked item)
minStockYesThe threshold, or null to clear it
locationIdYesLocation resource id, from check_item_availability's distribution or search_resources

Output Schema

NameRequiredDescriptionDefault
nameNoItem name
itemIdNoItem id
minStockNoThe threshold now in force (absent = cleared)
quantityNoStock on hand at that location
locationIdNoLocation resource id
locationNameNoLocation name

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedInput schema / properties / locationId / description
      Previous value: -"Location resource id — read it off check_item_availability's distribution, or find it with search_resources"New value: +"Location resource id, from check_item_availability's distribution or search_resources"
  2. First observed

TDQS

A4.6/5.0
Behavior4/5

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

Annotations already declare destructiveHint=true, idempotentHint=true and readOnlyHint=false, and the description adds real context beyond them: the manager-role requirement, the side effect that a restock task is opened for order handlers while the location is low, and that raising/lowering/clearing re-evaluates that task immediately. It also clarifies that 'low' is measured against available stock (on hand minus active reservations) rather than the raw shelf count, which is non-obvious behavior. The only redundancy is restating idempotency, which the annotations already carry.

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 scope, then the locationId sourcing, then the semantics of 'low', then side effects and permissions. Dense but every sentence carries information; the only wasted clause is the idempotency restatement already covered by annotations.

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?

An output schema exists, so return values need not be described. For a 3-parameter mutation with permission requirements and side effects, the description covers scope, parameter sourcing, threshold semantics, side effects, and constraints, leaving nothing an agent needs in order to call it correctly.

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 coverage is 100%, so the baseline is 3, but the description adds genuine meaning: minStock is a number or null to clear, and the threshold is per item PER location, which explains why locationId is mandatory rather than optional. It also defines what the threshold is compared against (available stock), which the schema does not convey.

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 ('Set or clear the restock threshold (minimum stock)') plus the exact scope ('for a quantity-tracked item at ONE location'), with a concrete example. It is clearly distinguishable from siblings like adjust_stock or set_item_status because it changes a threshold, not a quantity or status.

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?

Explicitly says where locationId comes from (check_item_availability's distribution rows, or search_resources with type 'location' for a location that does not yet stock the item), and states the exclusion that person-held stock cannot carry a threshold. It also names the prerequisite (manager role), so an agent knows when it can and cannot call it.

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