Skip to main content
Glama

Forthcast Inventory

Calculate reorder point

calculate_reorder_point
Read-onlyIdempotent

Use this when someone asks how much safety stock to hold or at what stock level to reorder a product. Give a daily demand history (best) or an average daily demand with its variability, plus the supplier lead time and a service level. Returns safety stock, lead-time demand and the reorder point with Forthcast's formula and assumptions. Works without a connected store.

Input Schema

NameRequiredDescriptionDefault
daily_demandNoDaily units sold, oldest first, 14 to 365 values.
service_levelNoTarget in-stock probability, 0.50 to 0.99 (95 also accepted).
lead_time_daysYesSupplier lead time in days.
demand_std_dailyNoStandard deviation of daily demand; assumed sqrt(average) when omitted.
average_daily_demandNoAverage units sold per day, if no daily history.

Output Schema

NameRequiredDescriptionDefault
basisYes
z_scoreYes
assumptionsYes
connect_hintNoHow to get this done automatically on live store data.Forthcast does this automatically for Shopify stores: https://apps.shopify.com/forthcast
safety_stockYes
reorder_pointYes
service_levelYes
lead_time_daysYes
demand_std_dailyYes
lead_time_demandYes
intermittent_demandYes
average_daily_demandYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.2/5.0
Behavior4/5

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

Annotations already declare readOnly, idempotent, non-destructive and closed-world, so the safety profile is covered. The description adds real context beyond that: a deterministic formula with stated assumptions, which outputs are produced, and that no connected store is required. It stops short of noting rate limits or how assumptions can be overridden.

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 sentences, zero filler, and the triggering condition is front-loaded before the input guidance and the return-value note. Every sentence carries distinct information: when to use, what to supply, what comes back.

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, so return values needn't be enumerated, yet the description still names the three key figures and flags formula/assumption transparency. Combined with annotations covering side effects and the fully documented 5-parameter schema, an agent has everything needed to call this correctly.

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 genuine meaning: it marks the daily demand history as the preferred input ('best') and the average-plus-variability path as the fallback, a preference the schema itself does not express. It also names lead time and service level as required ingredients, though without format detail.

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?

Names a specific verb (calculate) and the concrete outputs (safety stock, lead-time demand, reorder point), and frames the question it answers ('how much safety stock to hold or at what stock level to reorder'). It implicitly separates itself from calculate_order_quantity by focusing on the reorder threshold, but never names a sibling explicitly.

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 this when someone asks...' gives a clear triggering condition, and 'Give a daily demand history (best) or an average daily demand with its variability' steers input choice. It adds the useful environment note 'Works without a connected store,' but gives no explicit when-not or named alternative for cases this tool can't cover.

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