Skip to main content
Glama
ledgerlens

ledgerlens

by vovaddk

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
LEDGERLENS_DBNoSQLite database path.~/.ledgerlens/ledgerlens.db
LEDGERLENS_LLMNo`off` never calls the LLM from the server.on
LEDGERLENS_RULESNoExtra rules file, tried before the built-in rules.
ANTHROPIC_API_KEYNoCategorization fallback and the live eval. `ant auth login` profiles work too.
LEDGERLENS_EVAL_MODELNoAgent model for the live eval.claude-opus-5-5
LEDGERLENS_IMPORT_DIRNoIf set, `import_statement` only reads files inside this folder.
LEDGERLENS_JUDGE_MODELNoJudge model for free-text answers.claude-sonnet-5-5
LEDGERLENS_CATEGORIZER_MODELNoModel for the categorization fallback.claude-haiku-5-5

Instructions

Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.

LedgerLens answers questions about the user's bank statements stored locally.

  • Amounts are signed: negative = money spent, positive = money received. Tool outputs that say "spent"/"expenses" report spending as positive numbers.

  • For totals use spending_breakdown or monthly_summary; query_transactions returns one page of rows plus totals over ALL matching rows (see totals_by_currency).

  • Accounts can be in UAH, USD or EUR. Cross-account totals are converted with monthly reference rates; pass currency to choose the reporting currency.

  • Months are written YYYY-MM. Use list_accounts first to see which dates have data.

  • Category corrections made with set_category stick across re-imports.

Capabilities

Features and capabilities supported by this server

Protocol revision2025-11-25

CapabilityDetails
tools
{
  "listChanged": false
}
prompts
{
  "listChanged": false
}
resources
{
  "subscribe": false,
  "listChanged": false
}

Tools

Functions exposed to the LLM to take actions

NameDescription
import_statementA

Import a bank-statement CSV. Re-importing the same file adds no duplicates.

list_accountsA

List imported accounts with currency, row counts and covered date range.

query_transactionsB

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

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

spending_breakdownB

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

monthly_summaryB

Income, expenses, net, savings rate, category split and top merchants for a month, across all accounts, with the change versus the previous month.

categorize_transactionsA

Categorize transactions: user corrections first, then rules, then cached LLM answers, then the LLM fallback for unknown merchants. Never overrides corrections.

set_categoryA

Correct a category. Merchant-level corrections apply to past and future imports.

budget_statusA

Spending versus monthly budget limits, with status ok / warning (>=80%) / over and a month-end projection for months still in progress.

set_budgetB

Create, change or remove (limit 0) a monthly budget for a category.

detect_recurringA

Find subscriptions and other recurring charges, their cadence, monthly cost, next expected date and whether they still look active.

detect_anomaliesB

Flag unusually large purchases and months where a category spiked.

convert_currencyB

Convert between UAH, USD and EUR with the stored monthly reference rate (latest month when omitted).

set_fx_rateA

Store a manual monthly reference rate; it is never overwritten by imports.

Prompts

Interactive templates invoked by user choice

NameDescription
monthly_reviewReview one month of spending and suggest where to cut.
subscription_auditList recurring charges and flag ones worth cancelling.
budget_planPropose monthly budgets that reach a savings goal.

Resources

Contextual data attached and managed by the client

NameDescription
overviewAccounts, data range and categorization coverage.
categoriesThe category taxonomy with descriptions.
budgetsConfigured monthly budgets.
formatsSupported statement formats and the generic mapping keys.

TDQS

A3.7/5.0

Scored across 13 tools

Disambiguation4/5

Most tools have clearly distinct purposes: querying raw transactions, importing statements, categorizing, budgeting, recurring detection, anomalies, and FX rates are separable. The main overlap is between spending_breakdown and monthly_summary, which both aggregate spending by category/month, though their descriptions distinguish report scope and depth.

Naming Consistency4/5

All names use consistent snake_case, and most are action-oriented verb_noun names such as query_transactions, set_budget, and convert_currency. A few report-style names like spending_breakdown, monthly_summary, and budget_status break the verb_noun pattern, but the overall convention remains readable and predictable.

Tool Count5/5

The 13 tools are well-scoped for a personal-finance ledger server. Each tool covers a meaningful operation across imports, reporting, categorization, budgets, recurring charges, anomalies, and currency handling.

Completeness4/5

The surface covers the core finance lifecycle well: import, query, categorize, summarize, budget, detect recurring/anomalous activity, and handle currency. Minor gaps remain around editing or deleting individual transactions and managing accounts beyond listing imported ones.