Skip to main content
Glama

Octobooks

Add, change and repay loans

loan
Destructive

Loans taken and given, with their repayment schedule (round 607). action=add creates a loan from the fields of the agreement and proposes its drawdown (book_drawdown=false where the drawdown is booked already); the schedule of principal and interest follows from the terms. action=change with loan_id and the fields to change (a new rate makes the planned repayments again). action=post with payment_id proposes one row of the schedule now. action=match with bank_line_id and payment_id posts a repayment from its bank line (the interest as the bank took it) and matches the line on release. action=early with loan_id, amount, date and keep (term or payment) records an early repayment. action=repay with loan_id, amount (principal), interest and date records a repayment of an open loan. action=delete with loan_id. A row in state held is a repayment dated before the schedule was added that may be booked by hand: action=resolve with payment_id and how=booked (journal_id one of the row's held_entries, or none: paid, no entry) or how=post (bank_line_id its bank line, or none). Each month end accrues the interest to that day, reversed on the 1st, from the drawdown on. Every entry is released as the owner's switches say. loan: {lender (or borrower), kind (bank_loan, other_loan, directors_loan), direction (borrowed, the default, or lent), principal, start (drawdown date YYYY-MM-DD), rate (interest % a year), repayment (annuity, fixed_principal, interest_only, open, or rolled_up: the interest added to the loan at each month end, repaid at the end of the term; action=draw with loan_id, amount, date and loan {fees, fees_account, paid_to} records a further drawdown), fees (taken off the advance), fees_account, paid_to (the account the advance went to; left out: the bank), term_months, every_months (1, 3, 6 or 12), first_payment (date; or repayment_day, the day of the month), day_count (30/360, act/365, act/360 or month: a twelfth of the yearly rate per month), reference, bank_account, loan_account, interest_account (account codes; left out: the chart's own), post_mode (bank: a repayment posts when its bank line comes in, at most 5 days late then on its own; date: on its due date), document_id (the uploaded agreement), currency (round 860: a loan in its own currency, drawn and repaid through a bank account held in it; the entries at the day's rate)}

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": {
      "action": "<action>"
    },
    "name": "loan"
  }
}

Input Schema

NameRequiredDescriptionDefault
howNo
dateNo
keepNo
loanNo
actionYes
amountNo
reasonNo
companyNo
loan_idNo
interestNo
journal_idNo
payment_idNo
bank_line_idNo
book_drawdownNo

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • addedInput schema / properties / how
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "title": "How"
      +}
    • addedInput schema / properties / journal_id
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "integer"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "title": "Journal Id"
      +}
  2. First observed

TDQS

A4.1/5.0
Behavior4/5

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

Annotations already declare a destructive, non-idempotent write, and the description adds real behavior beyond them: month-end interest accrual reversed on the 1st from the drawdown date, post_mode 'bank' reposting a repayment at most 5 days late and then on its own, entries released only as the owner's switches allow, and the held-state repayment that must be resolved by hand. It still does not say what action=delete removes (the loan only, or its schedule and released entries), which is the one destructive consequence an agent most needs.

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

Conciseness3/5

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

Almost every clause carries unique information, so length is defensible for eight plus actions and fourteen parameters, but it is delivered as a single undifferentiated paragraph of parenthetical asides. A per-action line breakdown would let an agent find the relevant sentence without parsing the whole block.

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?

An output schema exists, so return values need not be described, and the description covers action selection, the loan field vocabulary, accrual and posting timing, and the held-state exception path. What is missing is narrow: the 'company' and 'reason' inputs and the blast radius of action=delete.

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

Parameters5/5

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

With 14 parameters and 0% schema description coverage, the description carries the full burden and largely does so: it names the required identifiers per action, enumerates the loan object fields (lender/borrower, kind, direction, principal, start, rate, repayment, fees, fees_account, paid_to, term_months, every_months, first_payment, day_count, post_mode, document_id, currency) with defaults and allowed values, and clarifies book_drawdown and the how values. Only 'company' and 'reason' are left unexplained, which is a small residual gap against an otherwise exhaustive field reference.

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 opening clause 'Loans taken and given, with their repayment schedule' plus the title 'Add, change and repay loans' gives a concrete verb set and resource, and the action dispatch (add/change/post/match/early/repay/delete/resolve/draw) makes the scope explicit. It never distinguishes itself from the sibling loan_list, so an agent could not tell from this text alone which one to use for a read-only listing.

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?

Each action is tied to the situation that selects it and to its required identifiers ('action=match with bank_line_id and payment_id posts a repayment from its bank line', 'A row in state held ... action=resolve with payment_id and how=booked ... or how=post'), which is effectively a decision table for intra-tool routing. There is no when-not-to-use guidance and no routing to sibling tools such as release or loan_list.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources