Skip to main content
Glama

nestegg-calculators

Bond Duration

bond-duration
Read-onlyIdempotent

Macaulay duration (PV-weighted average time of cashflows, in years) and modified duration (price sensitivity to yield).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
yearsYesYears to maturity.
yieldPctYesAnnual yield in percent.
faceValueYesFace value.
couponRatePctYesAnnual coupon rate in percent.
periodsPerYearNoCoupon periods per year (default 2).

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
macaulayNoMacaulay duration, years.
modifiedNoModified duration.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

B3.4/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=true and idempotentHint=true, which fully covers the safety profile of this pure calculation tool. The description adds semantic context by defining the output metrics, but it does not disclose any behavioral assumptions (e.g., continuous compounding, default periodsPerYear=2) that could affect results.

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 a single, tightly packed sentence that defines both output metrics without redundancy. Every clause contributes to the understanding of what the tool computes, making it an exemplar of concise and effective communication.

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 and clear annotations, the description sufficiently covers the core functionality. It explains the meaning of the two duration measures and implies the input parameters from context. However, it omits subtle behaviors like the default compounding frequency or edge cases for zero-coupon bonds, which would benefit a finance user.

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?

The input schema has 100% parameter coverage with descriptions for all five parameters, so the schema already explains each field. The description adds no additional parameter-level detail beyond what the schema provides, making this a baseline score with no extra semantic value.

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 identifies the tool as providing Macaulay duration and modified duration, specifying their formulas and meaning. It distinguishes between the two metrics and sets it apart from sibling tools like convexity or bond-price, though it lacks an explicit action verb such as 'calculate' or 'compute'.

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 gives no guidance on when to use this tool versus alternatives like convexity or yield-to-maturity. It does not state any preconditions, such as needing fixed-cashflow bonds, nor does it mention when modified duration is preferred over Macaulay duration.

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.