Skip to main content
Glama
MCP Financial Calculator

MCP Financial Calculator

nper

Calculate how many payment periods are needed to pay off a loan or reach an investment future value using a fixed rate and recurring payment.

Instructions

Calculate number of periods.

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>",
      "pmt": "<pmt>",
      "pv": "<pv>"
    },
    "name": "nper"
  }
}

Input Schema

NameRequiredDescriptionDefault
fvNo
pvYes
pmtYes
rateYes
typeNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

C2.1/5.0
Behavior2/5

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

With no annotations, the description carries the full behavioral burden and discloses almost nothing. It does not say this is a pure, side-effect-free computation, nor does it mention sign conventions for pmt/pv, that fv defaults to zero, that type selects end-of-period vs beginning-of-period, or what happens when no solution exists (non-convergence).

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?

The single sentence is front-loaded and contains no filler, so there is nothing to trim. However, it is under-specified rather than concise: brevity here reflects omission of required information rather than disciplined editing.

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

Completeness1/5

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

A five-parameter financial function with zero schema descriptions, no annotations, and no output schema needs a description explaining conventions and argument meaning. One sentence restating the name leaves an agent unable to call it correctly without outside knowledge of spreadsheet NPER semantics.

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

Parameters1/5

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

Schema description coverage is 0% across five parameters, and the description supplies no compensating meaning. Nothing explains that rate is per-period and must exceed -1, that pmt is a constant payment, that type is 0=end/1=begin, or what the optional fv and type do when omitted.

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

Purpose3/5

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

"Calculate number of periods" gives a verb and a resource, but 'periods' of what is never said — loan amortization, annuity, investment horizon. It expands the name nper without distinguishing it from siblings such as rate, pmt, fv, or pv, which are the same family of financial functions.

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, no statement of the inverse relationship to rate/pmt/fv, and no mention of the alternative tools an agent should pick instead. The agent must already know the financial-function convention to select this tool over its sixteen siblings.

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