Skip to main content
Glama

Custom Solutions

Mortgage payment

compute_mortgage_payment
Read-onlyIdempotent

Monthly principal and interest on a loan, the payment in year 1 when the loan starts interest-only, the debt service over the first 12 months and per year, and the cost of points. Payment figures differ with compounding and with how interest-only months are handled: this engine compounds monthly, pays at the end of each month and, after an interest-only period, amortizes over the full term as the Analyzer workbook does; each convention is stated in the answer. Send loan_amount, rate_pct (7.25 means 7.25% a year) and amort_years (0 means interest-only); optionally io_months and points_pct. A rate over 30% a year is refused as a likely typo.

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": {
      "loan_amount": "<loan_amount>",
      "rate_pct": "<rate_pct>",
      "amort_years": "<amort_years>"
    },
    "name": "compute_mortgage_payment"
  }
}

Input Schema

NameRequiredDescriptionDefault
rate_pctYesInterest rate in percent per year, e.g. 7.25
io_monthsNoInterest-only months at the start, e.g. 12
points_pctNoPoints as a percent of the loan, e.g. 1
amort_yearsYesAmortization in years, e.g. 30; 0 means interest-only
loan_amountYesLoan amount in dollars, e.g. 300000

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A3.8/5.0
Behavior4/5

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

Annotations already establish read-only, idempotent, closed-world behavior, so the safety profile is covered. The description adds substantive conventions beyond that: monthly compounding, end-of-month payments, amortization over the full term after an interest-only period, that conventions are echoed in the answer, and a hard guard rejecting rates over 30%.

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?

Output coverage is front-loaded in a single enumerating sentence, followed by the convention/guard sentence, so the reader gets the payload first. The opening sentence is a run-on list and could be split, but no sentence is filler.

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?

There is no output schema, so the description must enumerate return values, and it does (four output figures plus the reported conventions). Inputs, defaults, guardrails, and return shape are all present; only the sibling-selection question is unaddressed.

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 the baseline is 3. The description still earns credit by resolving the interaction the schema leaves implicit: amort_years=0 combined with io_months means interest-only, and post-IO amortization spans the full term, which changes how the two parameters must be set together.

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 first sentence names concrete outputs (monthly P&I, year-1 payment under interest-only, 12-month and annual debt service, points cost), so the resource and computation are unambiguous. It does not explicitly differentiate itself from the sibling compute_amortization, which is the one gap keeping it off a 5.

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 tells the agent exactly which inputs to send and notes the 30% rate refusal, which is useful invocation context. It gives no when-to-use guidance relative to compute_amortization or other financing tools, so an agent choosing between sibling calculators gets no routing help.

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