Skip to main content
Glama

finance.roi

Read-onlyIdempotent

Calculate return on investment from net profit and investment cost, returning a decimal multiplier rounded to the requested digits; not an annualized return.

Instructions

투자수익률(ROI)을 계산한다. ROI = net_profit / investment_cost. net_profit 은 손실이면 음수인 Decimal 문자열이고 investment_cost 는 0보다 커야 한다. 결과는 배수(0.25 = 25%)이며 decimals(기본 4)자리로 rounding(기본 HALF_EVEN) 처리한다. 기간을 반영한 연환산 수익률은 아니다.

Input Schema

NameRequiredDescriptionDefault
decimalsNo
roundingNoHALF_EVEN
net_profitYes
investment_costYes

Output Schema

NameRequiredDescriptionDefault
roiYes
_metaNo서버가 붙이는 영수증(integrity), 엔진, 힌트
traceYes계산 근거(tool, formula, inputs, steps, output)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.3.0

TDQS

A4.3/5.0
Behavior4/5

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

Annotations already establish readOnly/idempotent/closed-world, and the description adds genuine domain behavior: investment_cost must be strictly positive, net_profit may be a negative Decimal for losses, and the output is a multiplier rather than a percent. It does not say what error occurs when investment_cost is 0, which is the main remaining behavioral gap.

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?

Four sentences, front-loaded with the formula and then constraints and output convention; no filler. It does restate the schema defaults (decimals=4, HALF_EVEN) verbatim, which is slightly redundant, though it frames them as behavior rather than raw defaults.

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

Completeness4/5

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

An output schema exists, so return structure needn't be explained, yet the description usefully clarifies that the returned value is a multiplier (0.25 = 25%). With a 0%-covered schema and a few edge cases (zero cost, invalid rounding token) left unaddressed, it is nearly but not 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?

Schema coverage is 0%, so the description must carry the parameters, and it largely does: net_profit as a signed Decimal string, investment_cost with a >0 domain constraint, and the meaning of decimals and rounding. The rounding parameter's accepted string values are still not enumerated anywhere.

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?

States a specific verb+resource (calculate ROI) and gives the exact formula ROI = net_profit / investment_cost, so the computation is unambiguous. It also carves out scope by stating it is not a period-annualized return, which implicitly separates it from the finance.cagr sibling that handles annualized growth.

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?

The closing sentence clarifies when this is the wrong tool ('기간을 반영한 연환산 수익률은 아니다'), giving a real exclusion criterion. It stops short of naming the alternative (finance.cagr) explicitly, so the routing hint requires one inference.

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