Skip to main content
Glama
e-arveldaja MCP Server

e-arveldaja MCP Server

by iseppo

Compute Account Balance

compute_account_balance
Read-onlyIdempotent

Calculate account balances from journal postings with optional client, dimension, and date filters. Use date ranges for opening, period, and closing balances, or group totals by client.

Instructions

Compute account balance from journal postings with optional client/dimension/date filters. With date_from, balance / debit_total / credit_total are the period figures; opening_balance_at_date_from, period_net and closing_balance give the balance before the window and at its end. group_by: "client" adds per-client rows (journal header client; journals without one form a clients_id null row).

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": {
      "account_id": "<account_id>"
    },
    "name": "compute_account_balance"
  }
}

Input Schema

NameRequiredDescriptionDefault
freshNoClear cached API/reference data first.
date_toNoEnd date (YYYY-MM-DD)
group_byNo"client": also return per-client rows (by journal header client) next to the unchanged totals. Not combinable with clients_id.
date_fromNoStart date (YYYY-MM-DD)
account_idYesAccount id from list_accounts. In the RIK chart the id is the account number itself (e.g. 2110, 8900).
clients_idNoFilter by client ID
include_entriesNoInclude individual entries in response (default false)
accounts_dimensions_idNoFilter to one dimension (sub-account) of the account, e.g. the Wise dimension of 1020. Dimension id from list_account_dimensions; must belong to account_id.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.39.0
    • addedInput schema / properties / group_by
      Added value: +{
      +  "description": "\"client\": also return per-client rows (by journal header client) next to the unchanged totals. Not combinable with clients_id.",
      +  "enum": [
      +    "client"
      +  ],
      +  "type": "string"
      +}
  2. Changed2 schema fields changedv0.29.2
    • addedInput schema / additionalProperties
      Added value: +false
    • addedInput schema / properties / accounts_dimensions_id
      Added value: +{
      +  "description": "Filter to one dimension (sub-account) of the account, e.g. the Wise dimension of 1020. Dimension id from list_account_dimensions; must belong to account_id.",
      +  "exclusiveMinimum": 0,
      +  "maximum": 9007199254740991,
      +  "type": "integer"
      +}
  3. Addedv0.25.3
  4. Removedv0.25.2
  5. First observedv0.18.1

TDQS

A3.8/5.0
Behavior4/5

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

Annotations already cover safety (readOnlyHint, idempotentHint, destructiveHint=false, openWorldHint=false), so the description's contribution is the return-shape disclosure: which fields are period figures versus opening/closing balances, and the group_by null-client edge case. Not covered: that `balance` without date_from is cumulative from inception, and nothing on cost of the `fresh` cache clear. Still a meaningful lift beyond the annotations.

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?

Three sentences, front-loaded with the action and scope, then the window semantics, then the group_by exception. Every clause carries information that is not duplicated from the schema, and backticked field names keep it scannable.

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

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

With no output schema and 8 parameters, the description rightly spends its words on return semantics and the group_by edge case, which is the main thing an agent could get wrong. It is not fully complete: `include_entries` output is undisclosed and the result container (single object vs rows) is left implicit.

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 does add real semantics for date_from by explaining how it reinterprets balance/debit_total/credit_total as period figures and introduces opening_balance_at_date_from and period_net — meaning the schema's bare "Start date" does not carry. That is marginal added value on top of an already-complete schema, not a rewrite of it.

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 and resource ("Compute account balance from journal postings") plus the filter scope, which is enough to distinguish it from list-based siblings. It never names the closest relatives (compute_trial_balance, compute_account_dimension_balances, compute_client_debt), so an agent must infer the boundary itself rather than being told.

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 only implied through conditionals: "with optional client/dimension/date filters" and "With date_from ... period figures" tell the agent what each mode does, so it can reason about when to reach for it. There is no explicit when-to-use, when-not-to-use, or named alternative, and no prerequisite guidance despite siblings like compute_account_dimension_balances covering overlapping ground.

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

Deploy Server

Other Tools