Skip to main content
Glama

CarLoanMath

Calculate an auto loan

calculate_auto_loan
Read-onlyIdempotent

Monthly payment, amount financed, total interest and total cost for one US car loan. Amount financed = price − down − trade-in + owed on trade-in; sales tax and fees are paid upfront unless tax_and_fees_financed is true, then they are added to the loan. total_cost = cash due at purchase + all payments (price + tax + fees + interest − trade-in + owed). Returns the inputs echoed back and a carloanmath.com share_url. When optional inputs are omitted, the result includes assumed_defaults (the values actually used) and a short text line so you can call again with those parameters. assumed_defaults is omitted when every optional input was provided.

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": {
      "price": "<price>",
      "apr": "<apr>",
      "term_months": "<term_months>"
    },
    "name": "calculate_auto_loan"
  }
}

Input Schema

NameRequiredDescriptionDefault
aprYesYearly interest rate in percent, compounded monthly (the same number as the site’s rate field), e.g. 6.5 for 6.5%. A lender’s APR can be a little higher because it folds in some fees. Use 0 for 0% financing.
downNoCash down payment in USD. Default 0.
feesNoTitle, registration, documentation and dealer fees in USD. Default 0.
priceYesVehicle price in USD (before tax, fees, down payment and trade-in).
countryNoCountry of the purchase, ISO 3166-1 alpha-2. Default "US". Only US is available for now.US
trade_inNoTrade-in value in USD credited against the price. Default 0.
term_monthsYesLoan term in whole months, 1–120 (common: 36, 48, 60, 72, 84).
sales_tax_rateNoSales tax in percent of the vehicle price, e.g. 7 for 7%. No state rules or trade-in tax credit are applied. Default 0.
owed_on_trade_inNoLoan balance still owed on the trade-in, rolled into the new loan (negative equity). Default 0.
tax_and_fees_financedNofalse (default, the site's "Pay upfront"): sales tax and fees are paid in cash at purchase, not financed. true: they are added to the loan.

Output Schema

NameRequiredDescriptionDefault
inputsYes
countryYes
sales_taxYes
share_urlYes
disclaimerYes
total_costYes
total_interestYes
amount_financedYes
monthly_paymentYes
assumed_defaultsNoOptional inputs the caller omitted, with the values actually used. The field is omitted when nothing was assumed.
total_of_paymentsYes
cash_due_at_purchaseYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.1/5.0
Behavior5/5

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

Annotations already declare readOnly, idempotent, non-destructive and closed-world, and the description adds real behavioral context beyond that: tax and fees are paid upfront unless tax_and_fees_financed is true, the exact total_cost and amount-financed formulas, and that assumed_defaults is returned only when optional inputs are omitted. The echo of inputs plus a share_url return is also disclosed.

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?

Dense but front-loaded: outputs first, then the formulas that determine them, then the default-handling behavior. The final sentence on assumed_defaults is slightly repetitive but clarifies a genuinely non-obvious conditional, so nearly every clause earns its place.

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

Completeness5/5

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

For a 10-parameter financial calculation with an output schema, the description supplies exactly what structured fields cannot: the financing model, upfront vs financed tax treatment, and fallback behavior when inputs are defaulted. An agent has everything needed to call it correctly and interpret the response.

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 100%, so the baseline is 3; the description rises above it by defining cross-parameter relationships the per-field schema cannot express, notably amount financed = price − down − trade-in + owed and the conditional treatment of sales tax and fees. It does not restate APR or term semantics, but those are already well documented in 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?

The description names the specific outputs (monthly payment, amount financed, total interest, total cost) for "one US car loan," which distinguishes it from compare_auto_loans and amortization_schedule by scope. It lacks an explicit statement of the calculating verb versus the siblings, but the resource and scope are unambiguous.

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 "one US car loan" and by the note that you can re-call with assumed_defaults values, which gives a useful iterative workflow. However, no sibling is named and no when-not-to-use condition is stated (e.g., use compare_auto_loans for multiple offers), so an agent must infer routing from names alone.

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