Skip to main content
Glama

get_forecast

Forecast a metric — answers 'what should I expect?' / 'are we on track this month?' / 'project next month'. Returns a per-store stores array (each in its OWN currency — never summed across currencies). Each store has: currentMonth (month-to-date actual + projected month-end with low/high band, built from the live daily run-rate), horizon (future full months with expected/low/high), method, confidence, explicit assumptions, historyMonths, and a ready-to-render charts[0] line spec (seriesField='series' splits actual vs forecast). HONESTY: every forecast carries a method (month_to_date_pace / linear_trend / naive_last_month / yoy_seasonal), a confidence level, and an interval — LEAD with the range and the confidence, never present the point estimate as a promise. Current-month projection works immediately from orders; forward months need calendar-month snapshot history and degrade gracefully (low confidence / declines to project when too thin). v1 metrics: revenue, orders.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
storeNoSub-store key (e.g. 'acme-store-us'). Omit to forecast every store in the workspace (each in its own currency).
metricNoMetric to forecast. Defaults to 'revenue'.
_offsetNoPagination offset. If a response includes _pagination.hasMore=true, use _offset to fetch the next page.
horizonNoNumber of future FULL months to project after the current one (1-3). Defaults to 1.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added
  2. Removed
  3. Added

TDQS

A4.3/5.0
Behavior5/5

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

With no annotations, the description carries the full burden and does so richly: it names the four methods, mandates leading with range and confidence over the point estimate, describes graceful degradation to low confidence when history is thin, and warns that per-store values are never summed across currencies. This is substantial behavioral disclosure beyond the schema.

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 purpose and driver questions, then organized into return-shape and honesty sections. Effective structure, though it is dense and long; a few clauses (e.g. the full output field enumeration) could be trimmed given the schema already exists.

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 forecast tool with no output schema, it describes the return shape well (stores array, currentMonth, horizon, method, confidence, assumptions, charts) and sets expectations about honesty and degradation. Minor gaps remain on exact band semantics and pagination behavior, but the core is complete.

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 all four parameters are already documented in the schema. The description reinforces defaults (metric defaults to revenue, horizon defaults to 1) and reinforces the per-currency store behavior, but adds little syntax or format beyond what the schema provides. Baseline 3 is appropriate.

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 the verb (forecast) and resource (a metric) and immediately frames the questions it answers ('what should I expect?', 'are we on track this month?', 'project next month'). This distinguishes it from descriptive siblings like get_daily_metrics and get_yoy_monthly, which report history rather than project forward.

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?

Gives clear context for when to reach for it via the quoted user questions and notes that current-month projection works immediately while forward months need snapshot history. It does not explicitly name which sibling to use for historical data instead, so it stops short of explicit alternative routing.

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