Skip to main content
Glama
ledgerlens

ledgerlens

by vovaddk

query_transactions

Read-only

Find and filter transactions by date, account, category, merchant, or amount; totals reflect all matches even when results are paginated.

Instructions

Find transactions by date, account, category, merchant and amount.

Totals in the result cover every matching row even when the page is truncated.

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": "query_transactions"
  }
}

Input Schema

NameRequiredDescriptionDefault
sortNoamount_desc lists the biggest outflows first.date_desc
limitNoRows to return.
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.
merchantNoCase-insensitive substring of merchant/description.
date_fromNoInclusive start, YYYY-MM-DD.
directionNoMoney out, in, or both.any
max_amountNoMaximum absolute amount, account currency.
min_amountNoMinimum absolute amount, account currency.

Output Schema

NameRequiredDescriptionDefault
returnedYes
truncatedYes
transactionsYes
total_matchingYes
totals_by_currencyYesTotals over ALL matching rows (not only the returned page), per account currency.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

B3.4/5.0
Behavior3/5

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

Annotations already cover the safety profile (readOnlyHint=true, openWorldHint=false), and the description adds one genuinely useful behavior: totals reflect every matching row even when the page is truncated. However, this statement is muddy (it reads as ambiguous about what 'the page' refers to), and nothing is said about result ordering guarantees, empty-result behavior, or whether filters combine with AND.

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?

Two short sentences, front-loaded with purpose, second sentence delivering the one non-obvious behavioral fact. No filler, though the second sentence could be sharpened for precision.

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 parameter surface is fully documented in the schema, so the description need not cover return fields. Still, for an 11-parameter filter tool, it leaves open whether filters are AND-combined, what happens with no filters at all, and how totals relate to the returned page.

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 coverage is 100%, including enum values, formats (YYYY-MM-DD, YYYY-MM), and sensible defaults, so the schema carries the parameter semantics. The description only restates the filter dimensions and adds no interpretation beyond the schema.

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?

Specific verb plus resource ("Find transactions") and it enumerates the filter dimensions (date, account, category, merchant, amount). It does not name a sibling or explicitly separate itself from aggregation tools like spending_breakdown or monthly_summary, so it falls short of a 5.

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?

The description implies usage by describing filtering, but never says when to reach for this versus spending_breakdown, monthly_summary, or detect_anomalies. No exclusions, prerequisites, or 'use X instead when' guidance is given.

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