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

TableJSON 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

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.8/5.0
Behavior5/5

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

Annotations already declare readOnlyHint, idempotentHint, and destructiveHint. The description adds significant behavioral detail: 'this tool never raises a protocol error — it returns an error object with fix instructions' and 'Every call is read-only and idempotent, so after correcting the input it is always safe to retry.' No contradictions with annotations.

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?

The description is well-structured: purpose statement, premium note, example, usage guidelines, error handling. It is front-loaded with the main action. The example, while helpful, adds a bit of length; overall it is concise without unnecessary repetition.

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 only 2 parameters, rich annotations, and an output schema, the description covers all essential aspects: purpose, usage context, behavioral traits (idempotent, read-only, error handling), parameter semantics, and output format (trend_per_period, r_squared, forecast, caveat). It leaves no gaps for an agent to misunderstand.

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 description coverage is 100%, so baseline is 3. The description provides a typical input example that demonstrates proper parameter usage and includes error handling details that clarify validation behavior (e.g., minimum 4 values). This adds value beyond the schema's parameter descriptions.

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 clearly states 'Forecast future periods with a linear trend and honest fit quality,' specifying the verb (forecast), resource (future periods), and method (linear trend). It includes a typical input/output example, distinguishes from the sibling 'growth_rates' by noting it's not for measuring already observed growth, and sets expectations with 'For quick planning, not statistical modeling.'

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?

Explicitly says '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).' This provides clear when-to-use and when-not-to-use guidance, and names an alternative tool (growth_rates).

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.