Skip to main content
Glama

product_forecast

Read-onlyIdempotent

Forecast a business metric from its historical series, generating per-period point forecasts with confidence intervals to support data-driven planning.

Instructions

Forecast a business metric horizon periods ahead from its historical series and return per-period point forecasts with confidence intervals. The trend comes from the last up-to-6 history values, volatility from the mean absolute period change, and a 5000-scenario simulation quantifies uncertainty; seasonality=true applies an alternating +/-5% seasonal factor. Use query_data to build the history from a connected dataset first. Synchronous deterministic compute; nothing is persisted. Returns baseline (most recent value), forecast_mean (final period), total_change_pct, and one {period, forecast, lower_bound, upper_bound, trend} item per period with trend up, down, or stable.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
metricYesName of what you are forecasting, e.g. monthly_revenue.
historyYesHistorical values in chronological order, most recent last; 3-1000 points.
horizonNoHow many periods ahead to forecast, 1-120; defaults to 12.
seasonalityNoAccount for seasonal patterns; defaults to true.
confidence_levelNoConfidence interval width, 0.5-0.99; defaults to 0.90. The z-value comes from the nearest of 0.90, 0.95, 0.99.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed5 schema fields changedv0.1.3
    • addedInput schema / properties / confidence_level / description
      Added value: +"Confidence interval width, 0.5-0.99; defaults to 0.90. The z-value comes from the nearest of 0.90, 0.95, 0.99."
    • addedInput schema / properties / history / description
      Added value: +"Historical values in chronological order, most recent last; 3-1000 points."
    • addedInput schema / properties / horizon / description
      Added value: +"How many periods ahead to forecast, 1-120; defaults to 12."
    • addedInput schema / properties / metric / description
      Added value: +"Name of what you are forecasting, e.g. monthly_revenue."
    • addedInput schema / properties / seasonality / description
      Added value: +"Account for seasonal patterns; defaults to true."
  2. First observedv0.1.0

TDQS

A4.6/5.0
Behavior5/5

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

Annotations already mark readOnlyHint, idempotentHint, and destructiveHint, and the description adds substantial behavior: 'Synchronous deterministic compute; nothing is persisted,' the trend/volatility/simulation algorithm, the seasonality factor, and the exact return shape. This goes far beyond the structured fields and helps the agent predict side effects and output.

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?

Five sentences, with the core purpose front-loaded and each sentence adding value: output, algorithm, prerequisite, compute behavior, and return fields. It is denser than minimal but not bloated; no filler or redundant restatement of schema descriptions.

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?

With no output schema, the description must explain return values, and it does thoroughly: baseline, forecast_mean, total_change_pct, and per-period items with fields and trend labels. It also covers prerequisites, compute characteristics, and parameter-specific behavior, so an agent has everything needed to invoke the tool 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 meaningful detail beyond the schema: seasonality applies an alternating +/-5% factor, confidence_level z-values come from the nearest of 0.90/0.95/0.99, and the trend is derived from the last up-to-6 history values. This enriches parameter understanding without repeating schema definitions.

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?

The description opens with a specific verb and resource: 'Forecast a business metric horizon periods ahead from its historical series and return per-period point forecasts with confidence intervals.' It clearly distinguishes this from data-retrieval siblings like query_data and optimization siblings like product_optimize by defining the forecast output and prerequisite flow.

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 usage context: build history with query_data first, then call this tool. It does not explicitly list when-not-to-use cases or name alternatives like product_retrieve, but the prerequisite instruction and the synchronous/stateless note provide enough guidance for correct selection.

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

Deploy Server

Other Tools