Skip to main content
Glama

Forecast Trend

forecast_trend
Read-onlyIdempotent

Forecast future periods with a linear trend and honest fit quality. PREMIUM (license).

For quick planning, not statistical modeling. Typical input {"values": [100, 120, 138, 161], "periods_ahead": 3} returns {"trend_per_period": 20.2, "r_squared": 0.998, "forecast": [180.9, 201.1, 221.3], "caveat": "..."}.

Use when a series is roughly linear and fit quality matters as much as the projection. Not for seasonal or cyclical data, and not for measuring growth already observed (growth_rates). Errors: on invalid, missing, or malformed input this tool never raises a protocol error; it returns {"error": ""} (for example {"error": "need at least 4 historical values"}). Every call is read-only and idempotent, so after correcting the input it is always safe to retry.

Input Schema

NameRequiredDescriptionDefault
valuesYesOrdered historical series, oldest first; at least 4 values.
periods_aheadNoHow many future periods to forecast; values outside 1-12 are clamped. Default 3.

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.9/5.0
Behavior5/5

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

Annotations already declare readOnly/idempotent/non-destructive, but the description adds genuinely new behavior: a premium license requirement, a non-protocol error contract ({"error": ...}) with an example message, and the retry-safety consequence of idempotency. Those are things an agent cannot infer from annotations or 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 licensing, then example, then usage boundaries and error contract. Every element earns its place, though the embedded JSON example is bulky and the read-only/idempotent sentence partially restates the annotations.

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?

Output schema exists, so return values needn't be explained further, yet the example still grounds them. Combined with license gating, error semantics, minimum-input constraint, and exclusion rules, an agent has everything needed to call this correctly on the first try.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100% and both parameters are described there, so baseline would be 3. The worked example input/output goes beyond the schema by showing the concrete shape of the values array, what the returned trend and r_squared mean in practice, and that a caveat field accompanies the forecast.

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 a specific verb and resource ("Forecast future periods with a linear trend") and immediately qualifies the output (fit quality). It also explicitly separates itself from growth_rates and from seasonal/cyclical use cases, so an agent can pick it over its siblings without opening a schema.

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?

Gives an explicit when: "a series is roughly linear and fit quality matters as much as the projection." Gives explicit when-not: seasonal or cyclical data, and measuring already-observed growth, naming the growth_rates alternative. Also flags the PREMIUM license gate up front.

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.