Skip to main content
Glama

Find products at risk of stocking out

get_stockout_risk
Read-onlyIdempotent

Find products at risk of stocking out within a given number of days. Compares current available inventory, plus open purchase orders and transfers that land before it runs out, against daily average consumption and supplier lead times. Use when users ask about stockout risk, low stock alerts, or which SKUs need reordering.

Input Schema

NameRequiredDescriptionDefault
limitNoMaximum number of products to return (default: 20)
supplier_idNoOptional supplier ID to filter products by
warehouse_idNoOptional warehouse ID to filter by
days_thresholdNoNumber of days to check stockout risk for (default: 14)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4/5.0
Behavior4/5

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

Annotations already declare readOnlyHint, idempotentHint, destructiveHint=false and openWorldHint=false, so the safety profile is covered. The description adds real value beyond that by disclosing the risk model — available inventory plus inbound POs/transfers landing before runout, compared against daily average consumption and supplier lead times — which lets an agent explain how a result was derived. It omits sort order of results and any pagination behavior past the limit default.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two sentences, front-loaded with what it does, then the computation, then the invocation cue. No repetition of the title or filler wording.

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?

There is no output schema, so the description should ideally indicate what a result looks like (product identity, days of cover, risk flag). It covers the inputs and the analytical logic well, leaving only the return shape implicit — a modest gap for an agent that must report results.

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 description coverage is 100%, so all four optional parameters (limit, supplier_id, warehouse_id, days_threshold) are already documented with defaults. The description only echoes the notion of a day threshold and filtering scope without adding syntax, units, or interaction details, so the baseline 3 applies.

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 gives a specific verb and resource ('Find products at risk of stocking out') plus the time-window scope, which is distinct from sibling tools like get_inventory_levels and explain_inventory_gap. It never names a sibling to explicitly route against, which keeps it just short of a 5.

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?

'Use when users ask about stockout risk, low stock alerts, or which SKUs need reordering' gives clear user-intent triggers for invocation. There are no exclusions or named alternatives (e.g., when to prefer explain_inventory_gap or get_inventory_levels instead), so it stops at a 4.

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.