Skip to main content
Glama
jibbs1703

Mortgage MCP Server

by jibbs1703

Mortgage MCP Server

A Model Context Protocol (MCP) server that provides mortgage calculation tools for real estate agents and AI assistants.

Features

  • Monthly Payment Calculation: Calculate fixed monthly payments for mortgages

  • Amortization Schedules: Generate complete payment schedules with principal/interest breakdown

  • Lump Sum Payments: Model the impact of lump sum payments on loan payoff

  • Extra Monthly Payments: Calculate accelerated payoff with extra payments

  • Structured Logging: Full observability with structlog

  • Type Safety: 100% typed with Python 3.13+

  • Clean Architecture: Domain → Services → MCP Server layers

Related MCP server: Real Estate MCP Server

Quick Start

Installation

# Create environment
python3.13 -m venv .venv
source .venv/bin/activate

# Install dependencies
pip install -e ".[dev]"

Running the Server

python -m mortgage_mcp_server.server

Running with Docker

The server can run in a Docker container for easier deployment and isolation.

Build the image:

# Using the build script (recommended)
chmod +x build.sh
./build.sh

# Or using docker directly
docker build -t mortgage-mcp-server:latest .

Run the container:

docker run -i mortgage-mcp-server:latest

The -i (interactive) flag is required — it keeps stdin open for MCP stdio communication with VSCode/Claude.

Using Docker Compose:

docker-compose up --build

For full Docker setup and VSCode integration details, see DOCKER.md.

Example: Calculate Monthly Payment

Using the MCP protocol, call the calculate_monthly_payment tool:

{
  "principal": 350000,
  "annual_interest_rate": 6.5,
  "loan_term_years": 30
}

Returns:

{
  "principal": "350000",
  "annual_interest_rate": "6.5",
  "loan_term_years": 30,
  "monthly_payment": "2208.84"
}

Architecture

src/mortgage_mcp_server/
├── domain/           # Pure mortgage calculation logic
│   └── mortgage.py   # Core math (monthly payment, amortization, etc.)
├── schemas/          # Pydantic models for validation
│   └── loan.py       # Input/output schemas
├── services/         # Application orchestration
│   └── calculator.py # Service layer coordinating domain + I/O
├── server.py         # MCP server exposing tools
└── logging.py        # Centralized structlog configuration

Design Principles

  • Domain Layer: Pure functions with no I/O, fully typed, comprehensive docstrings

  • Services Layer: Orchestrates domain logic, validates at boundaries, uses Pydantic

  • MCP Server: Exposes tools via Model Context Protocol

  • Logging: Structured events via structlog for observability

Available Tools

calculate_monthly_payment

Calculate the fixed monthly payment for a mortgage.

Parameters:

  • principal (number): Loan amount in dollars

  • annual_interest_rate (number): Annual rate as percentage (e.g., 6.5)

  • loan_term_years (integer): Loan term in years

Returns: Monthly payment amount

get_amortization_schedule

Get the complete amortization schedule.

Parameters:

  • principal (number): Loan amount

  • annual_interest_rate (number): Annual rate as percentage

  • loan_term_years (integer): Loan term in years

Returns: Full schedule with payment-by-payment breakdown

calculate_with_lump_sum

Model the impact of a lump sum payment at a specific month.

Parameters:

  • principal (number): Loan amount

  • annual_interest_rate (number): Annual rate

  • loan_term_years (integer): Loan term

  • monthly_payment (number): Regular monthly payment

  • lump_sum_amount (number): Lump sum amount

  • month_to_apply (integer): Which month to apply the lump sum

Returns: Updated amortization schedule

calculate_with_extra_payments

Model accelerated payoff with extra monthly payments.

Parameters:

  • principal (number): Loan amount

  • annual_interest_rate (number): Annual rate

  • loan_term_years (integer): Loan term

  • monthly_payment (number): Base monthly payment

  • extra_monthly_payment (number): Extra amount per month

  • num_months_with_extra (integer): How many months to apply extra

Returns: Updated amortization schedule

Testing

# Run tests
pytest tests/

# Run with coverage
pytest --cov=src/mortgage_mcp_server tests/

# View coverage report
pytest --cov=src/mortgage_mcp_server --cov-report=html tests/

VSCode Integration

To use this MCP server with Claude in VSCode, add to your settings.json:

{
  "claude.mcp.servers": {
    "mortgage-calculator": {
      "command": ".venv/bin/python",
      "args": ["-m", "mortgage_mcp_server.server"],
      "cwd": "/Users/jibbs/Documents/git-projects/mortgage-mcp-server",
      "env": {
        "PYTHONPATH": "src"
      }
    }
  }
}

Or with Docker:

{
  "claude.mcp.servers": {
    "mortgage-calculator": {
      "command": "docker",
      "args": ["run", "-i", "mortgage-mcp-server:latest"],
      "env": {
        "PYTHONUNBUFFERED": "1"
      }
    }
  }
}

After updating settings, restart VSCode. Claude will now have access to all 4 mortgage calculation tools.

Quality Assurance

# Lint
ruff check src/ tests/

# Format
ruff format src/ tests/

# Check formatting
ruff format --check src/ tests/

# Type check (when Ty is installed)
ty check

Development

This project follows clean architecture principles and the conventions in .github/copilot-instructions.md.

Key Conventions

  • Python 3.13+ with strict type checking

  • Ruff for linting and formatting

  • Pytest for testing

  • Pydantic for input validation

  • Structlog for structured logging

  • Decimal for precise financial calculations

Making Changes

  1. Implement in appropriate layer (domain/services/server)

  2. Add/update types (no Any unless justified)

  3. Add docstrings to public APIs

  4. Write tests for new functionality

  5. Run quality checks:

    ruff check .
    ruff format .
    pytest tests/
  6. Verify all checks pass before committing

License

MIT

Available Tools

7 tools
calculate_affordabilityA

Calculate the maximum affordable mortgage using standard DTI guidelines.

Applies the conventional 28% front-end (housing-only) and 43% back-end (all-debt) debt-to-income limits. The binding constraint determines the maximum monthly payment, which is then inverted to a maximum loan principal. Purchase price projections are shown for 3%, 5%, 10%, and 20% down payments.

Args: annual_gross_income: Borrower's gross annual income before taxes. monthly_debt_payments: Existing monthly obligations (car, student loans, etc.). annual_interest_rate: Target mortgage rate as a percentage. loan_term_years: Desired loan term in years.

Returns: JSON object with max loan amount, payment caps, and purchase price scenarios.

ParametersJSON Schema
NameRequiredDescriptionDefault
loan_term_yearsYes
annual_gross_incomeYes
annual_interest_rateYes
monthly_debt_paymentsYes

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

A4.1/5.0
Behavior4/5

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

With no annotations, the description must carry behavioral load, and it discloses the calculation model, the binding-constraint logic, and the fixed 3/5/10/20% down-payment scenarios. It does not state that the tool is a side-effect-free pure computation, but the methodology disclosure is substantive.

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?

Well front-loaded: the core purpose and governing rules lead, with mechanical Args/Returns structure after. The down-payment scenario detail is slightly extraneous but every part is readable and the purpose is not buried.

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?

An output schema exists, so return values need not be elaborated, and the description still summarizes them. Combined with the methodology disclosure and all four parameters explained, an agent has what it needs, though sibling differentiation and usage conditions remain thin.

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 coverage is 0%, so the description carries the full burden, and it does compensate: it clarifies that income is gross and pre-tax, that debts are existing monthly obligations, and that the rate is a percentage and the term is in years. Units and intent are added beyond the bare schema titles, though no valid ranges or edge-case handling are given.

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 precise verb (calculate) and resource (maximum affordable mortgage) and names the governing methodology (standard 28% front-end / 43% back-end DTI). This clearly distinguishes it from siblings like calculate_monthly_payment or get_amortization_schedule, which do not perform affordability inversion.

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 DTI-based affordability framing, but the description never states when to prefer this over siblings such as calculate_monthly_payment or compare_loan_scenarios, nor any prerequisites or exclusions. Adequate but leaves the routing decision to inference.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

calculate_monthly_paymentB

Calculate the fixed monthly payment for a mortgage.

Args: principal: Loan amount in dollars (e.g., 350000). annual_interest_rate: Annual interest rate as a percentage (e.g., 6.5). loan_term_years: Loan term in years (e.g., 30).

Returns: JSON object with the monthly_payment field.

ParametersJSON Schema
NameRequiredDescriptionDefault
principalYes
loan_term_yearsYes
annual_interest_rateYes

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

B3.4/5.0
Behavior3/5

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

No annotations are provided, so the description carries the full burden. It does disclose the return shape ('JSON object with the monthly_payment field') and the meaning of each input, but says nothing about validation boundaries (e.g., zero interest rate), rounding/precision, or error behavior for a pure-computation tool.

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?

Front-loaded one-line purpose followed by compact Args/Returns blocks. Everything is readable and nothing is padded, though the Returns line duplicates information the output schema already carries.

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 simple three-parameter computation with an output schema present, the description covers purpose, all inputs, and the result key. The main remaining gap is the absence of any signal about how this base calculation relates to the six sibling tools.

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 0%, so the description must compensate, and it largely does: it documents all three parameters with units and worked examples ('Loan amount in dollars (e.g., 350000)', 'Annual interest rate as a percentage (e.g., 6.5)', 'Loan term in years (e.g., 30)'). It stops short of stating accepted ranges or constraints on those values.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb and resource: 'Calculate the fixed monthly payment for a mortgage.' The scoping word 'fixed' distinguishes it from siblings like calculate_with_extra_payments and calculate_with_lump_sum, but the description never names those alternatives, so the differentiation is implicit rather than explicit.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

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

There is no when-to-use guidance at all. The description does not tell the agent when this base mortgage calculation is appropriate versus get_amortization_schedule, compare_loan_scenarios, or the extra-payment variants, leaving routing entirely to inference.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

calculate_refinance_break_evenA

Analyse whether refinancing a mortgage makes financial sense.

Computes the monthly savings from switching to the new rate, the break-even month at which those savings recover the closing costs, and the net interest impact over the remaining loan life.

Args: current_balance: Remaining principal on the existing loan in dollars. current_annual_rate: Current loan's annual rate as a percentage. remaining_months: Number of payments remaining on the current loan. new_annual_rate: Proposed new loan's annual rate as a percentage. closing_costs: Total closing costs for the refinance in dollars. new_term_years: Term for the new loan in years.

Returns: JSON object with break-even timeline, interest savings, and a recommendation.

ParametersJSON Schema
NameRequiredDescriptionDefault
closing_costsYes
new_term_yearsYes
current_balanceYes
new_annual_rateYes
remaining_monthsYes
current_annual_rateYes

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

A3.6/5.0
Behavior3/5

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

No annotations are provided, so the description carries the full burden. It usefully discloses the computed outputs (break-even timeline, interest savings, recommendation), which signals a pure non-mutating calculation. However, it never states key behavioral assumptions that materially affect results, such as whether closing costs are paid upfront or financed, or how the new term extending the loan life is handled.

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?

Front-loaded purpose sentence followed by compact Args/Returns blocks; every line carries information and nothing is padded. The Args list largely mirrors the schema parameter names, but the added units justify the space.

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 six required parameters, no annotations, and an output schema present, the description covers inputs, computation, and return shape well enough to call the tool correctly. The remaining gaps are modeling assumptions and edge-case behavior rather than anything that blocks correct invocation.

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 0%, so the description must compensate, and it does: all six parameters are documented with units and meaning ('annual rate as a percentage', 'in dollars', 'remaining_months' vs 'new_term_years' in years). The percent-vs-decimal distinction is especially valuable. It lacks any constraint notes (e.g., non-negative rates), keeping it from a 5.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The opening sentence states a specific verb and resource ('Analyse whether refinancing a mortgage makes financial sense') and enumerates exactly what is computed: monthly savings, break-even month, and net interest impact. This is far more than a restatement of the name. It does not, however, explicitly distinguish itself from the overlapping sibling compare_loan_scenarios, so it stops short of a 5.

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 topic (refinance analysis) but there is no explicit when-to-use/when-not-to-use guidance and no routing to alternatives. An agent must infer whether this or compare_loan_scenarios is appropriate for a given refinance question. Adequate but with a clear gap.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

calculate_with_extra_paymentsA

Calculate accelerated payoff from extra monthly payments for a fixed period.

The extra amount is added to every payment for the first num_months_with_extra months. The loan then reverts to the base payment for any remaining balance, reaching payoff earlier than the original term.

Args: principal: Loan amount in dollars. annual_interest_rate: Annual interest rate as a percentage. loan_term_years: Original loan term in years. monthly_payment: Base monthly payment amount. extra_monthly_payment: Extra amount added each month during the extra period. num_months_with_extra: Number of months to make the extra payment.

Returns: JSON object with the updated amortization schedule.

ParametersJSON Schema
NameRequiredDescriptionDefault
principalYes
loan_term_yearsYes
monthly_paymentYes
annual_interest_rateYes
extra_monthly_paymentYes
num_months_with_extraYes

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

A3.6/5.0
Behavior3/5

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

With no annotations, the description carries the full burden. It does disclose the core behavioral mechanic (extra payment applied for a limited window, then reverting to base payment), which is genuinely useful. It does not, however, address edge cases such as extra payments exceeding the remaining balance or invalid input combinations, nor confirm the operation is a pure non-mutating calculation.

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 purpose sentence is front-loaded, followed by a well-organized Args block that maps one-to-one onto the parameters. There is little filler; the Returns line is arguably redundant given an output schema exists, but the overall structure is clean.

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 six-parameter calculation tool with no annotations but a present output schema, the description covers purpose, mechanism, and every parameter. Return-value explanation is correctly left to the output schema. Only the absence of any sibling-routing guidance keeps it from being fully complete.

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 0%, so the description must compensate, and it does: all six parameters are documented with units and intent (dollars for principal and payments, percentage for the rate, months for the extra period). Minor gaps remain — no constraints on ranges or the relationship between monthly_payment and extra_monthly_payment.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/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 ('Calculate accelerated payoff from extra monthly payments for a fixed period') and describes the mechanism, making the tool's purpose clear. However, it never distinguishes itself from closely related siblings like calculate_with_lump_sum or compare_loan_scenarios, so an agent must infer the boundary.

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?

The mechanism description ('extra amount is added to every payment for the first num_months_with_extra months, then reverts to base payment') implies the scenario this tool fits, but there is no explicit when-to-use guidance and no mention of the alternative tools for lump-sum or scenario comparison. Usage is inferable but not stated.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

calculate_with_lump_sumA

Calculate the amortization schedule after a one-time lump sum payment.

The lump sum is applied at the specified month, reducing the outstanding balance. The remaining schedule uses the same monthly payment against the lower principal, resulting in a shorter loan term.

Args: principal: Loan amount in dollars. annual_interest_rate: Annual interest rate as a percentage. loan_term_years: Original loan term in years. monthly_payment: Regular monthly payment amount. lump_sum_amount: One-time extra payment to apply. month_to_apply: Month (1-based) when the lump sum is applied.

Returns: JSON object with the updated amortization schedule.

ParametersJSON Schema
NameRequiredDescriptionDefault
principalYes
month_to_applyYes
loan_term_yearsYes
lump_sum_amountYes
monthly_paymentYes
annual_interest_rateYes

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

A4/5.0
Behavior4/5

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

With no annotations, the description carries the burden and does well: it explains that the lump sum reduces the outstanding balance at the specified month, that the same monthly payment is retained, and that the result is a shorter loan term. It does not cover edge cases (e.g., lump sum exceeding remaining balance, prepayment penalties, or how a partial final payment is handled).

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?

Front-loaded with the purpose and mechanism before the Args/Returns listing; every line carries information. The docstring-style Args/Returns formatting is slightly verbose given an output schema already exists, but nothing is wasted.

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 6-required-parameter calculation tool with no annotations but with an output schema, the description covers the mechanics and every parameter. It omits error/edge-case behavior (invalid month, lump sum larger than balance), which is the only notable gap.

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

Parameters5/5

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

Schema coverage is 0%, so the description must compensate, and it documents all six parameters with units and conventions: dollars, annual percentage, years, and notably that month_to_apply is 1-based. This is meaningfully more than the bare schema titles provide.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/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 ('Calculate the amortization schedule') and scopes it to the one-time lump sum case, which implicitly separates it from calculate_with_extra_payments and get_amortization_schedule. It does not explicitly name the sibling it contrasts with, so it falls short of a 5.

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?

The scenario is described (one-time lump sum applied at a specified month), which implies when this tool applies, but there is no explicit when-to-use/when-not guidance or routing to calculate_with_extra_payments for recurring overpayments. Usage must be inferred from the scenario text.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

compare_loan_scenariosA

Compare two loan scenarios side by side.

Returns full amortization schedules for both scenarios plus structured difference metrics: monthly payment delta, total interest delta, total cost delta, term length delta, and which scenario wins on each dimension.

Typical uses: compare 15-year vs. 30-year loans, compare two different rates on the same principal, or compare different loan amounts.

Args: label_a: Human-readable label for scenario A (e.g., "30-year at 6.5%"). principal_a: Loan amount for scenario A in dollars. annual_interest_rate_a: Annual rate for scenario A as a percentage. loan_term_years_a: Term for scenario A in years. label_b: Human-readable label for scenario B. principal_b: Loan amount for scenario B in dollars. annual_interest_rate_b: Annual rate for scenario B as a percentage. loan_term_years_b: Term for scenario B in years.

Returns: JSON object with both schedules and computed comparison metrics.

ParametersJSON Schema
NameRequiredDescriptionDefault
label_aYes
label_bYes
principal_aYes
principal_bYes
loan_term_years_aYes
loan_term_years_bYes
annual_interest_rate_aYes
annual_interest_rate_bYes

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

A3.7/5.0
Behavior3/5

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

No annotations are provided, so the description carries the full burden. It discloses the return payload (both schedules plus delta metrics), which is useful, but says nothing about whether it is a pure computation with no side effects, validation rules, or failure modes. Adequate but not rich.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Purpose and use cases are front-loaded, which is good, but the 'Args' and 'Returns' sections largely restate the schema and output schema. The Args units are valuable, yet the Returns block duplicates what the output schema already declares.

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?

Given 8 required params, an output schema, and no annotations, the definition supplies units for every input and describes both the use cases and the return structure. An agent could call this correctly; only side-effect/permission context is missing.

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?

With schema coverage at 0% and 8 parameters, the schema provides only bare titles. The description compensates by documenting each parameter and, importantly, its unit (dollars, annual percentage, years) and the human-readable role of the labels, adding real meaning over the schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb+resource (compare two loan scenarios side by side) and specifies the output shape (schedules plus delta metrics). This clearly distinguishes it from single-scenario siblings like calculate_monthly_payment, though it never names those siblings explicitly.

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 'Typical uses' line gives concrete conditions: 15-year vs. 30-year, two rates on the same principal, different loan amounts. Clear context for when to reach for this tool, but no exclusions or explicit routing away from the single-scenario calculators.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

get_amortization_scheduleB

Get the complete month-by-month amortization schedule.

Args: principal: Loan amount in dollars. annual_interest_rate: Annual interest rate as a percentage. loan_term_years: Loan term in years.

Returns: JSON object with payment_info and the full entries list.

ParametersJSON Schema
NameRequiredDescriptionDefault
principalYes
loan_term_yearsYes
annual_interest_rateYes

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

B3.4/5.0
Behavior3/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. It is a deterministic calculation with no side effects, so the risk is low, and it briefly notes the return shape ('payment_info and the full entries list'), but it never states that it is a pure read/compute operation or mentions assumptions like rounding or payment timing.

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?

Front-loaded with the purpose in the first sentence, then compact Args/Returns blocks with no filler. The Args section is slightly redundant with the schema, but it is short and each line adds unit 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?

An output schema exists, so the return structure need not be spelled out (and the description only summarizes it). All three 0%-documented parameters get semantic definitions, leaving only the cross-tool routing guidance absent.

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 0% and the properties carry only bare titles, so the description must compensate – and it does, defining principal as dollars, the rate as a percentage, and the term in years. Those units materially change how an agent fills the arguments, though no bounds or edge-case rules (e.g. zero-rate, rounding) are given.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb and resource ('Get the complete month-by-month amortization schedule'), which is clearly distinguishable from siblings like calculate_monthly_payment (single payment) or compare_loan_scenarios. It does not name those siblings explicitly, so it stops short of a 5.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

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

There is no statement of when to use this tool versus calculate_monthly_payment, calculate_with_lump_sum, or calculate_with_extra_payments. The 'complete month-by-month' phrasing implies the distinction, but nothing tells the agent when this is the right pick or when it is not.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

  1. 7 tool updatesv1.0.0
    • First observedcalculate_affordability
    • First observedcalculate_monthly_payment
    • First observedcalculate_refinance_break_even
    • First observedcalculate_with_extra_payments
    • First observedcalculate_with_lump_sum
    • First observedcompare_loan_scenarios
    • First observedget_amortization_schedule

TDQS

A4/5.0

Scored across 7 tools

Disambiguation5/5

Each tool targets a distinct mortgage calculation: monthly payment, amortization schedule, lump sum, extra payments, scenario comparison, refinance break-even, and affordability. Overlap between calculate_monthly_payment and get_amortization_schedule is minimal because the latter returns a full schedule while the former returns just the payment.

Naming Consistency5/5

All tool names use snake_case with a clear verb_noun or verb_noun_phrase pattern (calculate_*, get_*, compare_*). The convention is applied consistently across all seven tools.

Tool Count5/5

Seven tools is well within the ideal 3-15 range and each tool provides a distinct calculation needed for mortgage analysis. No tool feels redundant or out of scope.

Completeness4/5

The suite covers core fixed-rate mortgage calculations from affordability through amortization, extra payments, and refinancing. Minor gaps exist for specialized products like ARMs or interest-only loans, and no tool includes taxes/insurance/PMI in payment calculations.

Maintenance

ActivitySlowing
ResponsivenessNo issues

Related MCP Connectors

Related MCP Servers

  • F
    license
    D
    quality
    C
    maintenance
    Provides access to RateSpot.io mortgage rate APIs, enabling AI assistants to fetch real-time mortgage rates, compare loan products, calculate payments, and access comprehensive lending information.
    7
    -
  • A
    license
    Not graded
    quality
    Not graded
    maintenance
    Enables real estate property searches with location and criteria filtering, plus comprehensive mortgage calculations including monthly payments and affordability analysis. Currently uses mock data for property searches but provides full mortgage calculation functionality.
    -
  • A
    license
    A
    quality
    B
    maintenance
    Enables AI assistants to answer mortgage-related queries by providing tools for lender search, loan limit lookup, down-payment assistance programs, and more, with data sourced from real wholesale lenders and broker-curated intel.
    8
    9 npm
    MIT