Skip to main content
Glama
petropt

petropt/petro-mcp

calculate_irr

Calculate the internal rate of return (IRR) from a series of monthly cash flows. Finds the discount rate that makes net present value zero.

Instructions

Calculate Internal Rate of Return via bisection.

IRR is the annual discount rate at which NPV = 0.

Args: cash_flows: Monthly cash flows ($). First element is typically negative (capex).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
cash_flowsYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior2/5

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

No annotations are provided, so the description must carry the full behavioral burden. It discloses the bisection method and cash flow format, but omits convergence criteria, error handling, return format, or constraints (e.g., sign pattern). This is insufficient for a financial calculation.

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?

The description is concise: two sentences plus an argument list. It front-loads the purpose and efficiently defines IRR. Every sentence earns its place, though it could be more structured with a brief usage note.

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?

Given the tool's financial complexity and the presence of an output schema, the description should explain the return value (e.g., IRR as a decimal or percentage) and constraints (e.g., need for alternating signs). It lacks these details, making it incomplete for reliable use.

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?

The input schema has 0% description coverage, so the description must compensate. It adds value by specifying cash_flows as monthly cash flows in dollars, with the first element typically negative (capex). However, it does not fully document expected format, range, or required signs, leaving some ambiguity.

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 clearly states 'Calculate Internal Rate of Return via bisection' and defines IRR as the annual discount rate at which NPV = 0. The verb 'calculate', resource 'IRR', and method 'bisection' are explicit, distinguishing it from sibling tools like calculate_npv or calculate_breakeven_price.

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?

No guidance on when to use this tool versus alternatives (e.g., NPV, breakeven price). The description only explains the argument and method, lacking context about optimal scenarios or exclusions.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/petropt/petro-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server