Skip to main content
Glama

FactLot

Net present value

calc_npv
Read-onlyIdempotent

NPV of periodic cash flows (t = 0, 1, 2, ...; the t = 0 flow is not discounted) at a per-period discount rate given as a decimal. Deterministic: use this instead of doing the math yourself; cite formula calc.npv@1 and the returned steps, and surface any warnings.

Input Schema

NameRequiredDescriptionDefault
rateYesDiscount rate per period as a decimal, e.g. 0.08 for 8%. Match the cash-flow period: for monthly flows pass the monthly rate (e.g. 0.06 ÷ 12 = 0.005).
cash_flowsYesPeriodic cash flows at t = 0, 1, 2, …; negative for outflows (e.g. purchase price at t = 0). At most 10000.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.4/5.0
Behavior5/5

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

Beyond the read-only, idempotent, non-destructive annotations, it discloses determinism, a versioned formula identifier, returned calculation steps, and possible warnings. These details establish useful expectations for reproducibility and result reporting.

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?

Two dense but readable sentences front-load the calculation and timing convention, then provide concise invocation and reporting guidance. There is no filler or unnecessary background.

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 simple two-parameter deterministic calculation, the description, fully documented schema, and safety annotations collectively cover invocation, timing, reproducibility, and reporting. The absence of detailed warning conditions or explicit sibling exclusions is a minor gap rather than an obstacle to correct use.

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?

The schema already fully documents both parameters, including rate-period matching and cash-flow signs. The description adds the important computational convention that the t = 0 cash flow is not discounted, although its decimal-rate and periodicity wording otherwise repeats 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 precisely identifies the computation as NPV for periodic cash flows at a supplied per-period discount rate and clarifies that the t = 0 flow is not discounted. It does not explicitly contrast the tool with calc_irr or other financial siblings, so sibling selection still relies partly on tool names.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

It explicitly directs the agent to use the deterministic tool rather than perform the calculation manually and explains how to report the result using calc.npv@1, returned steps, and warnings. It lacks when-not guidance, such as where to route irregularly timed flows or requests to solve for a rate of return.

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.