Skip to main content
Glama

Loan and investment calculator in exact cents, no outside

finance_loan
Read-only

Loan and investment calculator in exact cents, no outside source. mode=annuity: monthly payment, total interest and the full amortisation schedule (up to 600 months). mode=compound: future value of an initial sum plus monthly contributions. mode=npv or irr: discount or internal rate of return of a list of cashflows (up to 200, the first at time 0). Rates are percentages from 0 to 100 a year (per period for npv and irr); terms up to 50 years. Price: $0.002 per successful call, paid with x402 (USDC on Base, Solana and 10 more networks); failed calls are not charged.

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": {
      "mode": "<mode>"
    },
    "name": "finance_loan"
  }
}

Input Schema

NameRequiredDescriptionDefault
modeYesannuity (default), compound, npv or irr
rateNoAnnual rate in percent, 0 to 100 (annuity, compound); rate per period in percent for npv (-99 to 1000)
cashflowsNoComma-separated cashflows for npv and irr, e.g. -1000,300,400,500 (first at time 0)
principalNoLoan amount (annuity) or starting sum (compound), up to two decimals (optional for compound)
termYearsNoTerm in years, up to 50 (annuity, compound)
termMonthsNoTerm in months, 1 to 600, instead of termYears
contributionNoMonthly contribution for compound, up to two decimals (optional)

Output Schema

NameRequiredDescriptionDefault
modeNo
rateNo
monthsNo
sourceNo
scheduleNo
checkedAtNo
principalNo
totalPaidNo
disclaimerNo
lastPaymentNo
totalInterestNo
monthlyPaymentNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.6/5.0
Behavior5/5

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

Annotations only declare readOnlyHint and openWorldHint; the description goes well beyond them by disclosing the pricing model ($0.002 per successful call, x402/USDC settlement across Base, Solana and 10 more networks) and the fact that failed calls are not charged — critical for an agent deciding whether to retry. It also discloses hard behavioral limits: 600 months of amortisation, 200 cashflows, rates 0-100%, terms up to 50 years.

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?

The sentence is front-loaded with the core purpose and then mode-by-mode, limits, and price, with no filler. It is very densely packed with semicolon-chained clauses, which slightly hurts scannability, but every clause carries information the agent needs.

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

Completeness5/5

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

For a 7-parameter calculator with an output schema already covering return values, the description supplies everything else an agent needs: mode semantics, numeric ranges, size limits, and the payment contract for billed calls. Nothing material is left to inference.

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 description coverage is 100%, so the baseline is 3, but the description adds mode-to-parameter mapping (which of rate/principal/termYears/contribution apply to annuity vs compound vs npv/irr) and the bounds that gate failure. It does not resolve the ambiguity of termYears vs termMonths precedence or the optional-principal case for compound beyond what the schema already says.

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?

The description names a specific resource (loan and investment calculator) and enumerates the four sub-operations it performs: annuity payment/amortisation, compound future value, npv, and irr. An agent can tell exactly which financial computation this tool performs without opening the schema, and no sibling tool in the catalog overlaps with it.

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?

Usage is routed by mode: 'mode=annuity' is framed as monthly payment plus amortisation schedule, 'mode=compound' as future value with contributions, and 'mode=npv or irr' as cashflow discounting/return. That is clear selection guidance, but there are no explicit exclusions (e.g. what to do if the term exceeds 50 years or cashflows exceed 200) and no statement of when to avoid the tool.

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