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

Schema Changelog

Changes observed during successful MCP inspections.

  1. 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
      +  }
      +]
  2. Added
  3. Removed
  4. First observed

TDQS

A4.4/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true, idempotentHint=true, and destructiveHint=false, covering the safety profile. The description adds behavioral context by specifying what it computes (P&I, taxes, insurance, HOA, total interest) and provides the formula, without contradicting any annotation. It does not describe side effects (none exist) but goes beyond the annotations by detailing the computation scope.

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 (multiple sections) but well-structured and front-loaded with purpose and usage. It includes inputs, examples, outputs, formula, REST fallback, and docs link. Each section serves a purpose; while it could be tightened, the organization makes it easy to scan and extract key facts.

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 calculator tool with 7 parameters and a full output schema, the description is exceptionally complete. It covers the computation formula, lists all outputs (matching the schema), gives two complete example JSON payloads, and includes a REST fallback endpoint and documentation link. Nothing an agent needs to call it correctly is missing.

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

Parameters3/5

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

Schema coverage is 100%, so the schema fully describes each parameter. The description lists inputs with units and optionality and provides two complete JSON examples, but this is largely redundant with the schema. It adds the formula relationship (e.g., loan_amount = home_price − down_payment) which is helpful, but since the schema already covers semantics, a baseline of 3 is appropriate.

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 states a specific verb and resource: it calculates the monthly cost of a fixed-rate mortgage including escrowed taxes/insurance, and the total interest. It explicitly excludes adjustable-rate and interest-only loans, distinguishing itself from the sibling calculate_loan_payment. The scope is unambiguous.

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 explicit when-to-use (fixed-rate mortgage with escrow) and when-not-to-use conditions (adjustable-rate, interest-only, or plain loan amount, for which it names the alternative calculate_loan_payment). Also instructs the agent to call the tool directly rather than compute manually, leaving no ambiguity.

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