Skip to main content
Glama
MCP Financial Calculator

MCP Financial Calculator

xnpv

Calculate net present value for irregular cashflows using a discount rate and dated amounts, supporting non-periodic payment schedules.

Instructions

Calculate XNPV from irregular cashflows and a discount rate.

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": {
      "rate": "<rate>",
      "cashflows": "<cashflows>"
    },
    "name": "xnpv"
  }
}

Input Schema

NameRequiredDescriptionDefault
rateYes
cashflowsYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

C2.7/5.0
Behavior2/5

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

No annotations are supplied, so the description carries the full behavioral burden and does not meet it. It says nothing about sign conventions for outflows, whether cashflows must be sorted by date, whether both positive and negative flows are required, the return format, or error behavior when the rate is invalid.

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?

A single front-loaded sentence with no filler or redundancy. It is efficient, though the terseness is part of why semantics are underspecified rather than a model of concision.

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

Completeness2/5

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

With no annotations, no output schema, and a nested cashflow array whose fields carry no descriptions, the definition leaves too much undefined for a financial calculation tool. An agent could construct a syntactically valid call and still get a wrong or rejected result due to rate units or date format.

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

Parameters2/5

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

Schema description coverage is 0%, so both parameters are undocumented in structured data, and the description only restates them in prose ("cashflows and a discount rate"). It does not say whether rate is a decimal fraction or percentage, what string format the nested date field expects, or how amount signs are interpreted — the exact gaps an agent would hit when constructing the call.

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 and resource ("Calculate XNPV from irregular cashflows and a discount rate"), and the phrase "irregular cashflows" signals the contrast with periodic NPV. The term XNPV itself is domain jargon and is never expanded, so an agent unfamiliar with the acronym gets only partial differentiation from the sibling npv.

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

Usage Guidelines2/5

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

There is no explicit when-to-use or when-not-to-use guidance and no named alternative, even though siblings npv, xirr, and irr are obvious candidates for confusion. The word "irregular" hints at the use case, but the agent is left to infer that periodic cashflows should go to npv instead.

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