Skip to main content
Glama
finance-mcp

finance-mcp

irr

Read-onlyIdempotent

Calculate the internal rate of return for periodic cash flows, including an initial investment at time 0, to assess investment profitability. Requires at least one positive and one negative cash flow.

Instructions

Internal rate of return of periodic cash flows (first flow at time 0). Needs at least one positive and one negative flow.

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": {
      "cash_flows": "<cash_flows>"
    },
    "name": "irr"
  }
}

Input Schema

NameRequiredDescriptionDefault
guessNo
cash_flowsYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.7/5.0
Behavior3/5

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

Annotations already declare this a read-only, idempotent, closed-world computation, so the safety profile is covered. The description adds the meaningful convention that the first flow occurs at time 0, but says nothing about failure modes beyond the sign precondition — no mention of non-convergence, multiple IRRs, or how the 'guess' affects the solve.

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?

A single compact sentence that front-loads the operation and follows with the critical precondition. No filler, no restatement of the tool name.

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

Completeness3/5

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

There is no output schema, and the description does not say what form the result takes (rate per period as a decimal or percentage) or how the optional guess is used, which matters for a numerical solver. For a two-parameter compute tool this is adequate but leaves callers guessing at the return format and convergence behavior.

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 0%, so the description must carry parameter meaning; it partially does by defining cash_flows as periodic with the first element at time 0. The second parameter, 'guess', is never mentioned in the description and its number|string type is undocumented anywhere, leaving a real gap.

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 computation ('internal rate of return of periodic cash flows') rather than restating the name, so an agent knows exactly what is returned. It implicitly separates itself from siblings like npv or fv by naming the distinct financial quantity, but never explicitly contrasts with them.

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 a hard precondition ('needs at least one positive and one negative flow') that tells the agent when the tool is applicable and prevents a guaranteed no-solution call. It offers no guidance on when to prefer irr over npv or what to do when the precondition fails, but the applicability condition is clear.

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