Skip to main content
Glama

Valor presente neto (VPN)

fin-npv
Read-onlyIdempotent

Calcula el valor presente neto de flujos de caja a una tasa por periodo; el primer flujo es el tiempo 0. Cuándo: un cálculo de dinero, impuestos o matemática financiera tiene que ser exacto y reproducible (redondeo, centavos, tasas). No para: calcular la tasa interna de retorno de flujos periódicos (fin-irr). Efectos secundarios: ninguno (solo lectura, sin red, sin estado guardado). Determinista: la misma entrada da la misma salida. Límites: entrada JSON de hasta 64 KB, 1 s por llamada, resultado de hasta 1 MB.

EN: Computes the net present value of cash flows at a discount rate per period, with the first flow at time 0 (not discounted); Excel NPV() instead discounts the first flow. When: a money, tax or financial-math result has to be exact and reproducible (rounding, cents, rates). Not for: computing the internal rate of return of periodic cash flows (fin-irr). Side effects: none (read-only, no network access, no stored state). [EN completo / full EN: inputSchema.description]

Input Schema

NameRequiredDescriptionDefault
rateYesDiscount rate per period (decimal) (number; required; min -0.99; max 10).
cash_flowsYesCash flows; index 0 is time 0 (array of number; required; at least 2 items; up to 1000 items).

Output Schema

NameRequiredDescriptionDefault
npvNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • addedInput schema / properties / cash_flows / examples
      Added value: +[
      +  [
      +    -1000,
      +    300,
      +    400,
      +    500
      +  ]
      +]
    • addedInput schema / properties / rate / examples
      Added value: +[
      +  0.1
      +]
  2. Changed1 schema field changed
    • addedInput schema / description
      Added value: +"EN: Computes the net present value of cash flows at a discount rate per period, with the first flow at time 0 (not discounted); Excel NPV() instead discounts the first flow. When: a money, tax or financial-math result has to be exact and reproducible (rounding, cents, rates). Not for: computing the internal rate of return of periodic cash flows (fin-irr). Side effects: none (read-only, no network access, no stored state). Deterministic: the same input gives the same output. Limits: JSON input up to 64 KB, 1 s per call, result up to 1 MB."
  3. First observed

TDQS

A4.6/5.0
Behavior4/5

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

Annotations already declare readOnly, idempotent, non-destructive and closed-world, so the safety profile is covered. The description still adds non-trivial context beyond them: determinism, no network/state, and concrete limits (64 KB input, 1 s per call, 1 MB result). It is silent on how the result is shaped only because an output schema 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?

Front-loaded with the definition, then when/not-for, then side effects, determinism and limits — a clean template with no filler sentences. Slight redundancy because the ES/EN content overlaps and the trailing reference to inputSchema.description duplicates text the agent already receives.

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?

For a two-parameter pure calculation with an output schema, everything an agent needs is present: computation convention, precision rationale, exclusion route to fin-irr, determinism and hard limits. Return values are correctly left to the output schema.

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 the decisive semantic detail the schema only gestures at: index 0 is time 0 and is NOT discounted, unlike Excel NPV(). That distinction prevents a classic off-by-one discounting error.

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+resource ('calcula el valor presente neto de flujos de caja a una tasa por periodo') and pins down the convention that matters: first flow at time 0 and not discounted. Explicitly contrasts with Excel NPV() and with sibling fin-irr, so an agent can discriminate without opening either schema.

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?

Both branches are explicit: 'Cuándo' gives the selection condition (money/tax/financial math needing exact, reproducible results) and 'No para' names the excluded case and the sibling to use instead (fin-irr). Nothing is left to inference.

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