Skip to main content
Glama

finance.npv

Read-onlyIdempotent

Calculates net present value from cash flows and a per-period discount rate, with configurable decimal rounding for investment appraisal.

Instructions

순현재가치를 계산한다. NPV = sum(CF_t / (1+r)^t). cashflows 의 index 0 은 t=0 시점이라 할인하지 않으며 초기 투자는 음수로 넣는다. rate 는 기간당 할인율(0 이상 Decimal 문자열), decimals(기본 2)자리로 rounding(기본 HALF_EVEN) 처리한다. 첫 현금흐름을 1기 말로 보려면 앞에 0 을 추가한다.

Input Schema

NameRequiredDescriptionDefault
rateYes
decimalsNo
roundingNoHALF_EVEN
cashflowsYes

Output Schema

NameRequiredDescriptionDefault
npvYes
_metaNo서버가 붙이는 영수증(integrity), 엔진, 힌트
traceYes계산 근거(tool, formula, inputs, steps, output)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.3.0

TDQS

A4.2/5.0
Behavior4/5

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

With readOnly/idempotent/openWorld annotations already covering the safety profile, the description adds real behavioral detail: rounding is applied to decimals (default 2) places using HALF_EVEN. It still doesn't spell out return shape or handling of non-conforming input, but the added rounding semantics are valuable.

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?

Front-loads the purpose and formula, then layers conventions. Sentences are dense but each carries meaning; nothing is wasted, though the formula could be seen as redundant for expert callers.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

An output schema exists so return values needn't be described, and the description covers inputs and timing conventions thoroughly. Complete enough for correct invocation of a read-only calculator.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Despite 0% schema coverage, the description documents all four parameters: rate is a per-period discount rate as a Decimal string ≥ 0, cashflows index 0 is undiscounted with negative for investment, decimals default 2, rounding default HALF_EVEN. This fully compensates for the bare schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb+resource ('순현재가치를 계산한다') and supplies the exact formula NPV = sum(CF_t / (1+r)^t), so the operation is unambiguous. It does not explicitly contrast with finance.pv or finance.irr, so it falls short of full sibling differentiation.

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

Usage Guidelines4/5

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

Gives concrete usage conventions: index 0 is t=0 and not discounted, initial investment goes in as negative, and prepend a 0 to treat the first cashflow as end-of-period-1. These resolve the main ambiguity about timing but do not say when to choose npv over pv/irr.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Deploy Server

Other Tools