Skip to main content
Glama

forecast

Run a time-series plan to predict future values or evaluate it on a test set, saving predictions and metrics to CSV.

Instructions

Run a plan: forecast the future, or evaluate on a test set with test_size. Predictions and metrics go to CSV files. A forecast of the future has no error measure: backtest or compare the plan first. Returns a forecast id.

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": {
      "plan_id": "<plan_id>"
    },
    "name": "forecast"
  }
}

Input Schema

NameRequiredDescriptionDefault
plan_idYesId of the plan to run (from `plan`, `refine_plan` or `links.best_plan_id` of `compare`).
exog_pathNoAbsolute path of a CSV file with the future values of the exogenous variables, one row per date (and series) of the horizon, or for data without dates one row per step, in order. Required to forecast the future when the plan uses exogenous variables. The script of `get_code` reads them from this file, by its path, as it reads the data.
test_sizeNoNull to forecast the future. To evaluate instead, the test set: the last n observations (an integer, which must equal `steps`) or the ISO 8601 date it starts at. A fraction in (0, 1) only works when it gives exactly `steps` observations.

Output Schema

NameRequiredDescriptionDefault
idYes
costNo
kindYes
filesNo
linksNo
noticesNo
summaryYes
changeableNo
notices_omittedNo
values_includedNo
summary_truncatedNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changedv0.1.1
    • changedInput schema / properties / exog_path / description
      Previous value: -"Absolute path of a CSV file with the future values of the exogenous variables, one row per date (and series) of the horizon. Required to forecast the future when the plan uses exogenous variables. The script of `get_code` reads them from 'exog_future.csv' in its working directory."New value: +"Absolute path of a CSV file with the future values of the exogenous variables, one row per date (and series) of the horizon, or for data without dates one row per step, in order. Required to forecast the future when the plan uses exogenous variables. The script of `get_code` reads them from this file, by its path, as it reads the data."
    • changedOutput schema / description
      Previous value: -"Envelope returned by the tools that create an object, and by\n`describe_object`.\n\nAttributes\n----------\nid : str\n    Id of the object, to pass to the tools that take it.\nkind : str\n    Kind of the object: `'profile'`, `'plan'`, `'cv'`, `'backtest'`,\n    `'comparison'` or `'forecast'`.\nlinks : dict\n    Ids of related objects: those it was built from (`profile_id`,\n    `plan_id`, `cv_id`, and `parent_plan_id` for a refined plan), the\n    plan of the winner of a comparison (`best_plan_id`), and the\n    comparison a winning plan comes from (`comparison_id`).\nsummary : str\n    Plain-text description of the object (`describe()` of the core),\n    cut to 20,000 characters.\nsummary_truncated : bool\n    Whether `summary` was cut; the full text is then in\n    `files['summary']`.\nnotices : list of ToolNotice\n    Warnings the call emitted, the first 20 distinct ones. Deprecation\n    warnings go to the log of the server instead, and the failures of\n    the candidates of a comparison are in its result.\nnotices_omitted : int\n    Number of distinct warnings left out of `notices`.\nfiles : dict\n    Absolute paths of the files written for the object, by role:\n    `predictions` and `metrics` (CSV with the index) of a backtest or a\n    forecast, `leaderboard`, `best_predictions` and `best_metrics` of a\n    comparison, and `summary` when the summary was cut.\nvalues_included : bool\n    Always False: the response holds no rows of the data or of the\n    predictions. The summary carries statistics of the predictions, the\n    metrics and the leaderboard of a comparison; the rows are in\n    `files`.\ncost : dict, None\n    Cost of a cross-validation strategy, a backtest or a comparison:\n    `n_folds`, `n_fits` (trainings of the forecaster in the shared\n    strategy), `estimator_fits` (fits of an estimator, which a direct\n    forecaster multiplies by `steps`) and `inference_windows` (the\n    cost of a foundation model, never trained: one forecast per series\n    and fold; 0 for the other forecasters); for a comparison, the last\n    two are sums over its candidates. A cross-validation strategy also\n    has `compare_estimator_fits` and `compare_inference_windows`, those\n    of a comparison without candidates with it. None for the other\n    kinds.\nchangeable : list of str\n    Arguments of `refine_plan` (for a plan) or of `create_cv` (for a\n    cross-validation strategy) that build a variant of the object.\n    Empty for the other kinds."New value: +"Envelope returned by the tools that create an object, and by\n`describe_object`.\n\nAttributes\n----------\nid : str\n    Id of the object, to pass to the tools that take it.\nkind : str\n    Kind of the object: `'profile'`, `'plan'`, `'cv'`, `'backtest'`,\n    `'comparison'` or `'forecast'`.\nlinks : dict\n    Ids of related objects: those it was built from (`profile_id`,\n    `plan_id`, `cv_id`, and `parent_plan_id` for a refined plan), the\n    plan of the winner of a comparison (`best_plan_id`), and the\n    comparison a winning plan comes from (`comparison_id`).\nsummary : str\n    Plain-text description of the object (`describe()` of the core),\n    cut to 20,000 characters.\nsummary_truncated : bool\n    Whether `summary` was cut; the full text is then in\n    `files['summary']`.\nnotices : list of ToolNotice\n    Warnings the call emitted, the first 20 distinct ones. Deprecation\n    warnings go to the log of the server instead, and the failures of\n    the candidates of a comparison are in its result.\nnotices_omitted : int\n    Number of distinct warnings left out of `notices`.\nfiles : dict\n    Absolute paths of the files written for the object, by role:\n    `predictions` and `metrics` (CSV with the index) of a backtest or a\n    forecast, `leaderboard`, `best_predictions` and `best_metrics` of a\n    comparison, and `summary` when the summary was cut.\nvalues_included : bool\n    Always False: the response holds no rows of the data or of the\n    predictions. The summary carries statistics of the predictions, the\n    metrics and the leaderboard of a comparison; the rows are in\n    `files`.\ncost : dict, None\n    Cost of a cross-validation strategy, a backtest or a comparison:\n    `n_folds`, `n_fits` (trainings of the forecaster),\n    `estimator_fits` (fits of an estimator, which a direct forecaster\n    multiplies by `steps`) and `inference_windows` (the cost of a\n    foundation model, never trained: one forecast per series and fold;\n    0 for the other forecasters). For a comparison, `n_folds` is that\n    of the shared strategy and the other three are totals over all its\n    candidates, the baseline included, counted before they run (a\n    candidate that fails while it runs counts too; one whose plan\n    cannot be built, or that fails the checks of `backtest`, runs\n    nothing and does not). A cross-validation\n    strategy also has `compare_estimator_fits` and\n    `compare_inference_windows`, those of a comparison without\n    candidates with it. Above 50 estimator fits, or 2000 inference\n    windows, `backtest` and `compare` run only with `confirm_cost` set\n    to the estimator fits (the inference windows, when only those are\n    above). None for the other kinds.\nchangeable : list of str\n    Arguments of `refine_plan` (for a plan) or of `create_cv` (for a\n    cross-validation strategy) that build a variant of the object.\n    Empty for the other kinds."
  2. First observedv0.1.0

TDQS

A4.5/5.0
Behavior4/5

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

Annotations only say it is non-readonly, non-destructive and closed-world; the description adds that predictions and metrics are written to CSV files and that a forecast id is returned, which tells the agent real side effects occur. It stops short of saying where those CSVs land or whether existing files are overwritten, so it is strong but not exhaustive.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Four short sentences, front-loaded with the action and its two modes, then side effects, then the caveat about error measures, then the return value. Nothing is padding and nothing important is buried.

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?

Despite being a mutation-style tool with three parameters, the definition covers both operating modes, the artifacts written, the return value (output schema handles the rest), and the key caveat that no error measure accompanies a future forecast. An agent has everything it needs to call it correctly.

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 coverage is 100%, so all three parameters are already documented in depth, including the `test_size` integer/date/fraction rules and `exog_path` row ordering. The description only adds the framing that `test_size` selects the evaluate mode, which is a marginal gain over the schema; the 3 baseline 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?

Names a specific verb and resource ('Run a plan') and immediately splits it into its two distinct modes: forecasting the future versus evaluating via `test_size`. It also names sibling tools (`backtest`, `compare`) as the route for error measures, so an agent can separate this tool from those 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?

Explicitly states the condition that changes behavior ('evaluate on a test set with `test_size`') and states the important exclusion: a future forecast has no error measure, so backtest or compare the plan first. That is a concrete when-to-use-this-versus-alternatives rule, not an implied one.

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