Skip to main content
Glama

Npv Irr

npv_irr
Read-onlyIdempotent

Investment appraisal for a cash-flow series: NPV at a discount rate, IRR (all roots for non-conventional flows), MIRR, profitability index, simple and discounted payback; with dates gives Excel-compatible XNPV and XIRR. POST JSON body {cashFlows, ratePct, dates?}. Price: $0.003 USDC per successful call (x402, Solana). Same tool over HTTPS: POST https://scorptech.it.com/api/x402/v1/npv-irr

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": {
      "cashFlows": "<cashFlows>"
    },
    "name": "npv_irr"
  }
}

Input Schema

NameRequiredDescriptionDefault
datesNoOptional YYYY-MM-DD date per cash flow for XNPV / XIRR (Actual/365)
ratePctNoDiscount rate per period (or per year with dates), percent
cashFlowsYesCash flows per period starting at t=0 (investments negative)
financeRatePctNoMIRR finance rate (default ratePct)
reinvestRatePctNoMIRR reinvestment rate (default ratePct)

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A3.9/5.0
Behavior4/5

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

Annotations already cover safety (readOnly, idempotent, non-destructive), so the bar is lower, and the description adds genuinely non-derivable context: x402 payment of $0.003 USDC per successful call on Solana, POST JSON body shape, and an equivalent HTTPS endpoint. It notes that non-conventional flows return all IRR roots, a real behavioral trait. It does not describe failure modes or the response structure.

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?

Front-loads the capability list, then tacks on transport and pricing in one short clause each. Dense but every clause carries information; the pricing/endpoint sentence is long but operationally necessary for a paid x402 tool.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a 5-parameter tool with no output schema, the description tells the agent what metrics are computed (effectively the return surface), how to send input, and what the call costs. Only the concrete response shape and error behavior are left implicit, which is a minor gap given the metric enumeration.

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 cashFlows, ratePct, dates, financeRatePct, and reinvestRatePct are already documented in the schema. The description restates the body fields and the dates/XIRR linkage but adds no syntax or edge-case guidance beyond that, so the baseline 3 applies.

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?

States a specific verb+resource set: investment appraisal over a cash-flow series, enumerating NPV, IRR (all roots for non-conventional flows), MIRR, profitability index, payback, and XNPV/XIRR with dates. That is unmistakably distinct from numeric siblings like compound_interest, loan_apr, or black_scholes.

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?

Implies when the date variant applies ("with dates gives Excel-compatible XNPV and XIRR"), which steers the optional dates parameter, but never says when to pick this tool over adjacent finance tools such as compound_interest, bond_calc, or loan_amortization. Usage is inferable, not stated.

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