Skip to main content
Glama

Lease vs. own

calc_lease_vs_own
Read-onlyIdempotent

Compare leasing with buying over a fixed horizon: NPV of each case's annual cash costs (rent, free rent, tenant expenses, and move-in costs versus equity, debt service, owner expenses, reserves, and a sale at the horizon by stated value or exit cap rate), optionally after tax, with the year-by-year tables and the break-even residual value at which owning equals leasing. Deterministic: the same inputs always give the same result, with formula ID calc.lease_vs_own@2, every step, and any warnings.

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": {
      "horizon_years": "<horizon_years>",
      "discount_rate_annual": "<discount_rate_annual>",
      "lease": "<lease>",
      "own": "<own>"
    },
    "name": "calc_lease_vs_own"
  }
}

Input Schema

NameRequiredDescriptionDefault
ownYesThe purchase alternative.
leaseYesThe lease alternative.
horizon_yearsYesAnalysis horizon in years. Both cases are compared over this period; the own case sells at the end of it.
discount_rate_annualYesAnnual discount rate as a decimal, e.g. 0.08, applied to both cases' year-end cash flows (year 0 = closing / move-in). Must be less than 1.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed24 schema fields changed
    • changedInput schema / properties / discount_rate_annual / description
      Previous value: -"Annual discount rate as a decimal, e.g. 0.08, applied to both cases' year-end cash flows (year 0 = closing / move-in)."New value: +"Annual discount rate as a decimal, e.g. 0.08, applied to both cases' year-end cash flows (year 0 = closing / move-in). Must be less than 1."
    • removedInput schema / properties / discount_rate_annual / exclusiveMaximum
      Removed value: -1
    • addedInput schema / properties / discount_rate_annual / maximum
      Added value: +1
    • changedInput schema / properties / lease / properties / expense_growth_rate_annual / description
      Previous value: -"Annual growth applied to expenses after year 1, e.g. 0.03 (year k = year-1 amount × (1 + g)^(k − 1))."New value: +"Annual growth applied to expenses after year 1, e.g. 0.03 (year k = year-1 amount × (1 + g)^(k − 1)). Must be less than 1."
    • removedInput schema / properties / lease / properties / expense_growth_rate_annual / exclusiveMaximum
      Removed value: -1
    • addedInput schema / properties / lease / properties / expense_growth_rate_annual / maximum
      Added value: +1
    • removedInput schema / properties / lease / properties / free_rent_months / maximum
      Removed value: -9007199254740991
    • changedInput schema / properties / lease / properties / rent / oneOf
      Previous value: -[
      -  {
      -    "description": "Explicit rent per year.",
      -    "properties": {
      -      "annual_rent": {
      -        "description": "Rent due in each year of the horizon, USD, year 1 first. Must have exactly horizon_years entries.",
      -        "items": {
      -          "minimum": 0,
      -          "type": "number"
      -        },
      -        "maxItems": 50,
      -        "minItems": 1,
      -        "type": "array"
      -      },
      -      "type": {
      -        "const": "schedule",
      -        "type": "string"
      -      }
      -    },
      -    "required": [
      -      "type",
      -      "annual_rent"
      -    ],
      -    "type": "object"
      -  },
      -  {
      -    "description": "Base rent with a compounding annual escalation.",
      -    "properties": {
      -      "base_rent_annual": {
      -        "description": "Year-1 rent, USD per year.",
      -        "minimum": 0,
      -        "type": "number"
      -      },
      -      "escalation_rate_annual": {
      -        "default": 0,
      -        "description": "Compounding annual bump, e.g. 0.03: rent_k = base × (1 + e)^(k − 1).",
      -        "exclusiveMaximum": 1,
      -        "minimum": 0,
      -        "type": "number"
      -      },
      -      "type": {
      -        "const": "escalating",
      -        "type": "string"
      -      }
      -    },
      -    "required": [
      -      "type",
      -      "base_rent_annual"
      -    ],
      -    "type": "object"
      -  }
      -]New value: +[
      +  {
      +    "description": "Explicit rent per year.",
      +    "properties": {
      +      "annual_rent": {
      +        "description": "Rent due in each year of the horizon, USD, year 1 first. Must have exactly horizon_years entries.",
      +        "items": {
      +          "minimum": 0,
      +          "type": "number"
      +        },
      +        "maxItems": 50,
      +        "minItems": 1,
      +        "type": "array"
      +      },
      +      "type": {
      +        "const": "schedule",
      +        "type": "string"
      +      }
      +    },
      +    "required": [
      +      "type",
      +      "annual_rent"
      +    ],
      +    "type": "object"
      +  },
      +  {
      +    "description": "Base rent with a compounding annual escalation.",
      +    "properties": {
      +      "base_rent_annual": {
      +        "description": "Year-1 rent, USD per year.",
      +        "minimum": 0,
      +        "type": "number"
      +      },
      +      "escalation_rate_annual": {
      +        "default": 0,
      +        "description": "Compounding annual bump, e.g. 0.03: rent_k = base × (1 + e)^(k − 1). Must be less than 1.",
      +        "maximum": 1,
      +        "minimum": 0,
      +        "type": "number"
      +      },
      +      "type": {
      +        "const": "escalating",
      +        "type": "string"
      +      }
      +    },
      +    "required": [
      +      "type",
      +      "base_rent_annual"
      +    ],
      +    "type": "object"
      +  }
      +]
    • changedInput schema / properties / own / properties / expense_growth_rate_annual / description
      Previous value: -"Annual growth applied to expenses after year 1, e.g. 0.03 (year k = year-1 amount × (1 + g)^(k − 1))."New value: +"Annual growth applied to expenses after year 1, e.g. 0.03 (year k = year-1 amount × (1 + g)^(k − 1)). Must be less than 1."
    • removedInput schema / properties / own / properties / expense_growth_rate_annual / exclusiveMaximum
      Removed value: -1
    • addedInput schema / properties / own / properties / expense_growth_rate_annual / maximum
      Added value: +1
    • changedInput schema / properties / own / properties / loan / properties / rate_annual / description
      Previous value: -"Annual interest rate, e.g. 0.065."New value: +"Annual interest rate, e.g. 0.065. Must be less than 1."
    • removedInput schema / properties / own / properties / loan / properties / rate_annual / exclusiveMaximum
      Removed value: -1
    • addedInput schema / properties / own / properties / loan / properties / rate_annual / maximum
      Added value: +1
    • changedInput schema / properties / own / properties / residual / oneOf
      Previous value: -[
      -  {
      -    "description": "A stated residual value.",
      -    "properties": {
      -      "amount": {
      -        "description": "Expected gross sale price at the end of the horizon, USD.",
      -        "minimum": 0,
      -        "type": "number"
      -      },
      -      "type": {
      -        "const": "value",
      -        "type": "string"
      -      }
      -    },
      -    "required": [
      -      "type",
      -      "amount"
      -    ],
      -    "type": "object"
      -  },
      -  {
      -    "description": "Residual = stabilized NOI ÷ exit cap rate (direct capitalization).",
      -    "properties": {
      -      "cap_rate": {
      -        "description": "Exit capitalization rate, e.g. 0.07.",
      -        "exclusiveMaximum": 1,
      -        "exclusiveMinimum": 0,
      -        "type": "number"
      -      },
      -      "stabilized_noi": {
      -        "description": "Stabilized NOI the property would earn if leased at market in the year after the horizon, USD per year.",
      -        "minimum": 0,
      -        "type": "number"
      -      },
      -      "type": {
      -        "const": "exit_cap",
      -        "type": "string"
      -      }
      -    },
      -    "required": [
      -      "type",
      -      "cap_rate",
      -      "stabilized_noi"
      -    ],
      -    "type": "object"
      -  }
      -]New value: +[
      +  {
      +    "description": "A stated residual value.",
      +    "properties": {
      +      "amount": {
      +        "description": "Expected gross sale price at the end of the horizon, USD.",
      +        "minimum": 0,
      +        "type": "number"
      +      },
      +      "type": {
      +        "const": "value",
      +        "type": "string"
      +      }
      +    },
      +    "required": [
      +      "type",
      +      "amount"
      +    ],
      +    "type": "object"
      +  },
      +  {
      +    "description": "Residual = stabilized NOI ÷ exit cap rate (direct capitalization).",
      +    "properties": {
      +      "cap_rate": {
      +        "description": "Exit capitalization rate, e.g. 0.07. Must be greater than 0. Must be less than 1.",
      +        "maximum": 1,
      +        "minimum": 0,
      +        "type": "number"
      +      },
      +      "stabilized_noi": {
      +        "description": "Stabilized NOI the property would earn if leased at market in the year after the horizon, USD per year.",
      +        "minimum": 0,
      +        "type": "number"
      +      },
      +      "type": {
      +        "const": "exit_cap",
      +        "type": "string"
      +      }
      +    },
      +    "required": [
      +      "type",
      +      "cap_rate",
      +      "stabilized_noi"
      +    ],
      +    "type": "object"
      +  }
      +]
    • changedInput schema / properties / own / properties / selling_costs_rate / description
      Previous value: -"Brokerage and closing costs on sale as a share of the sale price, e.g. 0.03."New value: +"Brokerage and closing costs on sale as a share of the sale price, e.g. 0.03. Must be less than 1."
    • removedInput schema / properties / own / properties / selling_costs_rate / exclusiveMaximum
      Removed value: -1
    • addedInput schema / properties / own / properties / selling_costs_rate / maximum
      Added value: +1
    • changedInput schema / properties / own / properties / tax / properties / land_share / description
      Previous value: -"Share of purchase price plus closing costs allocated to land, which is not depreciated."New value: +"Share of purchase price plus closing costs allocated to land, which is not depreciated. Must be less than 1."
    • removedInput schema / properties / own / properties / tax / properties / land_share / exclusiveMaximum
      Removed value: -1
    • addedInput schema / properties / own / properties / tax / properties / land_share / maximum
      Added value: +1
    • changedInput schema / properties / own / properties / tax / properties / marginal_tax_rate / description
      Previous value: -"Combined marginal income tax rate applied to deductions and to the gain on sale, e.g. 0.26."New value: +"Combined marginal income tax rate applied to deductions and to the gain on sale, e.g. 0.26. Must be less than 1."
    • removedInput schema / properties / own / properties / tax / properties / marginal_tax_rate / exclusiveMaximum
      Removed value: -1
    • addedInput schema / properties / own / properties / tax / properties / marginal_tax_rate / maximum
      Added value: +1
  2. First observed

TDQS

A4.1/5.0
Behavior4/5

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

Annotations already establish readOnly, idempotent, non-destructive, closed-world behavior, so safety is covered. The description adds genuinely useful traits beyond that: determinism, a pinned formula ID (calc.lease_vs_own@2), emitted warnings, year-by-year tables, and a break-even residual value, plus the sale treatment (stated value or exit cap rate).

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 comparison is front-loaded in the first clause, followed by the cash-flow breakdown and then the output guarantees. It is a single dense sentence with a long parenthetical, so it is efficient but slightly heavy to parse; nothing is truly redundant.

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?

With no output schema, the description carries the return-value burden and does so by naming year-by-year tables, NPV per case, and break-even residual value, plus determinism and warnings. A deeply nested four-parameter tool is adequately covered, though it does not mention units across cases or limits on horizon behavior beyond what the schema states.

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 baseline is 3, and the description goes further by grouping the parameters into the lease and own cash-flow narratives and calling out the after-tax toggle and the residual-value alternatives. It adds conceptual meaning (which items count as costs on each side) rather than restating field text.

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 opens with a specific verb and resource: 'Compare leasing with buying over a fixed horizon' via NPV of annual cash costs. It enumerates the cash-flow components of each side (rent, free rent, tenant expenses, move-in costs vs. equity, debt service, owner expenses, reserves, sale proceeds), which clearly separates it from siblings like calc_net_effective_rent or calc_renew_vs_relocate.

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?

Usage is implied by the scope ('over a fixed horizon', 'optionally after tax'), so an agent can infer this is the hold-vs-buy decision tool. However, it never states when to prefer it over adjacent tools such as calc_renew_vs_relocate or calc_compare_proposals, and gives no prerequisites or exclusions.

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.