Skip to main content
Glama

Amaltash Investment & Retirement Calculators

ROI Calculator

calculate_roi
Read-onlyIdempotent

ROI Calculator with a chart, the same math as the web page. What was my return on investment? ROI is how much you made or lost compared with what you put in. It compares what you got back with what you put in. It shows the total return and the return per year. It does not say what any investment will return. People ask for it as "roi calculator", "how to calculate return on investment" or "how do i calculate roi".

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "calculate_roi"
  }
}

Input Schema

NameRequiredDescriptionDefault
yNoYears you held it. In years. Optional. Adds the ROI per year. Default: 5.
inNoMoney you put in. US dollars. Default: 10000.
incNoMoney it paid you along the way. US dollars. Such as dividends or rent you kept as cash. Default: 0.
backNoMoney you got back. US dollars. What it is worth now, or what you sold it for. Default: 15000.
costNoExtra costs. US dollars. Such as fees or repairs. They count as money you put in. Default: 0.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

B3.2/5.0
Behavior3/5

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

Annotations already declare readOnlyHint, idempotentHint, non-destructive, and closed-world, so the safety profile is fully covered. The description adds output-side context ('with a chart,' total return and per-year return) and a scope caveat, which is useful. It does not explain the chart format, how the per-year figure is derived, or what happens when optional inputs are omitted beyond what the schema already defaults.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness2/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The definition is padded with redundant restatements — 'ROI is how much you made or lost compared with what you put in. It compares what you got back with what you put in' says the same thing twice. The trailing list of user query phrasings is keyword stuffing rather than specification, and the actual capability statement is buried after the generic explanation.

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?

With 100% schema coverage, no required parameters, no nesting, and no output schema, the structured fields carry most of the burden. The description partially compensates by noting a chart is returned alongside total and annualized return. It never explains the calculation basis or how inputs combine, leaving an agent to infer the math.

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 100% and each of the five parameters carries units, meaning, and a default in the schema itself. The description contributes nothing parameter-specific except an oblique reference to per-year output, so no meaning is added beyond the schema. Baseline 3 applies.

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 identifies a concrete task (computing ROI from money in, money back, and interim income) and states what it produces: 'the total return and the return per year,' plus a chart. It also bounds the scope with 'It does not say what any investment will return.' It stops short of an explicit verb+resource sentence like 'Calculates ROI from amounts you supply,' relying on definitional prose instead.

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

Usage Guidelines3/5

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

Usage is only implied through the sample user phrasings ('roi calculator', 'how to calculate roi'), which help routing but are keyword lists rather than guidance. There is one genuine scope exclusion (it does not predict future investment returns), but no comparison to sibling calculators such as calculate_cagr or compound_interest that an agent could use to pick correctly.

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