Skip to main content
Glama

Compare two periods

compare_periods
Read-only

Compares every KPI across two periods side by side, showing percent change and improved/worse/flat status; defaults to the selected period versus the equal-length period before it.

Instructions

Every KPI side by side for two periods with % change and improved/worse/flat. Defaults to the chosen period vs. the equal-length period before it, e.g. this quarter vs. last.

Input Schema

NameRequiredDescriptionDefault
periodNoTime window: last_30_days, last_90_days (default), this_month, last_month, this_quarter, last_quarter, year_to_date, all, YYYY-MM, or YYYY-MM-DD..YYYY-MM-DD
serviceNoLimit to one service/component, e.g. 'checkout'
baselineNoBaseline window (default: the equal-length period immediately before)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A3.6/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=true and openWorldHint=false, so the safety profile is covered. The description adds real value by disclosing the output shape (side-by-side KPIs, % change, improved/worse/flat labels) and the default baseline behavior, though it says nothing about volume, pagination, or what happens with 'all'.

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 with zero filler; the comparison semantics come first and the default behavior second. Nothing is repeated or padded.

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 no output schema, the description carries the return-value burden and does so adequately by naming the output contents. For a three-optional-parameter read tool this is nearly sufficient, with only minor gaps around result volume and edge cases like the 'all' period.

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% and each parameter is documented in the schema, so the baseline is 3. The description's only addition is the 'e.g. this quarter vs. last' illustration of baseline derivation, which largely restates the schema's own default note.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific resource (every KPI side by side) and the transformation applied (% change with improved/worse/flat), which is enough to distinguish it from a single-series trend tool like get_kpi_trend. It stops short of naming any sibling explicitly, so the differentiation is inferred rather than stated.

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 explains the default comparison behavior ('the chosen period vs. the equal-length period before it') and gives an example, which implies when this tool is appropriate. It never states when to prefer it over get_kpi_trend or get_dora_metrics, nor any exclusions, so usage is only implied.

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