Skip to main content
Glama

nestegg-calculators

Yield to Maturity

yield-to-maturity
Read-onlyIdempotent

Bond yield to maturity: the nominal annual yield that prices a bond at the given price, with periodic coupons and face returned at maturity. Solved numerically. Returns a percent, or null.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
priceYesCurrent bond price.
yearsYesYears to maturity.
faceValueYesFace (par) value repaid at maturity.
couponRatePctYesAnnual coupon rate in percent of face.
periodsPerYearNoCoupon periods per year (default 2 = semiannual).

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
yieldPctNoNominal annual yield, percent (null if none).

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4/5.0
Behavior4/5

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

Annotations already declare read-only and idempotent hints, so the description does not need to repeat those. It adds valuable context by stating 'Solved numerically' and 'Returns a percent, or null', disclosing the iterative nature and the possibility of no solution.

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 two sentences, front-loaded with the definition, and contains no redundant information. Every phrase contributes to understanding the tool's behavior and output.

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?

Given the tool's moderate complexity, the description covers essential aspects: definition, return type, and null case. With good annotations and a rich output schema, the description is sufficient for an agent to select and invoke the tool correctly. It could mention edge cases like invalid inputs, but that is not required.

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%, so the baseline is 3. The description does not add per-parameter meaning beyond what the schema already provides; it only provides global context about periodic coupons and nominal annual yield, which does not significantly enhance parameter understanding.

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 clearly defines the tool's output as the nominal annual yield that prices a bond at the given price, with periodic coupons and face returned at maturity. This distinguishes it from sibling tools like bond-price or current-yield by specifying the bond context and that it solves for the yield.

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?

The description implies usage when YTM needs to be computed from a price, but it does not explicitly mention when to use it versus alternatives or when not to use it. The phrase 'Solved numerically' hints at iterative solving, but there is no direct comparison to siblings.

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.