Skip to main content
Glama

finance_npv_irr

Read-only

NPV, IRR, MIRR, payback + XIRR — Capital-budgeting math for a cash-flow series: NPV, IRR (every root, with a multiple-IRR warning), MIRR, simple and discounted payback, profitability index, NPV sensitivity at rate +/- 2 points, ACCEPT/REJECT verdict. Optional dates= gives Excel-matching XNPV/XIRR. Params: flows= (comma list starting at period 0, e.g. -10000,3000,4200,6800), rate= (percent per period), finance_rate=, reinvest_rate=, periods_per_year= (12 for monthly; adds annualized IRR), dates=YYYY-MM-DD list. Price: $0.002 USDC (Base, via x402).

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": {
      "flows": "<flows>",
      "rate": "<rate>"
    },
    "name": "finance_npv_irr"
  }
}

Input Schema

NameRequiredDescriptionDefault
rateYes8
flowsYes-10000,3000,4200,6800

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4/5.0
Behavior4/5

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

Annotations already cover the safety profile (readOnlyHint=true, destructiveHint=false), so the bar is lower, and the description adds real behavioral context beyond them: it discloses that IRR returns every root with a multiple-IRR warning, that the result includes an ACCEPT/REJECT verdict and NPV sensitivity at rate +/- 2 points, and that invocation is paid ($0.002 USDC on Base via x402). That payment detail is especially valuable and is not captured anywhere in structured data.

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?

The tool's purpose is front-loaded in the first clause, followed by the output inventory and then parameters, so an agent can stop reading early. It is dense and slightly run-on, with the parameter block crammed into one sentence, but almost no sentence is filler.

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?

With no output schema, the description usefully enumerates returned metrics and the verdict, which is the right compensation. However, it lists money rates and dates options that the schema does not expose, and it does not explain what happens with malformed flows or missing dates, leaving a gap between advertised and actual callable surface.

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's own descriptions are essentially placeholders ('8' for rate, a sample value for flows), so the description does necessary work: flows is a comma list starting at period 0 with a worked example, rate is percent per period, and dates is a YYYY-MM-DD list. It loses a point because it advertises finance_rate, reinvest_rate, and periods_per_year as parameters, none of which appear in the schema, so the agent cannot tell which inputs are actually accepted.

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 a precise verb-and-resource scope: capital-budgeting math over a cash-flow series, enumerating NPV, IRR (all roots), MIRR, simple and discounted payback, profitability index, and XIRR. It is specific enough that an agent can distinguish it from generic cashflow or loan calculators in the sibling list without opening the 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?

Usage cues are embedded in parameter notes ('Optional dates= gives Excel-matching XNPV/XIRR', 'periods_per_year= (12 for monthly; adds annualized IRR)'), which tell the agent how to select behavior but not when to pick this tool over siblings like finance_cashflow or finance_invest_calc. No explicit when-not or alternative is named.

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