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.

Schema Changelog

Changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. First observed

TDQS

A4.6/5.0
Behavior5/5

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

Annotations already provide readOnlyHint, idempotentHint, and destructiveHint, but the description goes further by asserting 'pure deterministic calculation — no side effects, no network or storage access, no randomness' and details the Newton-Raphson with bisection fallback. This adds concrete behavioral context that neither the annotations nor the schema communicate.

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 description uses a clear sectioned structure (WHEN TO USE, WHEN NOT TO USE, BEHAVIOUR, RETURNS, PARAMETERS) and front-loads the core purpose and scoping. However, the PARAMETERS section is redundant with the input schema, so not every sentence earns its place. The length is otherwise justified by the lack of an output schema.

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?

Since there is no output schema, the description compensates by fully specifying the return object: concept, definition, formula, calculation (including IRR percentage string, MOIC, cash_flows array), interpretation, and sensitivity breakdown. It also covers input constraints, algorithm behavior, and intended use cases, making the tool safely and correctly invokable by an agent.

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%, with each parameter already well-documented in the input schema. The description's PARAMETERS section simply repeats that information and does not add meaningful new semantics beyond what the schema provides. The baseline 3 applies because the schema carries the full burden, and the description does not compensate or extend it.

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 opens with a specific verb ('Calculate') and resource ('Internal Rate of Return (IRR), MOIC and an IRR sensitivity table'), then narrows the exact scope: a single lump-sum equity investment with one exit value after a whole-year hold period. It additionally distinguishes itself from sibling tools by emphasizing what it is not, so an agent can clearly separate it from 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?

Contains explicit WHEN TO USE and WHEN NOT TO USE sections. It names the alternative tools (calculate_npv, calculate_moic, irr_sensitivity) and the conditions that select them, such as multiple intermediate distributions or needing only the sensitivity grid. This is a textbook example of clear routing guidance.

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.6/5.0
Disambiguation4/5

Most tools map cleanly to distinct valuation concepts (CAPM, WACC, DCF, multiples, NPV/IRR/MOIC, beta adjustment), so an agent can generally select correctly. The main ambiguity is that calculate_irr already includes MOIC and an IRR sensitivity table, making irr_sensitivity and calculate_moic partially overlapping in purpose despite their clarifications.

Naming Consistency4/5

The overwhelming pattern is calculate_<metric>, with clear snake_case and a consistent prefix throughout. The one outlier is irr_sensitivity, which drops the calculate_ prefix and breaks the established verb_noun convention.

Tool Count5/5

Twelve tools is a well-scoped size for a valuation calculation API, covering cost of capital, DCF, multiples, and return metrics without bloat. Each tool represents a meaningful standalone calculation an agent would need.

Completeness4/5

The core valuation workflow is well covered: cost of equity, WACC, DCF, enterprise value, multiples, and investment return metrics are all present. The notable gap is the reverse of calculate_enterprise_value—deriving equity value from enterprise value—and there is no standalone terminal value calculator, though both are workable gaps.