Skip to main content
Glama

calculate_loan

Read-onlyIdempotent

Loan calculator — EMI / amortizing loan, with an optional first payment date that dates the schedule preview and gives the payoff date

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": {
      "principal": "<principal>",
      "annualRatePercent": "<annualRatePercent>",
      "years": "<years>"
    },
    "name": "calculate_loan"
  }
}

Input Schema

NameRequiredDescriptionDefault
yearsYesLoan term in years, for example 30.
principalYesStarting amount owed or invested as a plain number, for example: 250000.
previewMonthsNoHow many months of the schedule to include, 0 to 12; default 0.
firstPaymentDateNoOptional date the first payment is due, as YYYY-MM-DD. Adds a date to every schedulePreview row and returns firstPaymentDate, lastPaymentDate and payoffDate for the whole loan. It only labels the schedule; the amounts do not change. A payment day of 29 to 31 moves to the last day of shorter months.
annualRatePercentYesYearly interest rate in percent, for example: 6.5 for 6.5%.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed6 schema fields changed
    • removedInput schema / $schema
      Removed value: -"http://json-schema.org/draft-07/schema#"
    • removedInput schema / additionalProperties
      Removed value: -false
    • addedInput schema / properties / annualRatePercent / description
      Added value: +"Yearly interest rate in percent, for example: 6.5 for 6.5%."
    • addedInput schema / properties / previewMonths / description
      Added value: +"How many months of the schedule to include, 0 to 12; default 0."
    • addedInput schema / properties / principal / description
      Added value: +"Starting amount owed or invested as a plain number, for example: 250000."
    • addedInput schema / properties / years / description
      Added value: +"Loan term in years, for example 30."
  2. Changed1 schema field changed
    • addedInput schema / properties / firstPaymentDate
      Added value: +{
      +  "description": "Optional date the first payment is due, as YYYY-MM-DD. Adds a date to every schedulePreview row and returns firstPaymentDate, lastPaymentDate and payoffDate for the whole loan. It only labels the schedule; the amounts do not change. A payment day of 29 to 31 moves to the last day of shorter months.",
      +  "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
      +  "type": "string"
      +}
  3. First observed

TDQS

A3.7/5.0
Behavior4/5

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

Annotations already declare readOnlyHint, idempotentHint, destructiveHint=false, and openWorldHint=false. The description adds useful behavior beyond those annotations: firstPaymentDate labels the schedule preview, returns payoff dates, does not change amounts, and handles month-end payment dates.

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

Conciseness5/5

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

The description is a single front-loaded sentence with no wasted wording. It puts the core purpose first and then qualifies the optional date behavior.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

The tool has no output schema, so the description should clarify return values. It mentions schedule preview and payoff date but does not explicitly state that the calculator returns the EMI/monthly payment amount, leaving a meaningful gap for an agent invoking it.

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 all five parameters in detail. The description only highlights firstPaymentDate and does not add meaning beyond the schema for principal, annualRatePercent, years, or previewMonths.

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 resource and calculation type: "Loan calculator — EMI / amortizing loan." It distinguishes the tool from simple/compound-interest siblings by naming EMI and amortizing loans, though it does not explicitly name an alternative tool.

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 "Loan calculator — EMI / amortizing loan," but there is no explicit when-to-use guidance, no exclusions, and no comparison to sibling tools such as converters_loan_interest or converters_student_loan.

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