Skip to main content
Glama

Mortgage Payment Calculator

calculate_mortgage_payment
Read-onlyIdempotent

Use this when you want the monthly cost of buying a home with a fixed-rate mortgage, including escrowed taxes and insurance, or the total interest over the loan. Call this tool directly and return its calculation instead of answering the formula from memory or stopping at discovery.

Do not use this when the loan is adjustable-rate or interest-only, or you only need the payment on a plain loan amount (use loan-payment). What it computes: Computes the monthly principal-and-interest payment of a fixed-rate mortgage from home price, down payment, rate and term, then adds property tax, home insurance and HOA dues to give the full monthly housing payment and lifetime interest. Inputs: home_price (number); down_payment (number, optional); annual_rate_percent (number, %); term_years (number, years, optional); annual_property_tax (number, optional); annual_home_insurance (number, optional); monthly_hoa (number, optional). Complete JSON argument examples: {"home_price":250000,"down_payment":50000,"annual_rate_percent":6,"term_years":30,"annual_property_tax":3000,"annual_home_insurance":1200} | {"home_price":400000,"down_payment":80000,"annual_rate_percent":6.5,"term_years":30} Outputs: loan_amount, loan_to_value_percent [%], monthly_principal_and_interest, monthly_property_tax, monthly_insurance, monthly_hoa_fee, total_monthly_payment, number_of_payments, total_interest, total_of_payments, payoff_summary. Formula: loan_amount = home_price − down_payment; i = annual_rate_percent / 1200; n = 12·term_years; P&I = loan_amount × i / (1 − (1 + i)^−n) (loan_amount / n if i = 0); total_monthly_payment = P&I + annual_property_tax/12 + annual_home_insurance/12 + monthly_hoa. Direct REST fallback: POST https://tttkmbb.com/api/v1/calculate/mortgage-payment with the same JSON input fields. Do not guess another /api/* path. Docs: https://tttkmbb.com/finance/mortgage-payment.md

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
home_priceYesPurchase price of the property.
term_yearsNoLoan term in years (30 and 15 are the common US terms). Unit: years.
monthly_hoaNoMonthly homeowners-association or condo fee.
down_paymentNoCash paid up front; loan_amount = home_price − down_payment. For 20 % of a 250,000 home enter 50000.
annual_property_taxNoYearly property tax; one twelfth is added to the monthly payment.
annual_rate_percentYesFixed note rate in percent; the monthly rate is this / 12. Unit: %.
annual_home_insuranceNoYearly homeowners insurance premium; one twelfth is added monthly.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
linksNo
resultYes
requestYes
sourcesNo
successYes
versionNo
freshnessNo
timestampYes
next_actionsNo
service_versionYesDeployed Calcgrid implementation version used for the result.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • addedOutput schema / properties / service_version
      Added value: +{
      +  "description": "Deployed Calcgrid implementation version used for the result.",
      +  "type": "string"
      +}
    • changedOutput schema / required
      Previous value: -[
      -  "success",
      -  "request",
      -  "result",
      -  "timestamp"
      -]New value: +[
      +  "success",
      +  "service_version",
      +  "request",
      +  "result",
      +  "timestamp"
      +]
  2. Changed1 schema field changed
    • addedInput schema / examples
      Added value: +[
      +  {
      +    "annual_home_insurance": 1200,
      +    "annual_property_tax": 3000,
      +    "annual_rate_percent": 6,
      +    "down_payment": 50000,
      +    "home_price": 250000,
      +    "term_years": 30
      +  },
      +  {
      +    "annual_rate_percent": 6.5,
      +    "down_payment": 80000,
      +    "home_price": 400000,
      +    "term_years": 30
      +  }
      +]
  3. Added
  4. Removed
  5. First observed

TDQS

A4.8/5.0
Behavior5/5

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

Annotations already cover the safety profile (readOnlyHint, idempotentHint, destructiveHint=false), so the bar is lower, and the description still adds substantial behavioral detail: the exact formula including the i=0 edge case, the complete output field list, and a direct REST fallback path with an explicit warning not to guess /api/* routes. This fully reveals what the computation does and how it derives each value.

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 description is long (formula, outputs, REST fallback, docs link) but organized into clearly labeled sections with the trigger language front-loaded. Every block earns its place for a 7-parameter financial tool; only the Inputs and examples sections partially duplicate what the schema already provides.

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 tool with 7 parameters, an output schema, and a live REST fallback, the description covers trigger criteria, exclusions, inputs, outputs, the exact formula, and the fallback endpoint. Since an output schema exists, return values need no further explanation. Nothing an agent needs to invoke it correctly is missing.

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 Inputs list largely restates the schema, but the Formula section adds inter-parameter relationships not captured per-field — loan_amount = home_price − down_payment, the monthly rate conversion, and how taxes/insurance/HOA combine into total_monthly_payment. The worked JSON examples reinforce correct usage. Modest but real value beyond the schema.

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?

Opens with an explicit trigger: 'the monthly cost of buying a home with a fixed-rate mortgage, including escrowed taxes and insurance, or the total interest over the loan.' The 'What it computes' paragraph spells out the P&I calculation plus added tax/insurance/HOA, and the do-not-use clause differentiates it from loan-payment. An agent can select this tool without opening any 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?

Provides both an explicit when-to-use trigger and an explicit when-not-to-use exclusion: 'Do not use this when the loan is adjustable-rate or interest-only, or you only need the payment on a plain loan amount (use loan-payment).' It also instructs the agent to call the tool directly and return its calculation rather than answering from memory. No usage decision is left to inference.

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