Skip to main content
Glama

Stock Health

get_stock_health
Read-only

How healthy is the inventory? Without itemSku: the tenant's composite health score (0-100, value-weighted) with its five factor averages (stock level, stockout, return rate, ABC, dead stock), excess/aged units and monthly excess carrying cost, plus a daily score trend — read from the nightly snapshot (computed fresh when none exists yet). With itemSku: that item's full score breakdown — factors, excess units, carrying-cost dollars, ABC class; daysOfSupply=null with stock on hand means dead stock.

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": "get_stock_health"
  }
}

Input Schema

NameRequiredDescriptionDefault
itemSkuNoOptional item SKU for a per-item deep dive instead of the tenant view.
trendDaysNoDays of score trend to include in the tenant view (default 30, max 366).

Output Schema

NameRequiredDescriptionDefault
okNo
itemNo
trendNo
tenantNo
warningsNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A3.6/5.0
Behavior3/5

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

The annotations already establish this as a read-only, non-destructive, closed-world operation. The description adds useful behavioral context about reading from the nightly snapshot and computing fresh data when no snapshot exists, plus the dead-stock interpretation when daysOfSupply is null. It does not discuss permissions, latency, or limits, but with annotations present this is a reasonable level of added transparency.

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 description is dense but front-loaded, with the tenant mode first and the item mode second. It uses one long paragraph rather than more scannable structure, though most of the content is substantive and directly relevant.

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?

Given the output schema and complete parameter descriptions, the definition is mostly complete: it explains both modes, freshness behavior, headline metrics, and dead-stock semantics. It could be slightly more complete by clarifying how trendDays affects the response, but that is already covered in the schema.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so both parameters are already documented in the input schema. The description reinforces that itemSku switches between tenant and item views and that trendDays relates to the tenant score trend, but it adds little syntax or format meaning beyond the schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly defines the tool as returning inventory health, with a tenant-level composite score versus a per-item breakdown selected by itemSku. It is specific about the resource and outputs, but does not explicitly distinguish this tool from similarly named siblings such as get_portfolio_health or get_inventory_health_settings.

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?

The description gives clear conditional usage: omit itemSku for the tenant view, supply itemSku for an item deep dive. It does not state when not to use this tool or name alternative tools for related questions, so it falls short of full alternative guidance.

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