Skip to main content
Glama
eil-mcp

eil-mcp

Official

compare_periods

Read-onlyIdempotent

Compare total spend across two date ranges, optionally for one category, and get both totals plus the USD and percent change. Use it to avoid manual difference calculations.

Instructions

Compare total spend between two date ranges (period A = baseline, period B = comparison), optionally for one category. Returns both totals, the change in USD and the change in percent, all computed deterministically. Use this instead of calculating differences yourself.

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": {
      "period_a_start": "<period_a_start>",
      "period_a_end": "<period_a_end>",
      "period_b_start": "<period_b_start>",
      "period_b_end": "<period_b_end>"
    },
    "name": "compare_periods"
  }
}

Input Schema

NameRequiredDescriptionDefault
categoryNoExact category name, case-insensitive
period_a_endYesYYYY-MM-DD
period_b_endYesYYYY-MM-DD
period_a_startYesYYYY-MM-DD
period_b_startYesYYYY-MM-DD

Output Schema

NameRequiredDescriptionDefault
sourceNofinance.expenses
categoryYes
currencyNoUSD
period_aYes
period_bYes
change_pctYes100 * change / period_a total, 2 dp; null if period_a is 0
change_amountYesperiod_b total minus period_a total
metric_versionNofinance-metrics/1

Schema Changelog

Changes observed during successful MCP inspections.

  1. 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 already declare readOnly, idempotent, non-destructive, closed-world behavior, so the safety profile is covered. The description adds meaningful context beyond that: the results are computed deterministically and include both raw totals plus absolute and percentage deltas, which reassures an agent about reproducibility. No auth, limits, or edge-case behavior is discussed, keeping it from a 5.

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 no filler; the core comparison is front-loaded, the output contents follow, and the usage note closes it. Every clause carries information.

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?

With an output schema present, the description need not detail return shapes, and it still names the key outputs. Annotations cover safety, the schema covers all five parameters, and the description covers period roles and computation semantics — nothing an agent needs is missing.

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

Parameters4/5

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

Schema coverage is 100%, so the baseline is 3, but the description adds semantic meaning the schema lacks: which period is the baseline versus the comparison, and that the category filter is optional and singular. That role assignment matters for interpreting the sign of the delta, so it earns above baseline.

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 states a specific verb and resource ("Compare total spend between two date ranges") and defines exactly what the comparison produces: both totals, USD change, and percent change. It also assigns semantics to each period (A = baseline, B = comparison), so an agent can tell it apart from trend or summary tools without opening the schema.

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

Usage Guidelines4/5

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

It gives a clear usage directive — "Use this instead of calculating differences yourself" — which tells the agent when this tool is preferred over manual arithmetic. It stops short of naming when not to use it or routing to a specific sibling, so it is clear context without explicit exclusions.

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