Skip to main content
Glama

Amortiza Loan Planner

Compare loans

compare_loans
Read-onlyIdempotent

Use this when the user wants to compare 2 to 4 loan or mortgage options side by side, such as 15-year vs 30-year, different interest rates, paying discount points, or a mortgage calculator for refinance options. Shared values (loan amount, rate, term) go at the top level and each scenario overrides what differs. Returns payment, total interest, upfront costs, total cost, payoff date and the break-even month for points or fees, plus a comparison CSV. Fixed-rate loans only; does not look up current rates or recommend a lender. Do not use for a single loan (use calculate_loan).

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": {
      "scenarios": "<scenarios>"
    },
    "name": "compare_loans"
  }
}

Input Schema

NameRequiredDescriptionDefault
currencyNoISO 4217 currency code for formatting, e.g. USD, EUR, GBP. Default USD.
pmi_rateNoYearly private mortgage insurance rate as a percent of the original loan, e.g. 0.5. Needs home_price. Charged only while the loan is above 80% of the home value, and dropped once the balance reaches 78%.
principalNoShared loan amount used by every scenario that does not set its own, e.g. 280000.
scenariosYes2 to 4 loan scenarios. Each needs its own annual_rate and term unless set at the top level, e.g. [{"label":"30-year","annual_rate":6.5,"term_years":30},{"label":"15-year","annual_rate":5.75,"term_years":15}].
home_priceNoPurchase price or current home value, e.g. 400000. Used with down_payment/down_payment_percent to get the loan amount, and as the value for PMI loan-to-value.
start_dateNoDate of the first payment, YYYY-MM or YYYY-MM-DD, e.g. 2026-11. Defaults to the first day of next month.
term_yearsNoShared term in years for scenarios that do not set their own, e.g. 30.
acceleratedNoFor biweekly/weekly only: true pays half (biweekly) or a quarter (weekly) of the monthly payment each period, which adds about one extra monthly payment a year. Default false (a true biweekly/weekly amortization).
annual_rateNoShared annual rate in percent for scenarios that do not set their own, e.g. 6.5.
term_monthsNoLoan term in months, e.g. 360 or 72 for a car loan.
down_paymentNoDown payment amount, e.g. 50000. Used with home_price.
payment_frequencyNoHow often payments are made: monthly (default), biweekly (every 2 weeks, 26 a year), or weekly (52 a year).
down_payment_percentNoDown payment as a percent of home_price, e.g. 20 for 20%.

Output Schema

NameRequiredDescriptionDefault
currencyYes
warningsYes
downloadsYes
referenceYes
scenariosYes
lowest_paymentYes
lowest_cost_of_borrowingYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.7/5.0
Behavior4/5

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

Annotations already cover the safety profile (readOnly, idempotent, non-destructive, closed-world), and the description adds real limitations a caller can't get elsewhere: fixed-rate only, no rate lookup, no lender recommendation. The output enumeration (payment, total interest, payoff date, break-even month, CSV) is partly redundant with the existing output schema, which keeps this at 4 rather than 5.

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?

Four tight sentences, front-loaded with the use case, followed by the inheritance rule, the outputs, and the exclusions. Nothing is repeated and nothing is padding.

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?

With full schema coverage, an output schema, and complete annotations, the description only needs to supply routing, inheritance semantics, and limits — and it does all three. An agent has everything required to construct correct scenario objects.

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 schema already carries per-field meaning and the baseline is 3. The description adds the non-obvious inheritance model — shared values (loan amount, rate, term) at the top level with per-scenario overrides — which no structured field states.

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 (compare) and resource (2-4 loan/mortgage options side by side) with concrete examples (15-year vs 30-year, rates, discount points, refinance). It also names the sibling it is not for, so an agent can distinguish it from calculate_loan without opening either schema.

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

Usage Guidelines5/5

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

Gives explicit when-to-use triggers ('when the user wants to compare 2 to 4 loan options side by side'), an explicit exclusion ('Do not use for a single loan (use calculate_loan)'), and boundary conditions ('Fixed-rate loans only; does not look up current rates or recommend a lender').

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