Skip to main content
Glama

IRR & NPV Calculator

finance_irr_npv

Compute NPV at any discount rate and solve IRR (bisection on the IRR equation) for a period cash-flow series: investment analysis, project comparison and bond-style math with exact, reproducible results. Period 0 is the initial outflow. Use this when an agent needs to internal rate of return + discounted value of cash flows. x402 price $0.01/call (USDC, eip155:8453).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
ratePctYesDiscount rate (%)
cashflowsYesCash flows

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A3.7/5.0
Behavior4/5

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

With no annotations, the description carries the full burden and does disclose real behavior: the IRR is solved by bisection on the IRR equation, results are 'exact, reproducible', period 0 is treated as the initial outflow, and the call costs $0.01 USDC via x402 on eip155:8453. It omits known failure modes for this class of tool (IRR non-convergence, multiple sign-change roots) and any error behavior.

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 core sentence is front-loaded and information-dense, and the pricing note is worth keeping. However, the 'Use this when an agent needs to internal rate of return + discounted value of cash flows' sentence is both ungrammatical and redundant with the opening, so not every sentence earns its place.

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?

There is no output schema and no annotations, so the description should cover both behavior and return shape. It explains what is computed and the sign convention but never says what comes back (NPV scalar? IRR as a percentage? both?) or how ambiguous/no-solution cases are reported, leaving an agent unable to anticipate the response.

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 100%, so the baseline is 3. The description adds a meaningful convention ('Period 0 is the initial outflow') that the schema does not state, but it does not resolve the biggest ambiguity: cashflows is typed as a string with the description 'Cash flows', and the description never explains the expected encoding of that series.

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?

The description names two specific computations (NPV at any discount rate, IRR via bisection on the IRR equation) over a clearly scoped input (a period cash-flow series), plus concrete domains (investment analysis, project comparison, bond-style math). An agent can distinguish it from finance_roi_calculator, finance_cagr_calculator and finance_amortization_schedule without opening any schema.

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?

It lists application contexts (investment analysis, project comparison, bond math) and a trigger phrase, but the trigger sentence 'Use this when an agent needs to internal rate of return + discounted value of cash flows' merely restates the purpose. No sibling alternative or exclusion is named (e.g., use ROI for a single simple return, CAGR for growth rates), so usage is implied rather than guided.

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.

Resources