Skip to main content
Glama
ledgerlens

ledgerlens

by vovaddk

spending_breakdown

Read-only

Summarize total spending or income by category, merchant, month, or account, convert totals to a reporting currency, and filter by date, account, category, or merchant.

Instructions

Total spending (or income) grouped by category, merchant, month or account, converted to one reporting currency.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "spending_breakdown"
  }
}

Input Schema

NameRequiredDescriptionDefault
topNoMax groups returned.
monthNoCalendar month, YYYY-MM.
accountNoExact account name from list_accounts; omit for all accounts.
date_toNoInclusive end, YYYY-MM-DD.
categoryNoCategory filter. One of: groceries, restaurants, transport, fuel, utilities, telecom, subscriptions, health, shopping, electronics, entertainment, travel, education, rent, cash_withdrawal, transfers, fees, salary, other_income, uncategorized.
currencyNoReporting currency for converted totals.UAH
group_byNoGrouping key.category
merchantNoMerchant substring filter.
date_fromNoInclusive start, YYYY-MM-DD.
directionNoSum spending or income.expense

Output Schema

NameRequiredDescriptionDefault
rowsYes
notesYes
currencyYes
group_byYes
directionYes
grand_totalYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

B3.2/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 one genuinely useful behavioral fact — totals are converted to a single reporting currency — but never says which FX rates are applied (a sibling, set_fx_rate, exists) or how uncategorized/transfer rows are treated.

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?

A single sentence, front-loaded with the operation and then the grouping options; nothing is padded. It is arguably slightly too terse for a ten-parameter tool, but no words are wasted.

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 and the schema documents all ten parameters, so return values and filtering need no explanation. However, for a fairly complex aggregation with four grouping modes and currency conversion, the description leaves the interaction between month and date ranges, and the FX source, unstated.

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 description coverage is 100%, so the baseline is 3. The description's listing of grouping keys and the expense/income duality merely restates the group_by and direction enums rather than clarifying interactions such as how month and date_from/date_to combine.

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?

Names a specific aggregation (total spending/income) plus the resource and the available grouping keys, which is enough to distinguish it from a raw transaction listing. It stops short of naming siblings like monthly_summary or query_transactions to sharpen the boundary.

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 or when-not-to-use guidance; the agent must infer that this is the aggregation tool rather than a filtering tool like query_transactions. No prerequisites, no mention of how to combine it with list_accounts or set_fx_rate.

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