Skip to main content
Glama

compare_periods

Compare a time series across two date ranges to report count, first, last, mean, min, max, within-period changes, and shifts in mean and last value from period A to B.

Instructions

Compare a series between two periods: count, first, last, mean, min, max and change within each period, plus the change in mean and in last value from period A to B. Purely descriptive statistics; no causal interpretation.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
frequencyNoOptional frequency conversion before comparing.
series_codeYesEVDS code such as 'TP.DK.USD.A.YTL' (requires EVDS_API_KEY; find codes with search_series) or keyless FX code 'FX:<CUR>[:<rate_type>]', e.g. 'FX:USD', 'FX:EUR:forex_selling'.
period_a_endYes
period_b_endYes
period_a_startYes
period_b_startYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYes
notesNo
sourceYes
period_aYes
period_bYes
citationsYes
series_codeYes
last_change_absYeslast(b) - last(a).
last_change_pctYes(last(b) / last(a) - 1) * 100.
mean_change_absYesmean(b) - mean(a).
mean_change_pctYes(mean(b) / mean(a) - 1) * 100.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.8/5.0
Behavior3/5

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

With no annotations, the description carries the full behavioral burden. It usefully discloses the computed output shape and disclaims causal interpretation, but is silent on auth requirements (the schema notes EVDS_API_KEY), error behavior for invalid codes, or what happens with sparse/overlapping periods.

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?

Two tight sentences, front-loaded with the core verb and resource, then the output inventory. No filler or repetition of the tool name.

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?

An output schema exists, so return-value detail is not strictly required, yet the description still enumerates the stats returned. The main gap is behavioral edge cases around malformed or overlapping periods, which the six-parameter surface would benefit from being addressed.

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 only 33% — frequency and series_code are documented, but the four date parameters are bare. The description's 'period A to B' framing gives the dates conceptual meaning (two comparison windows), which partially compensates but does not clarify handling of overlapping or reversed ranges.

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 — comparing a series across two periods — and enumerates the exact statistics returned (count, first, last, mean, min, max, and period-to-period deltas). The 'no causal interpretation' clause also separates it from the explain_move sibling.

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?

Usage is implied by the statistical framing and the contrast with causal tools, but there is no explicit when-to-use/when-not guidance or named alternative. An agent must infer that this is the descriptive-comparison tool rather than being told.

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