Skip to main content
Glama

Analyze Forecast Error

analyze_forecast_error
Read-onlyIdempotent

Quantify forecast accuracy by computing bias, MAE, RMSE, denominator-aware MAPE, error percentiles, and breakdowns by market hour and lead time for AIL, pool price, wind, solar, or combined wind/solar.

Instructions

Calculates forecast-minus-actual bias, MAE, RMSE, denominator-aware MAPE, error percentiles, and breakdowns by market hour and lead time for AIL, Pool Price, wind, solar, or combined wind/solar when the official source provides paired values.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
requestYesGeneric forecast-error request for supported actual/forecast pairs.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
seriesYes
metadataYesProvenance and semantic metadata attached to dataset responses.
warningsNo
intervalsNo
mean_errorNo
by_lead_timeNo
by_market_hourNo
error_percentilesNo
observation_countYes
mean_absolute_errorNo
missing_actual_countNo
missing_forecast_countNo
root_mean_squared_errorNo
mean_absolute_percentage_errorNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.3.0

TDQS

A4/5.0
Behavior4/5

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

Annotations already declare readOnly, idempotent, and non-destructive behavior, so the safety profile is fully covered. The description adds meaningful behavioral nuance: it computes denominator-aware MAPE (not plain MAPE) and only operates 'when the official source provides paired values', which is an operational constraint not present in annotations. There is no contradiction 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.

Conciseness5/5

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

The description is a single, information-dense sentence that front-loads the action ('Calculates') and enumerates all key metrics before the conditional caveat. Every clause earns its place with no wasted wording, and the structure is easy to parse despite the long list.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

With a full input schema, complete parameter descriptions, annotations, and an output schema present, the description is largely sufficient to understand the tool's scope and output. The only real gap is the unstated behavior when paired values are not available—the description flags the condition but does not explain what the tool would do in that case.

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 start/end timezone handling, series enum values, and the percentiles array. The description adds a natural-language mapping of the series names to supported forecast types, but does not provide deeper parameter semantics than the schema already supplies. The baseline 3 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?

The description names the exact metrics calculated (forecast-minus-actual bias, MAE, RMSE, denominator-aware MAPE, error percentiles) and the scope of supported resources (AIL, Pool Price, wind, solar, wind_solar), with a conditional qualifier. This is a specific verb+resource definition and clearly differentiates it from generic forecast/comparison tools by enumerating the analytical output.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides a clear context: use it for supported forecast/actual pairs and when the official source provides paired values, listing the series types it can handle. However, it does not name alternatives such as compare_forecast_to_actual or get_forecast, nor does it state when not to use this tool, leaving routing decisions to the agent's inference.

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