Skip to main content
Glama

tvm-fund

calculate_discounted_payback_period

Read-onlyIdempotent

Calculate the discounted payback period: how many years until the DISCOUNTED cumulative cash flows recover the initial investment, incorporating the time value of money. Formula: Discounted payback = the year t where cumulative discounted cash flow turns positive. WHEN TO USE: Use when you want a payback-style risk screen that still respects the cost of capital — a project can pay back nominally but never on a discounted basis. WHEN NOT TO USE: Do NOT use for the final go/no-go decision (it still ignores flows after payback); use calculate_payback_period for the nominal (undiscounted) recovery view and combine with profitability and return analysis for the full decision. BEHAVIOUR: If discounted cumulative cash flow never turns positive, an explicit error is returned rather than a number. RETURNS: JSON object { discounted_payback_period_years: number (e.g. 4.2), inputs }. If the discounted flows never recover the investment, returns an explicit error stating no payback occurs. PARAMETERS: cash_flows (required): Ordered cash flows starting at time 0 (first element is the initial investment, typically negative), e.g. [-250000, 50000, 75000, 100000, 125000]. The time-0 flow is not discounted. rate (required): Discount rate as a decimal, e.g. 0.10 = 10% (never pass percentage points). Must be >= 0.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
rateYesDiscount rate as a decimal, e.g. 0.10 = 10% (never pass percentage points). Must be >= 0.
cash_flowsYesOrdered cash flows starting at time 0 (first element is the initial investment, typically negative), e.g. [-250000, 50000, 75000, 100000, 125000]. The time-0 flow is not discounted.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.7/5.0
Behavior5/5

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

Annotations already indicate read-only and non-destructive behavior, and the description adds substantial detail beyond that: it discloses the explicit error condition when cumulative discounted cash flows never recover, and describes the exact return shape. This gives the agent useful behavioral expectations.

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?

The description is well-organized with clear sections (purpose, formula, when to use, behavior, returns, parameters). Despite being detailed, every section adds necessary information and no filler is present.

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?

The description fully covers the tool's behavior, return value, error condition, and parameter semantics. Since there is no output schema, it appropriately explains the JSON result shape and provides a concrete example, leaving no critical gap for correct invocation.

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. The description repeats the parameter details from the schema rather than adding new semantic information, though the examples and the warning about passing decimal rather than percentage points are helpful.

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 ('Calculate') and resource ('discounted payback period'), clearly defining the concept and formula. It explicitly distinguishes itself from the nominal payback calculation, making it easy to differentiate from calculate_payback_period.

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 dedicated WHEN TO USE and WHEN NOT TO USE sections. It specifies appropriate use as a payback-style risk screen and explicitly warns against using it for final go/no-go decisions, naming calculate_payback_period as the alternative.

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