Skip to main content
Glama
finance-mcp

finance-mcp

npv

Read-onlyIdempotent

Calculate net present value from a discount rate and cash flows, with an option to treat the first cash flow as occurring at time zero.

Instructions

Net present value of a list of cash flows at a discount rate. By default the first flow is discounted one period, as spreadsheet NPV does; set first_flow_at_time_zero to leave it undiscounted.

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_pct": "<rate_pct>",
      "cash_flows": "<cash_flows>"
    },
    "name": "npv"
  }
}

Input Schema

NameRequiredDescriptionDefault
rate_pctYes
cash_flowsYes
first_flow_at_time_zeroNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.9/5.0
Behavior4/5

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

Annotations already declare readOnlyHint, idempotentHint, and closed-world, so the safety profile is covered. The description adds genuinely non-obvious behavior beyond that: the default one-period discounting convention and its spreadsheet parity, which is exactly the kind of semantic an agent could otherwise get wrong.

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 sentences, front-loaded with the definition and followed immediately by the one behavioral caveat that matters. No filler, no restatement of the title.

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 three-parameter calculation tool with no output schema, the description covers the discounting convention well but omits rate units and the assumption that flows are evenly spaced. Those are the two details most likely to produce a silently wrong number, so it is adequate rather than 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 coverage is 0%, so the description must carry parameter meaning. It fully explains first_flow_at_time_zero and implies cash_flows are ordered periods, but leaves rate_pct ambiguous — the schema allows number or string and the name implies percent, yet the description never states whether to pass 5 or 0.05, a consequential gap for a numeric tool.

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 and its inputs: "Net present value of a list of cash flows at a discount rate." An agent can immediately tell this is a valuation calculation, distinct from siblings like irr or fv, though no sibling is named explicitly to sharpen the boundary.

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?

Gives explicit conditional guidance for the optional parameter: by default the first flow is discounted one period "as spreadsheet NPV does; set first_flow_at_time_zero to leave it undiscounted." That resolves the main usage ambiguity (which convention is in effect). No guidance on when to prefer this over irr/fv, but the conditional rule is clear.

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

Deploy Server

Other Tools