Skip to main content
Glama

TradingCalc MCP: Options, Forex, Risk Stats, Prediction Markets, On-Chain & Crypto Futures

Bond Price

workflow.run_bond_price
Read-only

Price of a plain fixed-rate bond on a coupon date, with Macaulay duration, modified duration, convexity and DV01. Price = sum of the coupons and the face value discounted at the yield per period (yield / frequency), clean price, no accrued interest, so years x frequency must be a whole number of coupon periods. The yield is the nominal yearly yield to maturity compounded frequency times a year (the bond-market convention). Durations are in years, convexity in years squared. DV01 is the price fall for one basis point of yield, a positive number, the slope at the current yield and not a repricing. It does not include credit risk, call features, taxes or the day-count of a real settlement date. Edge cases: faceValue above zero and at most 1e12 (default 1000); couponRate 0 to 1 as a fraction; yieldRate -1 to 100 with the rate per period above -100%; years above zero and at most 100; frequency a whole number 1 to 12 (default 2); years times frequency must be a whole number of coupon periods. Not covered: accrued interest and a settlement date between coupons, credit risk, call and put features, floating coupons, taxes, and the day-count convention. Use when user asks "what is a 5-year 5% coupon bond worth at a 6% yield?" or "what is the duration and DV01 of this bond?". Returns: price, pricePctOfFace, status (premium, par, discount), pvOfCoupons, pvOfFace, couponPerPeriod, periods, yieldPerPeriod, currentYield, macaulayDuration, modifiedDuration, convexity, dv01.

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": {
      "couponRate": "<couponRate>",
      "yieldRate": "<yieldRate>",
      "years": "<years>"
    },
    "name": "workflow.run_bond_price"
  }
}

Input Schema

NameRequiredDescriptionDefault
yearsYesYears to maturity, above 0 and at most 100; years x frequency must be a whole number (5 years semiannual is 10 coupons)
faceValueNoFace (par) value repaid at maturity, above 0 (default 1000)
frequencyNoCoupon payments a year, 1 to 12 (default 2: semiannual; 1 annual, 4 quarterly, 12 monthly)
yieldRateYesNominal yearly yield to maturity as a fraction (0.06 = 6%), compounded frequency times a year; yield / frequency must be above -1
couponRateYesAnnual coupon rate as a fraction of face value (0.05 = 5%), 0 to 1; 0 is a zero-coupon bond

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.3/5.0
Behavior5/5

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

Annotations only declare the safety profile; the description adds the pricing convention (yield/frequency compounding, clean price, whole coupon periods), the sign and meaning of DV01, and the model's limitations. This is exactly the context annotations cannot supply.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Front-loaded with the computation and the return list, but the limitations are stated twice — once inline ('does not include credit risk, call features, taxes or the day-count') and again as a 'Not covered' paragraph — and the parameter bounds are repeated from the schema. Trimming the duplicate exclusion list would tighten it considerably.

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?

There is no output schema, and the description enumerates every returned field (price, pricePctOfFace, status, durations, convexity, dv01, etc.), plus edge cases and model boundaries. An agent has everything needed to call it and interpret the result.

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 coverage is 100% and the schema already documents every range, default and the fraction convention. The description largely restates the same bounds (faceValue >0 and <=1e12, couponRate 0-1, yield per period above -100%), adding little new meaning beyond the 'nominal yearly yield compounded frequency times a year' phrasing.

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: prices a plain fixed-rate bond on a coupon date, returning price plus Macaulay/modified duration, convexity and DV01. That is clearly separable from siblings like run_bonding_curve, run_npv or run_present_value.

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?

Gives two concrete triggering questions ('what is a 5-year 5% coupon bond worth at a 6% yield?', duration/DV01) and an explicit exclusion list (accrued interest, settlement between coupons, calls/puts, floating coupons, taxes, day-count). It does not name a sibling alternative, so it falls short of the top mark.

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.