Skip to main content
Glama

FactLot

Loan sizing (LTV / DSCR / debt yield)

calc_debt_sizing
Read-onlyIdempotent

Size the maximum loan under any combination of max LTV, min DSCR, and min debt yield for a given NOI, rate, and amortization. Reports the binding constraint, debt service, and resulting metrics. Deterministic: use this instead of doing the math yourself; cite formula calc.debt_sizing@2 and the returned steps, and surface any warnings.

Input Schema

NameRequiredDescriptionDefault
noiYesUnderwritten net operating income, USD/yr.
valueNoAppraised or underwritten value, USD. Required when max_ltv is set.
max_ltvNoMaximum loan-to-value, e.g. 0.65.
min_dscrNoMinimum debt service coverage ratio, e.g. 1.25.
rate_annualYesAnnual interest rate, e.g. 0.065.
round_down_toNoRound the final loan amount down to this increment (lenders often use 1,000 or 10,000).
min_debt_yieldNoMinimum debt yield (NOI ÷ loan), e.g. 0.09.
amortization_yearsYesAmortization in years; 0 means interest-only.

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 cover the safety profile (readOnly, idempotent, closed-world, non-destructive), so the description's job is to add operational context, which it does: deterministic output, a binding-constraint report, debt service and resulting metrics, returned steps, and warnings to surface. It does not address edge behavior such as what happens when no constraint is supplied.

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?

Three sentences, front-loaded with the core purpose, then outputs, then the determinism/citation directive. Nothing is redundant, though the citation-string instruction adds mild density that could be tightened.

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 must convey return content; it names the binding constraint, debt service, resulting metrics, steps, and warnings, which is enough for an agent to interpret results. Missing only explicit mention of the loan amount field and handling of a no-constraint call.

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% with units and examples for every property, so the baseline is 3. The description's phrase 'any combination of' hints that the constraint parameters are combinable, but it never states whether at least one constraint is required or how conflicts between them are resolved.

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 ('Size the maximum loan') and names the exact constraint set (max LTV, min DSCR, min debt yield) plus the required inputs (NOI, rate, amortization). It is unmistakably distinct from the other calc_* siblings such as calc_irr or calc_npv.

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?

'Deterministic: use this instead of doing the math yourself' is an explicit use directive against the main alternative (manual computation), and the citation/warning instruction tells the agent how to present results. It stops short of stating when-not to use it or which sibling to prefer for related sizing questions.

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.