Skip to main content
Glama

Demand Forecast

get_demand_forecast
Read-only

Forward-looking demand forecast for a single item by SKU: the auto-classified demand pattern, the statistical method chosen (by accuracy on the item's recent months where it has two seasons of history, otherwise from the pattern), forecast accuracy, current inventory, the projected stockout date (and days until), and the month-by-month demand forecast over the horizon. Runs the same forecasting engine as the item page's demand chart. Also flags customer concentration: the share of the trailing window's net demand (windowDays) its top customer placed, a risk flag beside the forecast, never an input to it. Read-only. Optionally override the method: ses (simple exponential smoothing), holt (double exponential / trend), holtWinters (triple exponential / seasonal), tsb (intermittent demand), crostonSba (intermittent demand, Croston SBA), or median (month-by-month median of the eligible models).

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "itemSku": "<itemSku>"
    },
    "name": "get_demand_forecast"
  }
}

Input Schema

NameRequiredDescriptionDefault
methodNoOptional method override: ses, holt, holtWinters, tsb, crostonSba, or median. Omit to auto-select (by accuracy on recent months where the seasonal model can be scored, otherwise from the demand pattern).
itemSkuYesItem SKU to forecast (exact match).
horizonDaysNoForecast horizon in days (default 90, max 365).

Output Schema

NameRequiredDescriptionDefault
okNo
maeNo
mapeNo
wapeNo
itemIdNo
methodNo
itemSkuNo
itemNameNo
reasoningNo
horizonDaysNo
demandPatternNo
accuracyPercentNo
monthlyForecastNo
currentInventoryNo
daysUntilStockoutNo
customerConcentrationNo
projectedStockoutDateNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A3.7/5.0
Behavior4/5

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

Annotations already cover the safety profile (readOnlyHint=true, destructive=false, closed world), so the description's job is to add context beyond that, which it does: it explains the method auto-selection rule (accuracy on recent months where two seasons of history exist, otherwise from the pattern), the fallback to pattern-based selection, and explicitly states the customer-concentration figure is a risk flag and 'never an input to it' — heading off a plausible misinterpretation. It does not discuss failure behavior for unknown SKUs or rate/cost characteristics.

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

Conciseness3/5

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

The scope statement is front-loaded, which is good, but the body is one dense run-on paragraph cramming output enumeration, method definitions, and a side note on customer concentration into comma-chained clauses like '(and days until)'. Much of the length re-describes return values that the output schema already covers, so not every sentence earns its place.

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?

For a three-parameter read-only tool with full schema coverage and an output schema, this is close to complete: it explains selection logic, the override options, and the risk-flag semantics. The notable gap is routing guidance against the many demand-analysis siblings, plus no statement of what happens when the SKU is unknown or has no history.

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 3 is the baseline, but the description earns more by expanding each method token beyond the schema's bare list (holt = double exponential/trend, holtWinters = triple exponential/seasonal, tsb/crostonSba = intermittent demand) and restating that omitting method triggers auto-selection. One flaw: it references 'windowDays' as if it were a caller-visible input, yet no such parameter exists in the schema, which could confuse an agent.

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?

States a specific verb+resource and scope: a forward-looking demand forecast for a single item by SKU, enumerating the concrete outputs (demand pattern, chosen method, accuracy, inventory, stockout date, month-by-month forecast). An agent knows exactly what it gets back. It stops short of naming a sibling such as get_demand_analysis_report or explain_demand_change to differentiate the single-item forecast from the broader analysis tools.

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?

Usage is only implied by scope — the single-SKU granularity and 'read-only' framing suggest it is for per-item forecast lookups, and 'Runs the same forecasting engine as the item page's demand chart' gives context. There is no explicit when-to-use, when-not-to-use, or pointer to an alternative for aggregate or multi-item questions.

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