Skip to main content
Glama

compare_periods

Compare two date ranges and see metric changes between them, including B-minus-A differences in absolute values and percentages. Use it for week-over-week or baseline comparisons.

Instructions

Compare two periods (e.g. this week vs last week). change_b_vs_a is B minus A, absolute and in %.

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": {
      "a_start": "<a_start>",
      "a_end": "<a_end>",
      "b_start": "<b_start>",
      "b_end": "<b_end>"
    },
    "name": "compare_periods"
  }
}

Input Schema

NameRequiredDescriptionDefault
a_endYes
b_endYes
a_startYes
b_startYes

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

B3/5.0
Behavior3/5

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

With no annotations at all, the description carries the full burden; it does disclose one genuine behavioral trait beyond structure — the direction convention that `change_b_vs_a` is B minus A in both absolute and percentage terms. It says nothing about date format expectations, timezone handling, whether periods must be equal length, or any limits, which are material for a date-range comparison tool.

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 short sentences with the core purpose first and the output sign convention second; there is no filler, hedging, or redundant restatement of the tool name.

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

Completeness2/5

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

For a four-required-parameter tool with zero schema description coverage and no annotations, the description is thin: it omits date format, timezone, equal-length constraints, and which metrics are compared. The existing output schema relieves it of explaining return values, but the input-side gaps remain significant.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0% and the four required parameters carry only bare titles ('A Start', 'A End', 'B Start', 'B End'). The description partially compensates by establishing that B is the later/current period and A the baseline, but it never specifies the accepted date string format or whether ranges must be equal-length, leaving most parameter semantics ambiguous.

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?

Uses a specific verb plus resource ('Compare two periods') and gives a concrete illustrative example (this week vs last week), so the operation is immediately understandable. It stops short of naming how it differs from siblings such as get_range_summary or get_timeseries, so it is clear but not fully differentiated.

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

Usage Guidelines2/5

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

There is no explicit when-to-use guidance: nothing says when a two-period comparison is preferable to calling get_range_summary twice or using run_sql. The example implies a comparison scenario but offers no exclusions or alternative selection criteria.

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