Skip to main content
Glama

tvm-fund

calculate_perpetuity_value

Read-onlyIdempotent

Calculate the present value of a perpetuity: a constant (or constant-growth) cash flow received forever, discounted at a required rate. Formula: Perpetuity PV = CF / r; Growing perpetuity PV = CF / (r - g). WHEN TO USE: Use to value perpetual streams such as preferred dividends, ground rents, endowment-style income, or the terminal-value leg of a discounted-cash-flow valuation (Gordon Growth Model). WHEN NOT TO USE: Do NOT use for finite cash-flow streams (use calculate_annuity_present_value), and do NOT set growth_rate >= rate — the formula is undefined there (it implies an infinite value). BEHAVIOUR: pure deterministic calculation — no side effects, no network or storage access; idempotent and non-destructive; identical inputs always produce identical outputs. Division by zero, non-finite inputs, or mathematically undefined combinations return an explicit error instead of a number. RETURNS: JSON object { perpetuity_value: number (currency), inputs }. PARAMETERS: cash_flow (required): Periodic cash flow received forever, e.g. 30000. Must be > 0 for a normal perpetuity. rate (required): Required return / discount rate as a decimal, e.g. 0.08 = 8% (never pass percentage points). Must be strictly greater than growth_rate. growth_rate (optional): OPTIONAL perpetual growth rate of the cash flow as a decimal, e.g. 0.03 = 3% (never pass percentage points). Defaults to 0 (no growth). Must be strictly less than rate.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
rateYesRequired return / discount rate as a decimal, e.g. 0.08 = 8% (never pass percentage points). Must be strictly greater than growth_rate.
cash_flowYesPeriodic cash flow received forever, e.g. 30000. Must be > 0 for a normal perpetuity.
growth_rateNoOPTIONAL perpetual growth rate of the cash flow as a decimal, e.g. 0.03 = 3% (never pass percentage points). Defaults to 0 (no growth). Must be strictly less than rate.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.8/5.0
Behavior5/5

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

The description goes beyond the annotations by explaining the tool is a pure deterministic calculation with no side effects, no network/storage access, and idempotent behavior. It also discloses error behavior for division by zero, non-finite inputs, and undefined combinations, which is critical for correct invocation.

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 is longer than average but front-loaded with the core formula and use cases, then organizes behavior, returns, and parameters into labeled sections. Minor redundancy exists because the parameter details largely repeat the input schema, but the explicit parameter warnings are worth having inline.

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?

Despite having no output schema, the description documents the return shape as a JSON object with perpetuity_value and inputs, covers all three parameters with constraints and defaults, includes formulas, and specifies error handling. For this tool's complexity, nothing essential is missing.

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?

Schema coverage is 100%, so the baseline is 3, but the description adds valuable semantic depth: it gives worked examples (30000, 0.08, 0.03), stresses using decimals rather than percentage points, and clarifies the growth_rate default and the required relationship between rate and growth_rate. This lifts it above the 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 description clearly states the tool calculates the present value of a perpetuity, specifying both constant and growing variants with explicit formulas. It also distinguishes itself from related tools by naming calculate_annuity_present_value as the alternative for finite streams and by mentioning Gordon Growth Model usage.

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?

Provides explicit WHEN TO USE guidance with concrete examples (preferred dividends, ground rents, terminal value) and WHEN NOT TO USE with a named sibling tool. It also warns against the undefined mathematical case where growth_rate >= rate, giving clear operational boundaries.

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