Skip to main content
Glama
e-arveldaja MCP Server

e-arveldaja MCP Server

by iseppo

Book Lightyear Trades

book_lightyear_trades
Destructive

Books Lightyear stock buy/sell trades into e-arveldaja with a dry run by default; sells require a capital gains file for FIFO cost basis and gain/loss recognition.

Instructions

Book Lightyear stock Buy/Sell trades. DRY RUN by default. For sells, capital_gains_file is required for FIFO cost basis and recognized gain/loss. A USD trade with no 1:1 conversion goes through the USD pool (the USD held at Lightyear): a sell kept in USD is valued at the ECB rate and matched to its capital-gains row by exact date and time; a buy paid partly (at most one EUR→USD conversion up to 60 s before it) or fully from the pool is valued at the dealt rate for the converted part and the ECB rate for the pool part, relieves the pool at average carrying value and books the difference on fx_account. A USD→EUR conversion with no trade relieves the pool too: the conversion fee goes to fee_account, the difference between the relief and the EUR received plus fee to fx_account; with no fee and no difference it is recorded in the pool without a journal (status would_record / recorded).

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": {
      "investment_account": "<investment_account>",
      "broker_account": "<broker_account>"
    },
    "name": "book_lightyear_trades"
  }
}

Input Schema

NameRequiredDescriptionDefault
dry_runNoPreview without creating entries (default true)
file_refNoOpaque Lightyear AccountStatement file reference.
file_pathNoAccountStatement path/base64 input. Provide exactly one of file_path or file_ref.
fx_accountNoRealised FX gain/loss account for buys paid from the USD cash fund (default: auto-detect 'Kasum/kahjum valuutakursi muutustest', standard 8500).
fee_accountNoAccount for EXPENSED trade fees — every Buy and Sell fee, both the platform fee and the FX-conversion fee (default: auto-detect 'Kulu aktsiatelt ja osadelt', standard 8335). No fee is capitalized into the investment cost: Lightyear's FIFO cost basis is fee-exclusive, and RTJ 3 expenses transaction costs on assets held at fair value through profit or loss.
plan_handleNoExecution-plan handle from the reviewed dry run. Required for dry_run=false.
loss_accountNoRealized loss account, debited on a sell loss (default: auto-detect 'Kulu aktsiatelt ja osadelt', standard 8335)
skip_tickersNoComma-separated tickers to skip (default: BRICEKSP, ICSUSSDP). Pass "none" to disable; the empty string is treated as the default.
broker_accountYesBroker cash account (e.g. 1120 Lightyear konto)
gain_loss_accountNoRealized gain account, credited on a sell gain (default: auto-detect 'Tulu aktsiatelt ja osadelt', standard 8330)
lightyear_accountNoLightyear account id (e.g. CHZELUU) for the USD pool when the statement's file name does not carry it.
capital_gains_fileNoAbsolute path to Lightyear CapitalGainsStatement CSV (required for sell entries)
investment_accountYesInvestment/securities account (e.g. 1550 Finantsinvesteeringud)
broker_dimension_idNoDimension ID for broker account (accounts_dimensions_id)
capital_gains_file_refNoOpaque Lightyear capital-gains file reference; exclusive with capital_gains_file.
investment_dimension_idNoDimension ID for investment account (accounts_dimensions_id)

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changedv0.39.0
    • addedInput schema / properties / fx_account
      Added value: +{
      +  "description": "Realised FX gain/loss account for buys paid from the USD cash fund (default: auto-detect 'Kasum/kahjum valuutakursi muutustest', standard 8500).",
      +  "type": "number"
      +}
    • addedInput schema / properties / lightyear_account
      Added value: +{
      +  "description": "Lightyear account id (e.g. CHZELUU) for the USD pool when the statement's file name does not carry it.",
      +  "pattern": "^[A-Z0-9]{3,32}$",
      +  "type": "string"
      +}
  2. Changed1 schema field changedv0.29.2
    • addedInput schema / additionalProperties
      Added value: +false
  3. Addedv0.25.3
  4. Removedv0.25.2
  5. First observedv0.18.1

TDQS

B3.4/5.0
Behavior4/5

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

Annotations already declare destructiveHint=true, readOnlyHint=false, idempotentHint=false and openWorldHint=true, but the description adds substantial behavior beyond them: the dry-run-by-default safety model, the FIFO/capital-gains requirement for sells, the USD-pool valuation and fx_account booking rules, and the would_record/recorded statuses. The only notable omission is re-run/duplicate behavior, which matters for a non-idempotent, destructive booking tool.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness2/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The first two sentences are effective and front-loaded, but the last sentence is an extremely long run-on that dumps intricate FX-pool accounting mechanics (ECB rate, dealt rate, average carrying value, 60-second conversion windows) that an agent does not need in order to select or invoke the tool. This detail crowds out more relevant call guidance.

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?

For a complex, non-idempotent, destructive 16-parameter booking tool with no output schema, the description covers the dry-run/plan_handle flow and capital-gains requirement but omits prerequisites (whether the statement must be parsed first), re-run/duplicate safety, and what the dry-run output contains beyond the status field. It is adequate but leaves real operational gaps.

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 all 16 parameters are already documented, which sets the baseline at 3. The description reinforces the meaning of capital_gains_file (FIFO cost basis, gain/loss) and of the USD pool context relevant to lightyear_account, but it says nothing about skip_tickers, the dimension IDs, or the file_ref/file_path exclusivity rules.

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?

The description opens with a specific verb+resource: 'Book Lightyear stock Buy/Sell trades', which is clearly distinct from sibling tools like parse_lightyear_statement, parse_lightyear_capital_gains, book_lightyear_distributions and book_lightyear_fx_revaluation. It does not explicitly name those siblings, so differentiation relies partly on the tool name rather than on the prose.

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?

It states the dry-run default and that capital_gains_file is required for sells, which tells the agent preconditions for some inputs. However it never says when to choose this tool over the sibling Lightyear tools, nor what the workflow is (e.g. parse first, review dry run, then re-run with plan_handle).

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