Skip to main content
Glama

Empirical next-value interval

forecast_next
Read-onlyIdempotent

Estimate a series' next value from its last reading plus adaptive error quantiles, returning an empirical interval and coverage. Use for one-step uncertainty; needs 11+ chronological readings.

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; choose score_forecasts to check 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}.

Input Schema

TableJSON 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 feedback does not guarantee the next observation is covered.

Output Schema

TableJSON 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. 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"
      +  }
      +}
  2. 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."
  3. 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"
      +}
  4. First observedv0.1.2

TDQS

A4.2/5.0
Behavior3/5

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

Annotations already declare readOnlyHint, idempotentHint, destructiveHint=false and openWorldHint=false, so the safety profile is covered. The description adds useful behavioral context beyond that: the 11-reading minimum, the ok=false failure path, the fields returned on success, and the caveat that coverage is a target rather than a guarantee. This is solid added value, though the return-field listing overlaps the output 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 the purpose before requirements, results and caveats, and the example anchors the call. It is on the long side and repeats some schema content (the 11-reading rule, the coverage caveat), which costs a point but every clause remains informative.

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?

Covers purpose, alternatives, prerequisites, failure behavior and interpretation caveats for a two-parameter tool, and an output schema exists so return values need no further explanation. Nothing an agent needs to invoke it correctly is missing.

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 both parameters are already documented (chronological ordering, unit consistency, the 11-reading rationale, and the 0-1 fraction semantics of nominal). The description largely restates these ('At least 11 chronological readings are required') and adds only the nuance that the horizon is one supplied observation, not a timestamp. Baseline 3 is appropriate when the schema carries the detail.

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') and explains the method (last value as point forecast, adaptive historical absolute-error quantiles). It explicitly distinguishes itself from the sibling score_forecasts, so an agent can route without opening either 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 explicit when-to-use ('one-step baseline or uncertainty display') and names the alternative with the condition that selects it ('choose score_forecasts to check this same method on historical prefixes before relying on it'). It also states when-not-to-use by ruling out fetching prices and training custom models.

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