Skip to main content
Glama

Empirical next-value interval

forecast_next
Read-onlyIdempotent

Estimate a numeric series' next observation from its last value and adaptive historical error quantiles for an empirical interval; use for one-step baselines or uncertainty displays.

Instructions

Estimate the next observation of one numeric series using the last value as a point forecast and adaptive historical absolute-error quantiles for an empirical interval. Use for a one-step baseline or uncertainty display; check its coverage by replaying this same method on historical prefixes before relying on it. At least 11 chronological readings are required; shorter valid histories return ok=false with reading. Successful results contain ok=true, forecast, interval [lower, upper], nominal_coverage, adaptive_alpha and error_history_size. Forecast and bounds use the input's units; the horizon is one supplied observation, not a timestamp or market session. Coverage is a target, not a next-step or changing-market guarantee. This does not fetch prices or train a custom model. Example: {"values":[10,11,10,12,11,13,12,13,14,13,15],"nominal":0.8}.

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": {
      "values": "<values>"
    },
    "name": "forecast_next"
  }
}

Input Schema

NameRequiredDescriptionDefault
valuesYesOne to 2048 finite chronological observations, oldest first, in consistent units and cadence. At least 11 readings are needed for ten prior one-step errors; no missing values, date interpolation or resampling.
nominalNoTarget empirical interval coverage as a fraction strictly between 0 and 1; default 0.80 means 80%, not 80. The adaptive adjustment does not guarantee the next observation is covered.

Output Schema

NameRequiredDescriptionDefault
okNoFalse denotes insufficient history; forecast or scoring fields are then absent.
errorNoValidation or computation failure message; inspect MCP isError or the HTTP status.
methodNoShared forecast issuance and scoring method.
caveatsNoOrdered statements or identifiers.
readingNoResult interpretation or minimum-history requirement.
forecastNoOne-step random-walk point forecast in input units.
intervalNoLower and upper bounds, in that order.
validityNoCoverage is empirical only.
guaranteeNoNo statistical or market-performance guarantee is made.
adaptive_alphaNoClipped adaptive miscoverage parameter as a fraction.
nominal_coverageNoRequested target coverage as a fraction, not a guarantee.
error_history_sizeNoHistorical absolute errors used before issuing this forecast.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.4.4
    • changedInput schema / properties / nominal / description
      Previous value: -"Target empirical interval coverage as a fraction strictly between 0 and 1; default 0.80 means 80%, not 80. The adaptive feedback does not guarantee the next observation is covered."New value: +"Target empirical interval coverage as a fraction strictly between 0 and 1; default 0.80 means 80%, not 80. The adaptive adjustment does not guarantee the next observation is covered."
  2. Changed4 schema fields changedv0.4.3
    • removedOutput schema / additionalProperties
      Removed value: -true
    • addedOutput schema / anyOf
      Added value: +[
      +  {
      +    "additionalProperties": false,
      +    "allOf": [
      +      {
      +        "if": {
      +          "properties": {
      +            "ok": {
      +              "const": true
      +            }
      +          }
      +        },
      +        "then": {
      +          "required": [
      +            "forecast",
      +            "interval",
      +            "nominal_coverage",
      +            "adaptive_alpha",
      +            "error_history_size"
      +          ]
      +        }
      +      }
      +    ],
      +    "properties": {
      +      "adaptive_alpha": {},
      +      "caveats": {},
      +      "error_history_size": {},
      +      "forecast": {},
      +      "guarantee": {},
      +      "interval": {},
      +      "method": {},
      +      "nominal_coverage": {},
      +      "ok": {},
      +      "reading": {},
      +      "validity": {}
      +    },
      +    "required": [
      +      "ok",
      +      "validity",
      +      "guarantee",
      +      "method",
      +      "caveats",
      +      "reading"
      +    ],
      +    "type": "object"
      +  },
      +  {
      +    "additionalProperties": false,
      +    "description": "Existing tool-error payload; no successful result fields are implied.",
      +    "properties": {
      +      "error": {
      +        "description": "Validation or computation failure message; inspect MCP isError or the HTTP status.",
      +        "type": "string"
      +      }
      +    },
      +    "required": [
      +      "error"
      +    ],
      +    "type": "object"
      +  }
      +]
    • changedOutput schema / description
      Previous value: -"Tool-specific result object described in each tool's description. Check status/ok/state, reading, validity and limits before using numbers. MCP returns this object in structuredContent and JSON text; invalid input returns isError=true with an error field. No tool fetches sources or executes trades."New value: +"One-step empirical forecast or insufficient-history result. Tool errors retain the separate error-message shape."
    • addedOutput schema / properties
      Added value: +{
      +  "adaptive_alpha": {
      +    "description": "Clipped adaptive miscoverage parameter as a fraction.",
      +    "type": "number"
      +  },
      +  "caveats": {
      +    "description": "Ordered statements or identifiers.",
      +    "items": {
      +      "description": "One retained statement or identifier.",
      +      "type": "string"
      +    },
      +    "type": "array"
      +  },
      +  "error": {
      +    "description": "Validation or computation failure message; inspect MCP isError or the HTTP status.",
      +    "type": "string"
      +  },
      +  "error_history_size": {
      +    "description": "Historical absolute errors used before issuing this forecast.",
      +    "minimum": 0,
      +    "type": "integer"
      +  },
      +  "forecast": {
      +    "description": "One-step random-walk point forecast in input units.",
      +    "type": "number"
      +  },
      +  "guarantee": {
      +    "description": "No statistical or market-performance guarantee is made.",
      +    "type": "null"
      +  },
      +  "interval": {
      +    "description": "Lower and upper bounds, in that order.",
      +    "items": {
      +      "description": "Bound in the original input units.",
      +      "type": "number"
      +    },
      +    "maxItems": 2,
      +    "minItems": 2,
      +    "type": "array"
      +  },
      +  "method": {
      +    "description": "Shared forecast issuance and scoring method.",
      +    "type": "string"
      +  },
      +  "nominal_coverage": {
      +    "description": "Requested target coverage as a fraction, not a guarantee.",
      +    "type": "number"
      +  },
      +  "ok": {
      +    "description": "False denotes insufficient history; forecast or scoring fields are then absent.",
      +    "type": "boolean"
      +  },
      +  "reading": {
      +    "description": "Result interpretation or minimum-history requirement.",
      +    "type": "string"
      +  },
      +  "validity": {
      +    "const": "empirical_only",
      +    "description": "Coverage is empirical only.",
      +    "type": "string"
      +  }
      +}
  3. Changed4 schema fields changedv0.4.3-glama.1
    • addedInput schema / properties / nominal / default
      Added value: +0.8
    • addedInput schema / properties / nominal / description
      Added value: +"Target empirical interval coverage as a fraction strictly between 0 and 1; default 0.80 means 80%, not 80. The adaptive feedback does not guarantee the next observation is covered."
    • addedInput schema / properties / values / description
      Added value: +"One to 2048 finite chronological observations, oldest first, in consistent units and cadence. At least 11 readings are needed for ten prior one-step errors; no missing values, date interpolation or resampling."
    • addedOutput schema / description
      Added value: +"Tool-specific result object described in each tool's description. Check status/ok/state, reading, validity and limits before using numbers. MCP returns this object in structuredContent and JSON text; invalid input returns isError=true with an error field. No tool fetches sources or executes trades."
  4. Changed7 schema fields changedv0.4.1
    • removedInput schema / properties / nominal / description
      Removed value: -"range coverage, default 0.8"
    • addedInput schema / properties / nominal / exclusiveMaximum
      Added value: +1
    • addedInput schema / properties / nominal / exclusiveMinimum
      Added value: +0
    • removedInput schema / properties / values / description
      Removed value: -"the metric's history, oldest first"
    • addedInput schema / properties / values / maxItems
      Added value: +2048
    • addedInput schema / properties / values / minItems
      Added value: +1
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "additionalProperties": true,
      +  "type": "object"
      +}
  5. First observedv0.1.2

TDQS

A4.4/5.0
Behavior5/5

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

Annotations already declare readOnly/idempotent/non-destructive/closed-world, and the description adds substantial behavior beyond that: the 11-reading minimum, the ok=false failure shape for short histories, the exact success payload fields, unit inheritance from the input, and an explicit caveat that coverage is a target rather than a next-step guarantee.

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 method, then requirements, then return shape, then caveats, ending with a concrete example. It is dense and mostly earns its length, though the units statement and the coverage-is-not-a-guarantee caveat are each made twice.

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?

For a two-parameter statistical tool with an output schema, the description covers everything an agent needs: prerequisites, failure mode, result fields, horizon interpretation, and the limits of the coverage claim. Nothing material is left to inference.

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 the schema already documents both parameters thoroughly, including the 11-reading requirement and the 0-1 fraction semantics of 'nominal'. The description largely restates those constraints rather than adding new meaning, so the baseline 3 applies.

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 ('estimate the next observation of one numeric series') plus the exact method: last value as point forecast, adaptive historical absolute-error quantiles for the interval. It also rules out confusable scope ('does not fetch prices or train a custom model'), so an agent can tell it apart from siblings like score_forecasts without opening the schema.

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 when-to-use guidance ('a one-step baseline or uncertainty display') and an unusual but valuable validation instruction: replay the same method on historical prefixes to check coverage before relying on it. It lacks an explicit 'use X instead when...' pointer to an alternative tool, which keeps it below 5.

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