Skip to main content
Glama

valuation-api

calculate_irr

Read-onlyIdempotent

Calculate the Internal Rate of Return (IRR), MOIC and an IRR sensitivity table for a single lump-sum equity investment that returns one exit value after a whole-year hold period. WHEN TO USE: you have an upfront investment amount, a single exit value and a hold period in whole years (standard PE/VC single-exit scenario) and need the annualised return, the money multiple, or a return stress-test. The result also includes a plain-language interpretation benchmarked against VC/PE/public-market return hurdles. WHEN NOT TO USE: for cash-flow streams with multiple intermediate distributions (use calculate_npv or calculate_moic on the full cash-flow array), or when you only need the sensitivity grid (use irr_sensitivity). BEHAVIOUR: pure deterministic calculation — no side effects, no network or storage access, no randomness; idempotent and non-destructive; identical inputs always produce identical outputs. IRR is solved over the cash-flow schedule [-investment, 0, ..., exit_value] via Newton-Raphson with bisection fallback. RETURNS: JSON object with concept, definition, formula, calculation (irr as a percentage string, moic as a multiple, cash_flows array), interpretation, and sensitivity (byMultiple, byHoldPeriod). PARAMETERS: initial_investment (number > 0, currency units), exit_value (number > 0, same currency units), hold_period (integer >= 1 whole years), currency (optional string: GBP default, USD, EUR, JPY, CHF — display only, no conversion).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
currencyNoOptional display currency code. Defaults to GBP. Used only for formatting output labels — no FX conversion is performed.GBP
exit_valueYesValue returned at exit, same currency units as initial_investment, e.g. 250000. Must be positive.
hold_periodYesHolding period in whole years, e.g. 5. Must be a positive integer (1, 2, 3, ...).
initial_investmentYesAmount invested up front, in currency units, e.g. 100000. Must be positive.

TDQS

A4.5/5.0
Behavior4/5

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

The BEHAVIOUR section adds context beyond annotations: 'pure deterministic calculation — no side effects, no network or storage access, no randomness; idempotent and non-destructive' plus the solving method ('Newton-Raphson with bisection fallback') and cash-flow schedule shape. Since annotations already declare readOnlyHint, idempotentHint, and destructiveHint, the description's additional algorithmic detail earns a 4 rather than a 5. No contradiction with 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?

Though long, the description is modular with scannable labels — WHEN TO USE, WHEN NOT TO USE, BEHAVIOUR, RETURNS, PARAMETERS — and the core purpose is front-loaded in the first sentence. Every sentence carries information proportional to the tool's complexity (three outputs, sensitivity grid, algorithmic disclosure).

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?

With no output schema present, the RETURNS section fully documents the JSON shape: 'concept, definition, formula, calculation (irr as a percentage string, moic as a multiple, cash_flows array), interpretation, and sensitivity (byMultiple, byHoldPeriod)'. Combined with 100% parameter coverage, named sibling alternatives, and behavioral disclosure, nothing an agent needs to invoke this tool correctly is missing.

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 baseline is 3; each parameter already carries a schema description covering positivity, currency units, integer restriction, and the currency enum with 'display only — no conversion'. The PARAMETERS section in the description largely restates the schema rather than adding new meaning, so it does not push above 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?

The opening sentence names a specific verb and resource — 'Calculate the Internal Rate of Return (IRR), MOIC and an IRR sensitivity table' — and precisely scopes it to 'a single lump-sum equity investment that returns one exit value after a whole-year hold period.' This immediately distinguishes it from siblings like calculate_npv, calculate_moic, and irr_sensitivity.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The WHEN TO USE section states the exact trigger condition ('an upfront investment amount, a single exit value and a hold period in whole years'), and WHEN NOT TO USE routes to named alternatives ('use calculate_npv or calculate_moic on the full cash-flow array', 'use irr_sensitivity'). Tool selection is fully explicit with no inference required.

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