Skip to main content
Glama

rr_list_stockout_risks

Read-onlyIdempotent

Identify SKUs at risk of stocking out, with risk levels, days to stockout, sales velocity, and planner-recommended order quantities to prioritize replenishment.

Instructions

Get stockout risk assessment for SKUs. Returns risk levels, days to stockout, velocity, and planned_order: the quantity the PO planner suggests ordering (use planned_order.qty, not suggested_qty). A row with planned_order null and a name_review_hold has an order waiting on the supplier name review, which is not the same as no order suggested. Only positions the planner could evaluate are listed: products without enough sales history and products excluded from planning are left out, so absence from this list, or an empty list, is not evidence that stock is healthy.

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

Input Schema

NameRequiredDescriptionDefault
skuNoOptional SKU filter
limitNoRows per page (default 100, max 500).
cursorNonext_cursor from the previous page. Pass it with the same other inputs until has_more is false.
store_idNoOptional store ID filter
risk_levelNoFilter: critical, high, medium, low

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv1.3.1

TDQS

A4.5/5.0
Behavior5/5

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

Annotations already declare readOnly/idempotent/non-destructive, and the description adds substantial behavior beyond them: field disambiguation (use planned_order.qty, not suggested_qty), the meaning of a null planned_order with name_review_hold, and the coverage boundary that excluded products are silently omitted. These are exactly the traps an agent would otherwise misread as a negative result.

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?

Purpose and return contents are front-loaded in the first sentence, followed by the highest-risk misunderstanding (planned_order vs suggested_qty) and then the coverage caveat. Every sentence carries information, though the final sentence is long and could be split for readability.

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?

There is no output schema, so the description carries the full burden and does it: it names the key returned fields, resolves an ambiguous field name, and explains the two ways a plausible reading of the results would be wrong (hold-state nulls and omitted rows). Nothing an agent needs in order to call and correctly interpret this read-only list tool is missing.

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

Parameters5/5

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

Schema description coverage is 100%, so the schema already documents sku, store_id, risk_level, limit and cursor, and the description adds no parameter-level syntax or format detail beyond it. With the schema doing the heavy lifting, the baseline of 3 applies; the description's extra value is in response semantics rather than parameters.

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 opening sentence names a specific verb and resource ("Get stockout risk assessment for SKUs") and the second sentence enumerates the returned fields (risk levels, days to stockout, velocity, planned_order), which clearly separates it from generic siblings like inventory health or recommendations. It stops short of naming an alternative sibling explicitly, so it misses the top band.

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 a clear interpretive rule for when to trust the output: only planner-evaluable positions are listed, so absence or an empty list is not evidence of healthy stock. It also flags the planned_order-null-plus-name_review_hold state as a distinct case from 'no order suggested'. There is no explicit when-not or named-alternative guidance, keeping it out of the 5 band.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.