Skip to main content
Glama

valuation-api

calculate_npv

Read-onlyIdempotent

Calculate the Net Present Value (NPV) of an ordered cash-flow series discounted at a given rate. The first cash flow is treated as time 0 and is NOT discounted (typically the negative initial investment). WHEN TO USE: to evaluate whether an investment creates or destroys value at a required discount rate, or to compare competing projects on a present-value basis when you have a full cash-flow schedule. WHEN NOT TO USE: for a single lump-sum investment with one exit value (use calculate_irr), or when you only need a money multiple with no time value (use calculate_moic). BEHAVIOUR: pure deterministic calculation — no side effects, no network or storage access; idempotent and non-destructive; identical inputs always produce identical outputs. RETURNS: JSON object { npv: number rounded to 2dp, rate, cash_flows }. A positive NPV means the investment clears the discount-rate hurdle. PARAMETERS: rate (decimal discount rate, e.g. 0.10 = 10% — express as a decimal, never as percentage points), cash_flows (ordered number array starting at time 0; negative values are investments/outflows, positive values are distributions/inflows), e.g. [-100000, 0, 0, 0, 0, 250000].

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
rateYesDiscount rate as a decimal, e.g. 0.10 = 10%. Never pass percentage points (10 is invalid for 10%).
cash_flowsYesOrdered cash flows starting at time 0 (first element is not discounted). Negative = investment/outflow, positive = distribution/inflow. Example: [-100000, 0, 0, 0, 0, 250000].

TDQS

A4.3/5.0
Behavior4/5

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

Annotations already convey readOnly, idempotent, non-destructive behavior; the description adds 'no side effects, no network or storage access' and 'identical inputs always produce identical outputs.' It also documents return rounding to 2dp and the sign interpretation of NPV, though some statements simply restate the annotations.

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?

The description is long but organized into labeled sections that front-load purpose and then add usage, behavior, returns, and parameters. Every sentence carries distinct routing or invocation information, and there is no filler or repetition that bloats the definition.

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?

Despite having no output schema, the description specifies the return object shape, rounding, cash-flow ordering, sign conventions, discount-rate format, and decision meaning of positive NPV. With only two fully documented parameters, an agent has everything needed to invoke the tool correctly.

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 100%, so the schema already explains rate as a decimal and the ordered cash-flow sign convention. The description largely paraphrases these details and adds only a worked example, not new parameter semantics beyond the baseline.

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

Purpose5/5

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

Uses a specific verb and resource ('Calculate the Net Present Value') and defines the core semantics: ordered cash-flow series, first flow at time 0 not discounted. It explicitly names the alternatives calculate_irr and calculate_moic in the WHEN NOT TO USE section, so it is distinguishable from siblings.

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?

Provides an explicit WHEN TO USE and WHEN NOT TO USE with named alternatives (calculate_irr, calculate_moic), which is strong routing guidance. It does not mention calculate_dcf, a semantically close sibling, so the agent is not fully told how to choose between NPV and DCF.

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.

TDQS

A4.3/5.0
Disambiguation5/5

Every tool targets a distinct financial metric or formula, and the WHEN TO USE / WHEN NOT TO USE guidance clearly separates closely related concepts like DSO vs. receivables turnover, current vs. quick vs. cash ratio, and DPI/RVPI/TVPI. Even the overlapping investment-return tools (NPV, IRR, MOIC, payback) are explicitly differentiated.

Naming Consistency4/5

The overwhelming majority of tools follow a clean calculate_<metric> snake_case pattern, making the set highly predictable. The single exception is irr_sensitivity, which breaks the calculate_ prefix convention but is still readable and not chaotic.

Tool Count2/5

At 52 tools, this far exceeds the 25+ threshold where a tool set becomes too heavy for its scope. Although each tool is a distinct pure calculation, the sheer breadth creates a large navigation and selection burden for agents.

Completeness4/5

The server covers an unusually broad range of valuation workflows: time value of money, DCF/WACC/cost of capital, relative valuation multiples, profitability/liquidity/efficiency ratios, and private equity fund metrics. Minor gaps exist, such as no dedicated free cash flow, net debt, or EBITDA margin calculators, but these are workable around.

Resources