Skip to main content
Glama

Reserve Stock

reserve_stock

Hold stock so it cannot be sold or picked, or release a manual hold — the Inventory page's Reserve and Unreserve actions. Each line names the item, reserve or release, the quantity, and the location (optional when the item is in one location). Reserving needs that many available units; releasing needs that many reserved units. Sales orders reserve their own stock — use this for manual holds (quality hold, set-aside for a customer). Two-step: preview=true, then commit with the previewReceipt. Max 100 lines per call.

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": {
      "lines": "<lines>"
    },
    "name": "reserve_stock"
  }
}

Input Schema

NameRequiredDescriptionDefault
linesYesReservation lines (max 100). All lines commit together or not at all.
previewNoStep 1 of the required two-step write: set true to validate and receive a structured preview plus a single-use previewReceipt. Nothing is written until the commit call.
clientIdNoOptional client id (GUID) for operator (unpinned) credentials on 3PL tenants. Client-pinned credentials omit this.
warehouseIdNoInternal warehouse id (GUID). May be omitted when the tenant has exactly one Internal warehouse.
idempotencyKeyNoCaller-generated idempotency key; required with previewReceipt to commit.
previewReceiptNoStep 2: the receipt returned by the preview call. Supply with a fresh idempotencyKey to commit.

Output Schema

NameRequiredDescriptionDefault
okNo
linesNo
appliedNo
previewNo
warningsNo
expiresAtNo
actionItemIdNo
confirmationNo
correlationIdNo
approvalResultNo
idempotencyKeyNo
previewReceiptNo
idempotentReplayNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.5/5.0
Behavior4/5

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

Annotations only declare it is a non-read-only, non-destructive, non-idempotent write; the description adds substantive behavior: the mandatory two-step preview/commit flow, the resource prerequisites (available units to reserve, reserved units to release), and the 100-line cap. It does not discuss partial failure handling or permissions, but those gaps are minor against a low annotation bar.

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 the not-for-sales-orders exclusion, then workflow, then limits. Dense but every sentence carries information; a small amount is redundant with the schema (the optional-location rule and the 100-line cap appear in both).

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?

An output schema exists, so return values need not be explained, and the description covers the workflow, prerequisites, scope, and limits well. It stops short of describing permission or tenant requirements (e.g. the clientId 3PL nuance), which the schema carries alone.

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 already 100%, so baseline is 3. The description adds cross-field meaning beyond the schema by stating that location is only required when the item is not in exactly one location and that quantity is validated against available vs. reserved balances, which clarifies how the line fields interact.

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+resource pair ('Hold stock... or release a manual hold') and ties it to the concrete UI actions (Inventory page's Reserve/Unreserve). It also distinguishes itself from sales-order-driven reservations, so an agent can tell it apart from sibling stock tools like move_stock or adjust_stock.

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 when to use it (manual holds: quality hold, set-aside for a customer) and when not to (sales orders reserve their own stock). It also spells out the required call sequence — preview=true first, then commit with the previewReceipt — leaving nothing to inference.

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