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_npv for value creation and calculate_irr for return. 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.

TDQS

A4.6/5.0
Behavior5/5

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

The annotations already signal readOnlyHint=true and idempotentHint=true, so the description's job is to add behavioral detail. It does this well by explaining that an explicit error is returned when discounted cash flows never recover the investment, and by clarifying that the time-0 flow is not discounted. No contradiction with annotations exists.

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 well-structured with clear section labels and front-loads the definition and formula. It is somewhat repetitive around the no-payback error case, appearing under both BEHAVIOUR and RETURNS, but overall each section earns its place and the length is justified for a financial calculation with specific input conventions.

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?

Given the two-parameter schema, no output schema, and read-only annotations, the description is complete. It covers the formula, parameter formats, edge-case behavior, return shape, and explicit guidance about when not to use the tool. An agent has everything needed to invoke it correctly.

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 schema already fully documents both parameters. The description repeats the schema guidance about decimal rates and ordered cash flows, and adds a worked example, but it does not introduce meaningfully new parameter semantics beyond what the schema provides. Baseline 3 is appropriate.

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 identifies the tool's purpose: calculating the discounted payback period using the time value of money. It distinguishes this from the sibling tool calculate_payback_period by explicitly highlighting the difference between nominal and discounted payback, and names calculate_npv and calculate_irr as alternatives for different decisions.

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 description provides explicit WHEN TO USE and WHEN NOT TO USE sections, including the exact conditions under which to choose this tool over calculate_payback_period, calculate_npv, and calculate_irr. This gives an agent clear decision criteria for tool selection.

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
Disambiguation5/5

Each tool targets a mathematically distinct calculation (single-sum PV/FV, annuity, perpetuity, payback, fund multiples). The descriptions include explicit 'WHEN TO USE' and 'WHEN NOT TO USE' sections with cross-references, making it unambiguous which tool applies to which scenario.

Naming Consistency5/5

All tool names follow the exact pattern verb_noun with the consistent 'calculate_' prefix (e.g., calculate_present_value, calculate_payback_period). The naming convention is uniform across the entire set.

Tool Count5/5

11 tools is well within the ideal range for a focused domain. Each tool addresses a distinct calculation relevant to time-value-of-money and fund performance, with no redundant entries.

Completeness3/5

The set covers many core calculations but is missing NPV and IRR, which are explicitly referenced as the recommended tools in several descriptions (e.g., payback periods, TVPI). This creates a notable gap that could lead agents to follow cross-references to non-existent tools.

Resources