Skip to main content
Glama

ScorpTech x402 Tools

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. Returns JSON with: cleanPrice, dirtyPrice, accruedInterest, pricePctOfFace, ytmPct, currentYieldPct, couponPerPeriod, periods. Price: $0.002 USDC per successful call (x402, Base or 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

A4.2/5.0
Behavior4/5

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

Annotations already declare readOnly/idempotent/non-destructive, and the description adds genuinely new behavior: a $0.002 USDC per-successful-call x402 charge and an equivalent HTTPS endpoint. That cost disclosure is exactly the kind of operational detail annotations cannot carry, though nothing is said about failure handling or precision limits.

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?

Front-loaded with purpose, then return fields, then cost, then the alternate endpoint. It is dense but every clause carries information, and with no output schema the field enumeration is necessary rather than redundant.

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?

For a six-parameter computational tool with no output schema, the definition covers capabilities, input modes, return keys, and payment mechanics. The only gap is behavior when both price and ytmPct are supplied, or what pricing/rounding conventions the results follow.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

With 67% schema coverage, the description adds real meaning by framing the two modes ('price from yield or yield to maturity from price'), which signals that price and ytmPct are mutually exclusive inputs — a constraint the schema's required list does not encode. It also flags clean vs dirty pricing and accrued interest for fractional periods.

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 precise verb+resource: fixed-coupon bond math, enumerating the specific computations (price from yield, YTM from price, current yield, Macaulay/modified duration, convexity, DV01) and the instrument types covered. An agent can tell immediately this is the bond-pricing tool and not a generic arithmetic sibling.

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 conveys what the tool covers (Treasury, corporate, zero-coupon, any coupon frequency) and its cost model, which implies appropriate usage. However, it never states when to choose it over alternatives or any exclusion condition, so the guidance remains implicit rather than explicit.

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