Skip to main content
Glama

Bond Calc

bond_calc
Read-onlyIdempotent

Fixed-coupon bond math: price from yield or yield to maturity from price (clean and dirty, with accrued interest for fractional periods), current yield, Macaulay and modified duration, convexity and DV01, plus the cash-flow schedule. Treasury, corporate or zero-coupon bonds; any coupon frequency. Price: $0.002 USDC per successful call (x402, Solana). Same tool over HTTPS: GET https://scorptech.it.com/api/x402/v1/bond-calc

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "couponRatePct": "<couponRatePct>",
      "yearsToMaturity": "<yearsToMaturity>"
    },
    "name": "bond_calc"
  }
}

Input Schema

NameRequiredDescriptionDefault
priceNoClean price (same units as faceValue): compute yield
ytmPctNoYield to maturity in percent: compute price
faceValueNo
frequencyNoCoupons per year
couponRatePctYesAnnual coupon rate in percent (0 = zero-coupon)
yearsToMaturityYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A3.9/5.0
Behavior3/5

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

Annotations already declare readOnly, idempotent, non-destructive, openWorld, and are not contradicted. The description adds genuinely non-obvious context — a $0.002 USDC per-call x402 charge on Solana, payable only on success, plus an alternate HTTPS endpoint. It says nothing about rounding conventions or how invalid input combinations (both price and ytmPct supplied) are handled, which matters for a two-mode calculation.

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?

One dense but well-ordered sentence lists the computations first, then scope, then the payment and endpoint facts. Nothing is padding, though the metric enumeration is long enough to slightly dilute the mode-selection signal.

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?

There is no output schema, so the description usefully enumerates the return values (yield, price, current yield, durations, convexity, DV01, cash-flow schedule), which is the main completeness burden here. Remaining gaps are edge-case behavior and error handling rather than core capability.

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?

With 67% schema description coverage, the schema already documents price as clean, ytmPct as percent, frequency as coupons/year, and couponRatePct=0 as zero-coupon. The description's 'clean and dirty, with accrued interest for fractional periods' hints at conventions the schema leaves implicit but does not resolve which convention the price input/output actually uses, so added value is modest.

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 names the exact verb set and resource: price from yield, YTM from price, current yield, Macaulay/modified duration, convexity, DV01, and a cash-flow schedule. That specificity separates it cleanly from neighbors like black_scholes, compound_interest, or npv_irr, which cover different instruments.

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?

It scopes applicability ('Treasury, corporate or zero-coupon bonds; any coupon frequency') and spells out the two operating modes (give yield to get price, or give price to get yield), which is exactly the decision an agent must make. It stops short of naming a sibling alternative or stating exclusions such as floating-rate or callable bonds.

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.

Resources