Skip to main content
Glama

finance.bond_duration

Read-onlyIdempotent

Calculates Macaulay and modified bond duration in years from face value, coupon rate, yield to maturity, maturity, and payment frequency.

Instructions

채권의 맥컬리 듀레이션과 수정 듀레이션을 연 단위로 계산한다. face 는 양수, coupon_rate 와 ytm 은 연율 소수 Decimal 문자열, years 는 만기 연수 정수, freq 는 연 이자지급 횟수(기본 2). 가격은 ytm 으로 현금흐름을 할인해 구하며 반올림하지 않는다. 시장 가격만 알면 먼저 bond_ytm 으로 ytm 을 구한다.

Input Schema

NameRequiredDescriptionDefault
ytmYes
faceYes
freqNo
yearsYes
coupon_rateYes

Output Schema

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

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.3.0

TDQS

A4.8/5.0
Behavior4/5

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

Annotations already declare readOnlyHint, idempotentHint, and openWorldHint=false, so safety is covered. The description adds useful behavioral detail beyond annotations: price is derived by discounting cash flows at ytm and results are not rounded, and duration is expressed in annual units.

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?

The description is front-loaded with the core purpose, then parameter conventions, then the key prerequisite workflow. Every sentence adds actionable information and there is no redundant filler.

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

Completeness5/5

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

For a 5-parameter tool with 0% schema description coverage, the description supplies all necessary parameter semantics and relevant computational behavior. An output schema exists, so the description does not need to explain return values.

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 carries the full burden and does so well. It explains face must be positive, coupon_rate and ytm are annual decimal Decimal strings, years is maturity in integer years, and freq is coupon payments per year with a default of 2.

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 states a specific verb and resource: calculating a bond's Macaulay duration and modified duration, with results in annual units. It clearly distinguishes itself from finance.bond_ytm by explaining that bond_ytm should be used first when only market price is known.

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

Usage Guidelines5/5

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

It explicitly names the alternative workflow: if only the market price is known, use bond_ytm first to obtain ytm, then use this tool. This gives the agent a clear condition for selecting among sibling finance tools.

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