Skip to main content
Glama

Home loan EMI

home_loan_emi
Read-onlyIdempotent

Calculate reducing-balance monthly Equated Monthly Installment (EMI), total interest payable, and amortization schedule for home, auto, or personal loans.

Behavior: Deterministic, idempotent calculation with zero external side effects. Computes standard monthly EMI formula: E = P * r * (1 + r)^n / ((1 + r)^n - 1), where r = annualRate / 12 / 100. Returns monthly EMI, total payment (principal + interest), total interest percentage, and first-year amortization breakdown.

Usage Guidelines: Use for general global reducing-balance loans and consumer debt. Do not use for US residential mortgages requiring property tax, hazard insurance, and PMI escrow; use mortgage_piti instead.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
principalYesTotal borrowed principal loan amount in currency units. Must be a positive number.
as_of_dateYesCivil date YYYY-MM-DD. Selects the rule pack in force on that date. Required: the engine will not assume a date.
tenureYearsNoTotal loan repayment duration in years (e.g. 15, 20, 30). Must be an integer >= 1.
interestRatePercentYesAnnual interest rate in percent, as a decimal string (e.g. 8.50).

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
traceNo
statusNo
currencyNo
principalNo
as_of_dateNo
disclaimerNo
monthlyEMINo
minor_unitsNo
monthly_emiNo
totalAmountNo
actualMonthsNo
tenure_yearsNo
interestSavedNo
rule_ids_usedNo
totalInterestNo
has_prepaymentNo
interest_savedNo
total_interestNo
yearlyScheduleNo
yearly_scheduleNo
scheduled_monthsNo
tenureReducedYearsNo
amortization_methodNo
actual_tenure_monthsNo
annual_interest_rateNo
tenure_reduced_yearsNo
total_amount_payableNo
tenure_reduced_monthsNo
prepayment_total_principalNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "additionalProperties": true,
      +  "properties": {
      +    "actualMonths": {
      +      "type": [
      +        "string",
      +        "number",
      +        "null"
      +      ]
      +    },
      +    "actual_tenure_months": {
      +      "type": [
      +        "string",
      +        "number",
      +        "null"
      +      ]
      +    },
      +    "amortization_method": {
      +      "type": [
      +        "string",
      +        "number",
      +        "null"
      +      ]
      +    },
      +    "annual_interest_rate": {
      +      "type": [
      +        "string",
      +        "number",
      +        "null"
      +      ]
      +    },
      +    "as_of_date": {
      +      "type": [
      +        "string",
      +        "number",
      +        "null"
      +      ]
      +    },
      +    "currency": {
      +      "type": [
      +        "string",
      +        "number",
      +        "null"
      +      ]
      +    },
      +    "disclaimer": {
      +      "type": [
      +        "string",
      +        "number",
      +        "null"
      +      ]
      +    },
      +    "has_prepayment": {
      +      "type": [
      +        "boolean",
      +        "null"
      +      ]
      +    },
      +    "interestSaved": {
      +      "type": [
      +        "string",
      +        "number",
      +        "null"
      +      ]
      +    },
      +    "interest_saved": {
      +      "type": [
      +        "string",
      +        "number",
      +        "null"
      +      ]
      +    },
      +    "minor_units": {
      +      "type": [
      +        "object",
      +        "null"
      +      ]
      +    },
      +    "monthlyEMI": {
      +      "type": [
      +        "string",
      +        "number",
      +        "null"
      +      ]
      +    },
      +    "monthly_emi": {
      +      "type": [
      +        "string",
      +        "number",
      +        "null"
      +      ]
      +    },
      +    "prepayment_total_principal": {
      +      "type": [
      +        "string",
      +        "number",
      +        "null"
      +      ]
      +    },
      +    "principal": {
      +      "type": [
      +        "string",
      +        "number",
      +        "null"
      +      ]
      +    },
      +    "rule_ids_used": {
      +      "type": [
      +        "array",
      +        "null"
      +      ]
      +    },
      +    "scheduled_months": {
      +      "type": [
      +        "string",
      +        "number",
      +        "null"
      +      ]
      +    },
      +    "status": {
      +      "type": [
      +        "string",
      +        "number",
      +        "null"
      +      ]
      +    },
      +    "tenureReducedYears": {
      +      "type": [
      +        "string",
      +        "number",
      +        "null"
      +      ]
      +    },
      +    "tenure_reduced_months": {
      +      "type": [
      +        "string",
      +        "number",
      +        "null"
      +      ]
      +    },
      +    "tenure_reduced_years": {
      +      "type": [
      +        "string",
      +        "number",
      +        "null"
      +      ]
      +    },
      +    "tenure_years": {
      +      "type": [
      +        "string",
      +        "number",
      +        "null"
      +      ]
      +    },
      +    "totalAmount": {
      +      "type": [
      +        "string",
      +        "number",
      +        "null"
      +      ]
      +    },
      +    "totalInterest": {
      +      "type": [
      +        "string",
      +        "number",
      +        "null"
      +      ]
      +    },
      +    "total_amount_payable": {
      +      "type": [
      +        "string",
      +        "number",
      +        "null"
      +      ]
      +    },
      +    "total_interest": {
      +      "type": [
      +        "string",
      +        "number",
      +        "null"
      +      ]
      +    },
      +    "trace": {
      +      "type": [
      +        "array",
      +        "null"
      +      ]
      +    },
      +    "yearlySchedule": {
      +      "type": [
      +        "array",
      +        "null"
      +      ]
      +    },
      +    "yearly_schedule": {
      +      "type": [
      +        "array",
      +        "null"
      +      ]
      +    }
      +  },
      +  "type": "object"
      +}
  2. Changed2 schema fields changed
    • addedInput schema / properties / as_of_date
      Added value: +{
      +  "description": "Civil date YYYY-MM-DD. Selects the rule pack in force on that date. Required: the engine will not assume a date.",
      +  "example": "2026-09-26",
      +  "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
      +  "type": "string"
      +}
    • changedInput schema / required
      Previous value: -[
      -  "principal",
      -  "interestRatePercent"
      -]New value: +[
      +  "principal",
      +  "interestRatePercent",
      +  "as_of_date"
      +]
  3. Changed7 schema fields changed
    • changedInput schema / properties / interestRatePercent / description
      Previous value: -"Annual interest rate percentage (e.g. 8.5 for 8.5%). Must be positive."New value: +"Annual interest rate in percent, as a decimal string (e.g. 8.50)."
    • addedInput schema / properties / interestRatePercent / example
      Added value: +"8.50"
    • addedInput schema / properties / interestRatePercent / pattern
      Added value: +"^\\d+(\\.\\d+)?$"
    • changedInput schema / properties / interestRatePercent / type
      Previous value: -"number"New value: +"string"
    • addedInput schema / properties / principal / example
      Added value: +"5000000.00"
    • addedInput schema / properties / principal / pattern
      Added value: +"^\\d+\\.\\d{2}$"
    • changedInput schema / properties / principal / type
      Previous value: -"number"New value: +"string"
  4. Changed3 schema fields changed
    • changedInput schema / properties / interestRatePercent / description
      Previous value: -"Annual interest rate %"New value: +"Annual interest rate percentage (e.g. 8.5 for 8.5%). Must be positive."
    • changedInput schema / properties / principal / description
      Previous value: -"Loan amount"New value: +"Total borrowed principal loan amount in currency units. Must be a positive number."
    • changedInput schema / properties / tenureYears / description
      Previous value: -"Loan term in years"New value: +"Total loan repayment duration in years (e.g. 15, 20, 30). Must be an integer >= 1."
  5. First observed

TDQS

A4.3/5.0
Behavior4/5

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

Annotations already declare readOnlyHint, idempotentHint, and destructiveHint=false, so part of the behavior sentence ('deterministic, idempotent, zero side effects') is redundant. What the description adds beyond structured data is the exact EMI formula, the rate convention (r = annualRate/12/100), and the scope of computed outputs, which meaningfully reduces ambiguity.

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 purpose, then clearly sectioned Behavior and Usage Guidelines. Slightly wasteful in restating the idempotency/side-effect profile already carried by annotations and in listing return fields that the output schema covers.

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 annotations covering safety and an output schema covering return values, the description supplies everything needed for selection: purpose, formula assumptions, and an explicit sibling alternative. Only minor gaps remain, such as how as_of_date's rule-pack selection can change results.

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 already documents principal, rate, tenureYears default, and as_of_date. The description adds no parameter-level meaning beyond the formula's rate convention, so the 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?

States a specific verb+resource (calculate EMI, total interest, amortization) and scopes it to reducing-balance consumer loans. It explicitly positions itself against the sibling mortgage_piti, so an agent can distinguish the two without opening either schema.

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

Usage Guidelines5/5

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

Gives an explicit when-to-use ('general global reducing-balance loans and consumer debt') and an explicit when-not-to-use with a named alternative ('US residential mortgages requiring property tax, hazard insurance, and PMI escrow; use mortgage_piti instead'). This is the strongest form of 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