Skip to main content
Glama
e-arveldaja MCP Server

e-arveldaja MCP Server

by iseppo

Compute Account Balances by Dimension

compute_account_dimension_balances
Read-onlyIdempotent

Breaks an account balance down by dimension or client, returning per-group rows with totals, opening balances, and closing balances for a date range.

Instructions

Break an account's balance down per dimension (e.g. each bank sub-account of 1020 Arvelduskontod: LHV, Wise, Lightyear), including API INITIAL opening balances. Returns one row per dimension plus a total that equals compute_account_balance for the same account. group_by "client" or "dimension_client" splits by journal header client instead (e.g. the borrowers of a shared loan account; journals without a client form a clients_id null row). With date_from, each row and the account also carry opening_balance_at_date_from and closing_balance.

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_dimension_balances"
  }
}

Input Schema

NameRequiredDescriptionDefault
freshNoClear cached API/reference data first.
date_toNoEnd date (YYYY-MM-DD)
group_byNoRow grouping: "dimension" (default), "client" (journal header client) or "dimension_client".
date_fromNoStart date (YYYY-MM-DD)
account_idYesAccount id (e.g. 1020). Required. In the RIK chart the id is the account number.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.39.0
    • addedInput schema / properties / group_by
      Added value: +{
      +  "description": "Row grouping: \"dimension\" (default), \"client\" (journal header client) or \"dimension_client\".",
      +  "enum": [
      +    "dimension",
      +    "client",
      +    "dimension_client"
      +  ],
      +  "type": "string"
      +}
  2. Changed1 schema field changedv0.29.2
    • addedInput schema / additionalProperties
      Added value: +false
  3. Addedv0.25.3

TDQS

A4.3/5.0
Behavior4/5

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

Annotations already declare read-only, idempotent, non-destructive behavior, so the description correctly spends its space on output semantics: one row per dimension plus a total, opening balances included, and the extra opening_balance_at_date_from / closing_balance fields appearing when date_from is set. It does not cover caching or the effect of the fresh flag beyond what the schema already states.

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?

Front-loads the core action and example before the grouping and date variants, and every clause carries information. The prose is dense and slightly long-winded in the parenthetical examples, but nothing is redundant.

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, the description carries the burden of describing the return shape and does so adequately (row-per-dimension plus total, extra date-scoped fields). Remaining gaps are minor: no mention of cache/fresh interaction or error conditions for an invalid account_id.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so baseline is 3, but the description adds real meaning on top: it explains what 'client' grouping means mechanically (journal header client) and that clientless journals produce a null row, and it documents the conditional output effect of date_from. The fresh parameter is left entirely to the schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb and resource ('Break an account's balance down per dimension') and grounds it with a concrete chart example (1020 Arvelduskontod: LHV, Wise, Lightyear). It also explicitly distinguishes itself from the sibling compute_account_balance by noting the total row equals that tool's output.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Gives clear context for the group_by choice ('client' vs 'dimension_client' split by journal header client, with a null clients_id row when no client exists) and explains the effect of supplying date_from. It stops short of an explicit 'use compute_account_balance instead when you only need the account total', leaving that routing to inference.

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