Skip to main content
Glama
MCP Financial Calculator

MCP Financial Calculator

npv

Calculate the net present value of periodic cash flows from a discount rate to evaluate whether an investment adds value.

Instructions

Calculate NPV for periodic cashflows (index as period).

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>",
      "cashflows": "<cashflows>"
    },
    "name": "npv"
  }
}

Input Schema

NameRequiredDescriptionDefault
rateYes
cashflowsYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

B3.2/5.0
Behavior2/5

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

With no annotations supplied, the description carries the full behavioral burden but says nothing about rate conventions (per-period vs annual, decimal vs percent), cash flow sign conventions, whether period 0 is the initial outlay, or what is returned. For a pure computation this is low risk, but the description does not disclose any of it.

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?

A single short sentence, front-loaded with the verb and resource, with the timing convention attached immediately after. Nothing is wasted, though it is terse enough to leave gaps that a few more words could have closed.

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?

For a two-parameter deterministic calculation with no output schema, the definition gives enough to attempt a call, but leaves the rate convention and result shape ambiguous. Adding one clause on the rate would have made it complete.

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 0%, so both parameters are undocumented structurally. The parenthetical "index as period" genuinely adds timing semantics for the cashflows array that the schema does not convey, but the rate parameter's meaning (per-period decimal discount rate, must exceed -1) is left entirely unexplained.

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 verb and resource ("Calculate NPV") with a scoping qualifier ("periodic cashflows") that implicitly separates it from the irregular-timing sibling xnpv. It does not name that sibling explicitly, so an agent must infer the distinction rather than read it.

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?

The word "periodic" and the parenthetical "(index as period)" imply the tool applies to evenly spaced cash flows, which indirectly steers an agent away from xnpv/xirr. However, no explicit when-to-use statement, no named alternative, and no prerequisites are given.

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