Skip to main content
Glama

Get Low Stock Alerts

get_low_stock_alerts

Scan inventory to flag products at or below a stock threshold, marking under 3 units critical, sorting urgent first, and optionally filtering by category.

Instructions

Scans inventory and returns InventoryAlert objects for every product at or below a stock threshold. Products under 3 units are flagged 'critical'; everything else at or under the threshold is flagged 'low'. Results are sorted by current stock ascending (most urgent first). An optional category restricts the scan to one category; the echoed 'filters' block reports the category actually applied.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
categoryNoRestrict to a single category, e.g. 'tech', 'apparel', or 'home'. Case-insensitive. Omit to cover the whole catalog.
thresholdNoStock level at or below which a product triggers an alert. Defaults to 5 if omitted.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
alertsYes
filtersYes
alertCountYes
criticalCountYes
thresholdUsedYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv3.0.1

TDQS

A4/5.0
Behavior4/5

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

No annotations are provided, so the description carries the full behavioral burden and does well: it discloses the severity classification rule (under 3 units = critical, otherwise low), the sort order (stock ascending, most urgent first), and the echoed filters block. It does not mention permissions, rate limits, or pagination, which are the remaining gaps for an unannotated read tool.

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?

Three dense sentences, each earning its place: trigger condition first, classification and ordering second, filtering/echo behavior last. No filler and no restatement of the title.

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 an output schema present, return values need not be explained, and the description covers the alert logic, sorting, and filtering fully. Only minor operational context (permissions, whether scanning is expensive) is absent, which is a small gap for a read-only tool.

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 both parameters (category with case-insensitivity and examples, threshold with default and exclusivity) are already fully documented in the schema. The description reinforces their effect — category restricts the scan, the applied category is echoed — but adds no new syntax or format detail, so baseline 3 applies.

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 (scans inventory, returns InventoryAlert objects) plus the precise triggering condition (at or below a stock threshold). It is clearly distinct from siblings like list_all_products and smart_restock_predictor, so an agent can route to it without opening the schema.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

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

The description implies when the tool applies (finding products at or below a threshold) and notes that omitting category covers the whole catalog, but it never names an alternative such as smart_restock_predictor or states when not to use this tool. Usage is inferable rather than explicit.

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