Skip to main content
Glama
petropt

petropt/petro-mcp

by petropt

calculate_irr

Calculate Internal Rate of Return for petroleum projects by finding the discount rate where net present value equals zero using monthly cash flow data.

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?

With no annotations provided, the description carries full burden for behavioral disclosure. It mentions the bisection method implementation detail, which is useful, but doesn't cover important aspects like numerical precision, convergence criteria, handling of edge cases (e.g., non-converging cash flows), or what the output looks like. For a calculation tool with mathematical complexity, this is insufficient.

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 appropriately sized with three sentences that each serve a purpose: method explanation, IRR definition, and parameter clarification. It's front-loaded with the core purpose and uses a clear Args section. No wasted words, though the formatting could be slightly cleaner.

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?

Given the tool has an output schema (which handles return values) and only one parameter that's well-explained in the description, the description is reasonably complete for basic usage. However, for a financial calculation tool with mathematical implementation details (bisection method), it should ideally mention numerical behavior, precision, or common pitfalls to be fully complete.

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 0% schema description coverage, the description compensates well by explaining the cash_flows parameter meaningfully. It specifies the array contains monthly cash flows in dollars, clarifies the first element is typically negative (capex), and relates it to the NPV=0 concept. This adds substantial value beyond the bare schema.

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?

The description clearly states the tool calculates Internal Rate of Return using the bisection method, which is a specific verb+resource combination. It distinguishes from siblings like calculate_npv by focusing on IRR rather than NPV, though it doesn't explicitly mention how it differs from other financial calculation tools in the list.

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?

The description provides no guidance on when to use this tool versus alternatives like calculate_npv or calculate_well_economics. It mentions IRR's definition but gives no context about appropriate scenarios, prerequisites, or comparisons with sibling tools.

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