Skip to main content
Glama

ynab_analyze_spending

Read-onlyIdempotent

Calculates income, spending, and net totals for an inclusive date range, grouped by category, payee, account, week, or month, using the complete period for accurate aggregation.

Instructions

Deterministically calculate income, spending, and net totals for an inclusive date range, grouped by category, payee, account, week, or month. Aggregates always use the complete fetched period before grouping.

Input Schema

NameRequiredDescriptionDefault
group_byYes
budget_idNo
since_dateYes
until_dateYes
include_transfersNo

Output Schema

NameRequiredDescriptionDefault
cachedYes
groupsYes
periodYes
totalsYes
group_byYes
used_deltaYes
excluded_transfer_countYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changedv0.32.0
    • addedInput schema / properties / since_date / format
      Added value: +"date"
    • addedInput schema / properties / until_date / format
      Added value: +"date"
  2. Addedv0.27.1

TDQS

A3.7/5.0
Behavior4/5

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

Annotations already declare readOnly, idempotent, non-destructive and openWorld, so the safety profile is covered. The description adds real behavior beyond that: results are deterministic, the date range is inclusive, and aggregation happens over the complete fetched period before grouping, which warns the agent that grouping will not silently truncate or bias totals. It still says nothing about how include_transfers affects the totals.

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, no filler, with the core calculation and grouping dimensions front-loaded ahead of the aggregation caveat. Every clause carries information an agent can act on.

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

Completeness3/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 shape need not be described, and the aggregation semantics are well covered. However, for a five-parameter analytical tool with zero schema coverage, the undefined include_transfers and budget_id behavior and the absence of routing against sibling tools leave meaningful gaps.

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?

With schema description coverage at 0%, the description must carry parameter meaning, and it only partly does: it enumerates the group_by values and clarifies that since_date/until_date are inclusive. budget_id and include_transfers (notably whether transfers are counted as spending) are never explained, leaving two of five parameters undefined anywhere.

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 verb (calculate) and resource (income, spending, net totals) plus the grouping dimensions, which clearly separates it from raw-listing siblings like ynab_list_transactions. It never names or contrasts itself with ynab_compare_spending_periods or ynab_export_transactions, so the boundary with the closest analytical siblings is left to inference.

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 wording 'calculate ... totals ... grouped by', which signals a reporting/aggregation task rather than a read-one-record or mutation task. There is no explicit when-to-use, no when-not-to-use, and no pointer to the alternative tools (compare_spending_periods, export_transactions) an agent would have to choose between.

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