Skip to main content
Glama

curatedapi

Excel PMT function: loan payment

calc_excel_pmt
Read-only

The payment per period for a loan or an investment, the same as Excel's PMT.

PMT(rate, nper, pv, [fv], [type]): the constant payment that brings pv to fv over nper periods at rate. Negative when you pay, as in Excel.

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": {
      "rate": "<rate>",
      "nper": "<nper>",
      "pv": "<pv>"
    },
    "name": "calc_excel_pmt"
  }
}

Input Schema

NameRequiredDescriptionDefault
fvNoFuture value wanted after the last payment. A ratio of two decimals such as "0.08/12" is accepted. Allowed: >= -1000000000000000 and <= 1000000000000000.0
pvYesPresent value: the amount now (a loan you receive is positive). A ratio of two decimals such as "0.08/12" is accepted. Allowed: >= -1000000000000000 and <= 1000000000000000.
nperYesTotal number of payment periods. A ratio of two decimals such as "0.08/12" is accepted. Allowed: > 0 and <= 12000.
rateYesInterest rate per period, as a decimal (0.005 for 0.5%). Write a monthly rate from an annual one as "0.06/12". A ratio of two decimals such as "0.08/12" is accepted. Allowed: > -1 and <= 1000.
typeNoWhen payments are due: 0 at the end of each period, 1 at the beginning. Allowed: >= 0 and <= 1.
optionsNoPrecision and rounding of the results (default: rounding=half_even, significant_digits=15).

Output Schema

NameRequiredDescriptionDefault
inputsYesThe inputs as understood.
resultYes
formulaNo
receiptNoOnly with ?receipt=true: a signed receipt for this answer, a JSON Web Token signed with Ed25519 (alg EdDSA). Its claims are iss, iat, jti (the request id), endpoint, date and response (this response without the receipt). Check it with the keys at /.well-known/jwks.json or POST /v1/receipts/verify.
warningsYes
exactnessYesFor each decimal output: exact; rounded (correctly, to the precision); rounded_uncertified (the last digit could not be proven); or underflow (below 1e-100, reported as 0).
precisionNoThe precision and rounding that were applied.
calculatorYesThe calculator and version that ran.
referencesNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A3.8/5.0
Behavior4/5

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

Annotations already establish this is a safe, non-destructive, closed-world read computation, so the bar is lower; the description still adds a genuinely useful behavioral fact — the sign convention (negative when you pay, mirroring Excel) — that an agent needs to interpret results correctly. It does not mention rounding/precision behavior, but the output schema and options object cover that.

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?

Two short sentences, front-loaded with the plain-language purpose before the formula. The second sentence largely restates the first in symbolic form, but the redundancy is cheap and aids parsing.

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 an output schema present and full schema coverage across six parameters including a nested options object, the description only needs to establish purpose and result convention, both of which it does. Minor gaps — edge behavior at rate=0 and explicit differentiation from the amortization siblings — are outside what a pure calculator must document.

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 baseline would be 3; the description adds value by supplying the canonical PMT(rate, nper, pv, [fv], [type]) ordering and explaining the relationship (constant payment bringing pv to fv over nper periods at rate), which clarifies how the required parameters interact. The options/precision object is left entirely to 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 computation (periodic loan/investment payment) and anchors it to the well-known Excel PMT signature, which distinguishes it from interest/principal siblings like ipmt or ppmt. It does not explicitly name any sibling, but the formula identity is enough for an agent to identify the resource.

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 formula definition (compute the level payment given rate, nper, pv), but there is no explicit when-to-use or when-not-to-use guidance relative to alternatives such as amortization schedules or interest-only or principal-only tools. An agent must infer selection from the math 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