Skip to main content
Glama

Set Replenishment Defaults

set_replenishment_defaults
DestructiveIdempotent

Change the tenant's replenishment defaults (see get_replenishment_defaults): the default purchase lead time (days) and flat safety stock (days of demand) for items nothing more specific covers, tenant-wide and per item group. A group's default wins over the tenant's. Lead times or buffers typed on an item-warehouse, supplier defaults and purchase-order history keep taking precedence. Only the values you pass change; set clearLeadTimeDays / clearSafetyStockDays to inherit again. The preview shows each value before→after and how many items fall back to it. Requires an operator (unpinned) credential with Write + planning.execute and the Admin role.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "set_replenishment_defaults"
  }
}

Input Schema

NameRequiredDescriptionDefault
tenantNoTenant-wide defaults to change; omit to leave them alone.
previewNoStep 1 of the required two-step write: set true to validate and receive a structured preview plus a single-use previewReceipt. Nothing changes until the commit call.
itemGroupsNoItem groups whose defaults to change; groups not listed are left alone.
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
previewNo
defaultsNo
expiresAtNo
actionItemIdNo
confirmationNo
correlationIdNo
approvalResultNo
idempotencyKeyNo
previewReceiptNo
idempotentReplayNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.5/5.0
Behavior5/5

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

Beyond the annotations (which only say destructive, non-read-only, idempotent), the description discloses that changes are partial ("Only the values you pass change"), that the write is a required two-step preview-then-commit, and the exact credential/permission prerequisites (operator unpinned credential with Write + planning.execute and Admin role). It also describes what the preview returns (before→after per value and affected item counts), which is real behavioral context for a destructive mutation.

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?

The verb and resource lead, the scoping/precedence caveats follow, and the operational requirements come last — a sensible front-loaded order with no filler sentences. The middle sentences are dense and cram several rules together, which costs a little readability but nothing is wasted.

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?

With annotations, a 100%-documented schema and an output schema present, the description covers the remaining gaps an agent needs: permissions, partial-update behavior, precedence, and the preview requirement. The step-2 commit mechanics live in the schema rather than the description, which is an acceptable division but leaves the description slightly incomplete on its own.

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 description coverage is 100%, so the baseline would be 3, but the description adds cross-parameter semantics the schema does not: write-time precedence between group and tenant scope, and the inheritance chain group → tenant → system default when a clear flag is set. That meaningfully improves how an agent chooses between setting a value and clearing one.

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?

"Change the tenant's replenishment defaults" names a specific verb and resource, then enumerates exactly which two values are affected (default purchase lead time and flat safety stock) and at which scopes (tenant-wide and per item group). It also points at the read sibling get_replenishment_defaults, so an agent can distinguish the write path from the read path 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 Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

It states the precedence chain clearly (item-warehouse values, supplier defaults, PO history all outrank these defaults; a group's default outranks the tenant's) and tells the agent how to un-set a value via the clear flags. It also flags the required preview step. It stops short of explicitly restating the commit call's mechanics, which the schema carries instead.

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