Skip to main content
Glama

Sprout: AI Finance & Cash Flow

Compare cash flow and expenses

compare_periods
Read-onlyIdempotent

Use this when the person asks for month-over-month spending, business expense changes, income comparisons, or a change in personal or business net cash flow. Returns totals, the exact change (second minus first), and percentage change in one currency. Scope to the selected accounts. Uses posted transactions and excludes internal transfers. Requires explicit dates; unequal ranges are not normalized, so compare ranges of equal length. direction picks money in (income), money out (expense), or both (all); percentage change is null when the first total is zero. Does not calculate accounting profit or forecast future balances. For one period call get_cash_flow; for a trend across many periods, get_period_totals.

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": {
      "first": "<first>",
      "second": "<second>",
      "direction": "<direction>"
    },
    "name": "compare_periods"
  }
}

Input Schema

NameRequiredDescriptionDefault
firstYesEarlier or baseline period, inclusive dates.
secondYesPeriod to compare with the baseline, inclusive dates.
currencyNoISO currency, e.g. USD or CAD. Monetary summaries use one currency and never convert or combine currencies.
accountIdNoPersonal or business account id from list_accounts or a mention. Omit for all connected accounts; resolve the user's selected accounts first for business-only or personal-only reviews.
directionYesincome = money in, expense = money out.

Output Schema

NameRequiredDescriptionDefault
deltaYesSecond period minus first period.
firstYes
setupNoPresent when bank data is missing, syncing, failing, or out of date. Lead the answer with it.
secondYes
directionYes
percentageChangeYesPercentage change relative to the absolute first total; null when the first total is zero.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.8/5.0
Behavior5/5

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

Annotations already establish a safe read-only, idempotent, closed-world operation, and the description still adds substantive behavior: posted transactions only, internal transfers excluded, results scoped to selected accounts, single currency with no conversion, unequal ranges not normalized, and percentage change null when the first total is zero. These are exactly the details an agent cannot infer from the schema or annotations.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

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

Front-loaded with the usage trigger, then behavior, then exclusions and alternatives – a logical order with no filler. It is dense at roughly nine sentences, but nearly every clause carries distinct information; only the sentence restating return values borders on redundant given the output schema.

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?

For a nested-object, five-parameter comparison tool with an output schema, the description covers all that is missing structurally: transaction basis, transfer exclusion, currency handling, period-length caveat, division-by-zero behavior, and sibling routing. Nothing needed to call it correctly is left unstated.

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 baseline would be 3, but the description adds meaning beyond the schema: it clarifies that the change is computed second minus first, that 'all' means both money in and out, and the null-percentage edge case tied to direction and totals. The equal-length requirement for the first/second ranges is a semantic constraint the schema does not encode.

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 opens with a specific verb and resource (compare two periods of cash flow and expenses) and immediately states what is returned: totals, the exact change computed as second minus first, and percentage change. It is clearly distinguishable from get_cash_flow (one period) and get_period_totals (trend across many periods).

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

Usage Guidelines5/5

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

It gives explicit triggers (month-over-month spending, expense changes, income comparisons, net cash flow changes), names the two alternative tools with the conditions that select them, and states when-not-to-use: no accounting profit and no forecasting. The equal-length range constraint is also called out as a precondition.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.