Skip to main content
Glama

Dated cash flows: NPV and internal rate of return

compute_cashflow_metrics
Read-onlyIdempotent

Net present value and internal rate of return of 2-360 dated cash flows. NPV at a stated annual effective rate, Actual/365 Fixed day count as in spreadsheet XNPV. XIRR-style rate by a bracketed, bounded search that says when no rate exists, when several may exist or when it did not converge. Arithmetic only: no currency conversion, tax rule or financial advice.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "flows": "<flows>"
    },
    "name": "compute_cashflow_metrics"
  }
}

Input Schema

NameRequiredDescriptionDefault
flowsYes
discount_rateNoAnnual effective rate as a fraction (0.08 for 8 %). Omit to skip the NPV.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.6/5.0
Behavior5/5

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

Beyond the read-only/idempotent annotations, the description discloses the IRR solver's behavior: a bracketed, bounded search that reports no-rate, multiple-rate, and non-convergence outcomes. It also states the day-count convention, which materially affects results and is not implied by annotations.

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?

Four tight sentences, front-loaded with the core operation, then method, then solver caveats, then scope limits. No filler and no repetition of the title.

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?

For a two-parameter calculation tool with no output schema, the description adequately covers inputs, method, and failure modes of the IRR search. It stops short of describing the returned structure (e.g., how NPV and rate are packaged), leaving the response shape to be discovered.

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?

With only 50% schema description coverage, the description compensates by specifying the day-count convention (Actual/365 Fixed) and clarifying that NPV uses a stated annual effective rate while the IRR is derived by search. Sign convention and the discount-rate fraction encoding remain in the schema rather than being restated.

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 names the exact operation and resource: net present value and internal rate of return over 2-360 dated cash flows. It goes further than the title by scoping the method (Actual/365 Fixed XNPV, XIRR-style search) so an agent knows precisely what is computed.

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?

It establishes a clear context (dated cash-flow valuation) and an explicit exclusion: 'Arithmetic only: no currency conversion, tax rule or financial advice.' There are no near siblings to route between, but the guidance is framed as scope limits rather than when-not-to-call conditions.

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