Skip to main content
Glama

Set Inventory Policy

set_inventory_policy
DestructiveIdempotent

Set or update the reorder policy for items at a warehouse: reorder point (the low-stock threshold), and optionally restock quantity, safety-stock days, and lead-time days. A reorder point or restock quantity you set is pinned (it won't auto-recalculate from velocity), so setting a reorder point ABOVE current available intentionally stages a low-stock situation. A line with only lead-time or safety-stock days keeps a calculated policy calculated, recomputed with the new inputs (preview shows its new reorder point and quantity as null). Each line is matched by SKU then UPC; unmatched identifiers are reported, not fatal. A line may name its own warehouseId, so one call can edit policies at several warehouses (read them first with get_replenishment_settings). A line's pinned=true freezes its reorder point and quantity; pinned=false returns them to the calculation. Omit warehouseId when the tenant has exactly one Internal warehouse or every line names one. Max 500 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": {
      "policies": "<policies>"
    },
    "name": "set_inventory_policy"
  }
}

Input Schema

NameRequiredDescriptionDefault
previewNoStep 1 of the required two-step write: set true to validate and receive a structured old→new preview plus a single-use previewReceipt. Nothing is changed until the commit call.
clientIdNoOptional client id (GUID) for operator (unpinned) credentials on 3PL tenants: confines SKU/UPC matching to that client's items — get ids from list_clients. Client-pinned credentials omit this; the credential decides.
policiesYesReorder policies to set/update (max 500 per call).
warehouseIdNoOptional warehouse id (GUID). May be omitted when the tenant has exactly one Internal warehouse; an explicit id may target any of the tenant's warehouses.
idempotencyKeyNoCaller-generated idempotency key; required with previewReceipt to commit.
previewReceiptNoStep 2 of the required two-step write: the receipt returned by the preview call. Supply together with a fresh idempotencyKey to commit; calls without it are refused.

Output Schema

NameRequiredDescriptionDefault
okNo
errorsNo
failedNo
appliedNo
previewNo
skippedNo
policiesNo
expiresAtNo
actionItemIdNo
confirmationNo
correlationIdNo
approvalResultNo
idempotencyKeyNo
previewReceiptNo
idempotentReplayNo
skippedIdentifiersNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed6 schema fields changed
    • addedInput schema / properties / policies / items / properties / pinned
      Added value: +{
      +  "description": "Optional. true pins the policy: its reorder point and quantity stop recalculating from velocity (a warehouse with no policy yet also needs reorderPoint). false unpins it: both are recalculated from velocity, lead time and safety stock, so it cannot be combined with reorderPoint or reorderQuantity. Omit to pin only when the line sets reorderPoint or reorderQuantity.",
      +  "type": [
      +    "boolean",
      +    "null"
      +  ]
      +}
    • addedInput schema / properties / policies / items / properties / warehouseId
      Added value: +{
      +  "description": "Optional warehouse id (GUID) for this line, so one call can set policies at several warehouses. Omit to use the call's warehouseId.",
      +  "type": [
      +    "string",
      +    "null"
      +  ]
      +}
    • addedOutput schema / properties / preview / properties / lines / items / properties / newPinned
      Added value: +{
      +  "type": "boolean"
      +}
    • addedOutput schema / properties / preview / properties / lines / items / properties / oldPinned
      Added value: +{
      +  "type": [
      +    "boolean",
      +    "null"
      +  ]
      +}
    • addedOutput schema / properties / preview / properties / lines / items / properties / warehouseId
      Added value: +{
      +  "format": "uuid",
      +  "type": "string"
      +}
    • addedOutput schema / properties / preview / properties / lines / items / properties / warehouseName
      Added value: +{
      +  "type": [
      +    "string",
      +    "null"
      +  ]
      +}
  2. First observed

TDQS

A4.8/5.0
Behavior5/5

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

Annotations only flag this as a destructive, idempotent write; the description adds the behavior that actually matters — that setting a reorder point above available deliberately stages a low stock state, that a line with only lead-time/safety-stock stays calculated and recomputed, and that pinned=false clears point and quantity. It also discloses matching order (SKU then UPC) and non-fatal failures, none of which the annotations convey.

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 purpose and fields, then constraints, with no filler sentences — each clause carries a distinct rule. It is a dense single block, though, and the pinning/calculation rules could be separated for faster scanning.

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 multi-line write with a required preview/commit dance, the description covers preconditions, safety staging, matching, partial failure behavior, and limits. An output schema exists, so the absence of return-value detail is appropriate.

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 baseline is 3; the description still earns credit by explaining cross-line interactions (per-line warehouseId enabling multi-warehouse edits, preservation-on-null intent, preview rows showing null calculated points) rather than restating field docs. It stops short of restating every parameter's range, which the schema already covers.

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?

Opens with a specific verb and resource ('Set or update the reorder policy for items at a warehouse') and enumerates the fields and the line-level shape. It also disambiguates from the read sibling by naming get_replenishment_settings, so an agent can tell read from write without inspecting schemas.

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 preconditions and alternatives: read first with get_replenishment_settings, omit warehouseId only when the tenant has one Internal warehouse or every line carries one, and the 500-line cap. It also spells out the two-step preview/commit flow and what happens to unmatched identifiers (reported, not fatal).

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