Skip to main content
Glama

Items by Days of Supply

get_items_by_days_of_supply
Read-only

Which items are about to run out? Ranks items ascending by daysOnHand (current available ÷ the planning rate — the stockout-urgency signal), so the most urgent are first. Filters (all optional): minDays / maxDays bound daysOnHand; includeNoConsumption (default false) excludes items with no demand signal (null daysOnHand) unless set true. Each row also carries aggregatedInventoryDays (including inbound POs + buildable capacity — the procurement-planning view) and a velocity-confidence tier. Available is live stock before units committed to open orders, the figure the days-on-hand math uses: the planning rate already counts those orders as demand. For available net of committed units, as the Inventory page and Shopify show it, use list_items or get_item_stock_outlook. Paged by limit (default 50, max 200); TotalMatching is the pre-paging count. A client-pinned token sees only its own client's items.

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_items_by_days_of_supply"
  }
}

Input Schema

NameRequiredDescriptionDefault
limitNoMax items to return (default 50, max 200).
maxDaysNoOnly items with daysOnHand on/below this value.
minDaysNoOnly items with daysOnHand on/above this value.
includeNoConsumptionNoInclude items with no demand signal (null daysOnHand); default false excludes them.

Output Schema

NameRequiredDescriptionDefault
okNo
itemsNo
maxDaysNo
minDaysNo
returnedNo
totalMatchingNo
includeNoConsumptionNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.6/5.0
Behavior4/5

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

Annotations only supply readOnly/non-destructive/closed-world, so the description carries the rest and does so well: sort order, default exclusion of null daysOnHand items, what aggregatedInventoryDays includes (inbound POs + buildable capacity), the velocity-confidence tier, pagination with TotalMatching, and client-token scoping. It does not state performance or rate-limit traits, which keeps it short of a 5.

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 question and the ranking rule before the filter mechanics, with zero filler sentences. It is dense—several parenthetical definitions stacked in one block—so scanning cost is higher than ideal, but nothing is redundant with annotations or schema.

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?

An output schema exists, yet the description still clarifies the two derived row fields an agent would otherwise misread (aggregatedInventoryDays as the procurement view, and the confidence tier). With pagination, totals, defaults, and client scoping all covered, nothing needed to call it correctly is missing.

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: daysOnHand is defined as available divided by planning rate, and that availability excludes units committed to open orders because the planning rate already counts them as demand. minDays/maxDays and limit add little beyond the schema, so it is a modest lift rather than 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?

Opens with a concrete question ('Which items are about to run out?') then states the exact operation: ranking items ascending by daysOnHand with optional bounds. It also names the sibling tools (list_items, get_item_stock_outlook) that serve a different notion of availability, so an agent can distinguish it without opening other schemas.

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

Usage Guidelines5/5

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

Explicitly frames the use case (stockout urgency ranking) and gives a positive exclusion: for available net of committed units, use list_items or get_item_stock_outlook instead. The includeNoConsumption default behavior and when to flip it are also spelled out.

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