Skip to main content
Glama

Set Inventory Health Settings

set_inventory_health_settings
DestructiveIdempotent

Change the tenant's inventory health policy (see get_inventory_health_settings): health-score weights and days-of-supply bands, the health-degraded alert's drop threshold and lookback, and the target service level and ordering cost used for safety stock and order quantities. Only the fields you pass change; list field names in resetToDefault to put them back on their default. The same rules as the settings page apply (e.g. safe days must exceed critical days). The preview shows each setting before→after and what it moves. 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_inventory_health_settings"
  }
}

Input Schema

NameRequiredDescriptionDefault
inputNoThe settings to change; omitted fields keep their current value.
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.
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.
resetToDefaultNoField names (as in input, e.g. "targetServiceLevel") to put back on their default.

Output Schema

NameRequiredDescriptionDefault
okNo
previewNo
settingsNo
expiresAtNo
actionItemIdNo
confirmationNo
correlationIdNo
approvalResultNo
idempotencyKeyNo
previewReceiptNo
idempotentReplayNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.6/5.0
Behavior5/5

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

Goes well beyond the annotations: it discloses the mandatory two-step write with a single-use previewReceipt, that calls lacking the receipt are refused, that a fresh idempotencyKey is needed to commit, and that nothing changes until the commit call. It also states the auth prerequisites (operator/unpinned credential with Write + planning.execute and the Admin role) and the cross-field validation rule that mirrors the settings page — exactly the kind of context annotations can't 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 the resource and its scope, then moves to mutation semantics, then validation and auth — a sensible order with no filler. It runs as one dense paragraph and the auth sentence is tacked on at the end, but every sentence carries information an agent needs.

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-field settings mutation with an output schema, the description covers the missing pieces an agent can't get from structured fields: the two-step commit protocol, credential and role requirements, partial-update semantics, and cross-field validation. Nothing essential to calling this correctly is left implicit.

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 real meaning: it clarifies that omitted fields are preserved, explains the resetToDefault mechanism by example, and flags the interdependent constraint (safe days must exceed critical days) that spans multiple parameters. It doesn't document the previewReceipt/idempotencyKey pairing beyond the schema's own descriptions, so it isn't a full 5.

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 ("Change the tenant's inventory health policy") and then enumerates the exact scope: weights and days-of-supply bands, the alert's drop threshold and lookback, and the service level / ordering cost used for safety stock. It names the read counterpart get_inventory_health_settings, so an agent can distinguish this from the getter 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 Guidelines4/5

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

Gives clear operational guidance: partial updates are the norm ("Only the fields you pass change"), resetToDefault is the way to revert a field, and the required preview→commit sequence is spelled out. It routes to get_inventory_health_settings for reading but doesn't explicitly contrast with adjacent writers like set_inventory_policy or set_inventory_levels, leaving a small ambiguity for an agent choosing among them.

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