Skip to main content
Glama

finance.payback_period

Read-onlyIdempotent

Calculates simple payback period from an initial investment and periodic cash flows, using linear interpolation to identify when cumulative cash flow becomes non-negative.

Instructions

단순 투자회수기간을 계산한다. cashflows 의 index 0 은 음수인 초기 투자이고 이후 값은 기간별 현금흐름이다. 누적 현금흐름이 처음 0 이상이 되는 기간 안에서 선형 보간하며, 회수되지 않으면 payback_period=null 과 recovered=false 를 반환한다. 화폐의 시간가치는 반영하지 않으며 decimals(기본 6)자리로 rounding(기본 HALF_EVEN) 처리한다.

Input Schema

NameRequiredDescriptionDefault
decimalsNo
roundingNoHALF_EVEN
cashflowsYes

Output Schema

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

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.3.0

TDQS

A4.7/5.0
Behavior5/5

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

Goes well beyond the readOnly/idempotent annotations: it discloses the interpolation rule, the unrecovered-case return (payback_period=null, recovered=false), the absence of discounting, and default rounding behavior. These are exactly the behaviors an agent cannot infer from structured fields.

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?

Four dense sentences, front-loaded with purpose, then input contract, then algorithm edge case, then caveat/rounding. No sentence is redundant and no filler appears.

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?

With an output schema present, return shape needn't be explained, yet the description still documents the null/recovered failure mode. The only small gap is that accepted rounding mode values and any constraint on cashflow length are not described.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/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 the burden, and it does: cashflows index 0 is defined as the negative initial outlay with subsequent entries as per-period flows, and decimals/rounding defaults and their effect are stated. This is precisely the semantic gap the bare array schema leaves.

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 ('단순 투자회수기간을 계산한다') that is clearly distinct from sibling finance tools such as npv, irr, roi, and the depreciation family. An agent can identify the computation without opening the schema.

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 qualifier '단순' plus the explicit note that 화폐의 시간가치 is not reflected effectively excludes discounted-payback use cases, telling the agent when this tool is the wrong choice. However, no sibling alternative (e.g. npv/irr) is named for the discounted case, so it stops short of full when/when-not routing.

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