Skip to main content
Glama

US Mortgage Calculator

Compare renting with buying

calculate_rent_vs_buy
Read-onlyIdempotent

Compares renting and buying on net wealth rather than on monthly payment, accounting for equity, appreciation, maintenance, selling costs, and the return a renter earns on money not spent on a down payment. Returns the year buying overtakes renting. The result is highly sensitive to the appreciation and investment-return assumptions, which are returned alongside it.

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": {
      "homePrice": "<homePrice>",
      "monthlyRent": "<monthlyRent>"
    },
    "name": "calculate_rent_vs_buy"
  }
}

Input Schema

NameRequiredDescriptionDefault
stateNoFull US state name, for example "Texas". Used to look up the average property tax rate. Either this or propertyTaxRatePercent is required.
homePriceYesPurchase price of the home in US dollars.
monthlyHoaNoMonthly HOA dues.
monthlyRentYesCurrent monthly rent for a comparable home.
loanTermYearsNoLoan term in years. Most US mortgages are 15 or 30.
yearsToCompareNoHorizon of the comparison.
annualInsuranceNoAnnual homeowners insurance premium.
downPaymentPercentNoDown payment as a percentage of the purchase price, 0 to 100. Not a dollar amount.
sellingCostPercentNoCost of selling, including agent commission.
propertyTaxRatePercentNoAnnual property tax as a percentage of home value. Omit and pass `state` instead to use that state's average.
investmentReturnPercentNoReturn a renter earns on cash not tied up in a house.
annualMaintenancePercentNoAnnual upkeep as a percentage of home value. Typically 1 to 2.
annualInterestRatePercentNoAnnual nominal interest rate as a percentage, for example 6.5 for 6.5%.
annualRentIncreasePercentNoExpected annual rent growth.
annualHomeAppreciationPercentNoExpected annual home price growth. The answer is highly sensitive to this.

Output Schema

NameRequiredDescriptionDefault
notesNoPlain-language observations about the result.
disclaimerYesEstimate-only notice that should accompany any figure shown to a person.
assumptionsYesGrowth, appreciation and cost assumptions used.
breakEvenYearYesYear in which buying overtakes renting; null if it does not within the horizon.
breakEvenLabelNoPlain-language break-even description.
yearlyComparisonYesOne row per year comparing the two paths.
initialCashOutlayYesCash needed up front to buy, in dollars.
monthlyRentYearOneNoMonthly rent in year one, in dollars.
monthlyOwnershipCostYearOneNoMonthly cost of owning in year one, in dollars.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed5 schema fields changed
    • addedInput schema / properties / annualInsurance / maximum
      Added value: +1000000
    • addedInput schema / properties / monthlyHoa / maximum
      Added value: +100000
    • addedInput schema / properties / monthlyRent / maximum
      Added value: +1000000
    • addedInput schema / properties / state / maxLength
      Added value: +64
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "additionalProperties": true,
      +  "description": "Year-by-year comparison of renting with buying, and the break-even year.",
      +  "properties": {
      +    "assumptions": {
      +      "additionalProperties": true,
      +      "description": "Growth, appreciation and cost assumptions used.",
      +      "type": "object"
      +    },
      +    "breakEvenLabel": {
      +      "description": "Plain-language break-even description.",
      +      "type": "string"
      +    },
      +    "breakEvenYear": {
      +      "description": "Year in which buying overtakes renting; null if it does not within the horizon.",
      +      "type": [
      +        "number",
      +        "null"
      +      ]
      +    },
      +    "disclaimer": {
      +      "description": "Estimate-only notice that should accompany any figure shown to a person.",
      +      "type": "string"
      +    },
      +    "initialCashOutlay": {
      +      "description": "Cash needed up front to buy, in dollars.",
      +      "type": "number"
      +    },
      +    "monthlyOwnershipCostYearOne": {
      +      "description": "Monthly cost of owning in year one, in dollars.",
      +      "type": "number"
      +    },
      +    "monthlyRentYearOne": {
      +      "description": "Monthly rent in year one, in dollars.",
      +      "type": "number"
      +    },
      +    "notes": {
      +      "description": "Plain-language observations about the result.",
      +      "items": {
      +        "type": "string"
      +      },
      +      "type": "array"
      +    },
      +    "yearlyComparison": {
      +      "description": "One row per year comparing the two paths.",
      +      "items": {
      +        "type": "object"
      +      },
      +      "type": "array"
      +    }
      +  },
      +  "required": [
      +    "breakEvenYear",
      +    "yearlyComparison",
      +    "initialCashOutlay",
      +    "assumptions",
      +    "disclaimer"
      +  ],
      +  "type": "object"
      +}
  2. First observed

TDQS

A4.2/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, non-destructive behavior, so the description's job is contextual. It adds real value by disclosing that results are highly sensitive to appreciation and investment-return assumptions and that those assumptions are echoed back with the result, which matters for interpreting the number.

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?

Three sentences, front-loaded with purpose, then output, then the caveat that governs interpretation. No filler, no restatement of the title, and the caveat is placed after the value statement where it belongs.

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?

For a 15-parameter financial model with an output schema, the description supplies the modeling approach and the key interpretive caveat, which is what the structured fields cannot convey. It does not mention the required-parameter minimum or the state-versus-tax-rate either/or, but the schema handles those explicitly.

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 description coverage is 100% across all 15 parameters, including defaults and ranges, so the schema already carries parameter meaning. The description's only addition is flagging appreciation and investment return as sensitivity drivers, one of which the schema already notes itself.

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 and resource (compares renting and buying) and immediately narrows the comparison basis to net wealth rather than monthly payment, which cleanly separates it from payment-oriented siblings like calculate_mortgage and calculate_amortization. It also names the concrete output (the year buying overtakes renting).

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?

The 'rather than on monthly payment' framing implicitly routes the agent here for whole-horizon wealth comparisons instead of the payment calculators, and the stated return value clarifies the intended scenario. No explicit when-not condition or named alternative is given, so it stops short of full routing guidance.

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