Skip to main content
Glama

FactLot

Loan prepayment premium and defeasance

calc_prepayment_and_defeasance
Read-onlyIdempotent

Prepayment premium, total payoff, and cost as a share of balance for a fixed-rate amortizing or interest-only loan under yield maintenance (PV of remaining payments or rate differential, with a minimum and an explicit discounting convention), a step-down schedule, a flat percentage, or defeasance (cost of the securities portfolio that funds the remaining payments plus stated costs). Deterministic: use this instead of doing the math yourself; cite formula calc.prepayment_and_defeasance@1 and the returned steps, and surface any warnings.

Input Schema

NameRequiredDescriptionDefault
balanceYesOutstanding principal balance at the payoff date, USD.
prepaymentYesPrepayment provision from the note.
accrued_interestNoAccrued but unpaid interest to the payoff date, USD; added to the total payoff.
note_rate_annualYesFixed annual note rate, e.g. 0.055.
amortization_monthsYesRemaining amortization basis in months at the payoff date (e.g. 300 for a 30-year schedule with 5 years elapsed); 0 for interest-only. Must be at least remaining_term_months.
remaining_term_monthsYesMonths from the payoff date to the loan's maturity date (the balloon is due with the final payment).

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.1/5.0
Behavior4/5

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

Annotations already declare readOnly, idempotent, non-destructive, closed-world behavior, so the safety profile is covered. The description adds meaningful context beyond that: it is deterministic, the formula reference calc.prepayment_and_defeasance@1 is citeable, returned steps should be used, and warnings should be surfaced. It does not describe the response shape in detail, but the annotation bar is already met.

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?

It is a single dense paragraph with no filler, and the core capability is front-loaded before the mode list and the determinism directive. The nested clauses make it slightly heavy to scan, but every sentence carries substantive information.

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 complex tool with a nested oneOf prepayment parameter and no output schema, the description covers the computational models, the determinism expectation, the citation requirement, and warning surfacing. It could say more about the returned fields (steps, warnings, cost share), but overall it gives an agent enough to call it responsibly.

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%, so the schema itself fully documents the parameters, including the oneOf branches, defaults, and conventions. The description adds only a high-level summary of the four provision modes (minimum floor, discounting convention, stated defeasance costs) that the schema already spells out, so baseline 3 applies.

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 names the specific outputs (premium, total payoff, cost as a share of balance) and the exact loan and provision types covered: yield maintenance, step-down schedule, flat percentage, and defeasance. That level of specificity clearly separates it from siblings like calc_npv or calc_debt_sizing 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 Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

It gives a clear directive: 'Deterministic: use this instead of doing the math yourself,' plus instructions to cite the formula ID and surface warnings. It stops short of naming alternatives or exclusions (e.g., when to prefer calc_npv or calc_debt_sizing), so it is clear context but not full when/when-not 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.