Skip to main content
Glama

Precio, rendimiento y duración de bono

fin-bond
Read-onlyIdempotent

Valora un bono de cupón fijo en fecha de cupón: precio a partir del rendimiento, o rendimiento al vencimiento a partir del precio (bisección), más duración de Macaulay y modificada, convexidad y rendimiento corriente. Tasas en % anual; sin intereses corridos ni convención de días. Cuándo: un cálculo de dinero, impuestos o matemática financiera tiene que ser exacto y reproducible (redondeo, centavos, tasas). No para: valorar una opción europea call y put con el modelo Black-Scholes-Merton (fin-option-price). Efectos secundarios: ninguno (solo lectura, sin red, sin estado guardado). Determinista: la misma entrada da la misma salida. Límites: entrada JSON de hasta 64 KB, 1 s por llamada, resultado de hasta 1 MB.

EN: Prices a fixed-coupon bond on a coupon date: price from yield or yield to maturity from price (bisection), plus Macaulay and modified duration, convexity and current yield. Rates in percent per year; no accrued interest or day count. [EN completo / full EN: inputSchema.description]

Input Schema

NameRequiredDescriptionDefault
faceNoFace value (number; optional; default 100; min 0.01; max 1000000000000).
priceNoPrice, to compute the yield (number; optional; min 0.0001; max 10000000000000).
yearsYesYears to maturity (number; required; min 0.01; max 100).
yieldNoAnnual yield %, to compute the price (number; optional; min -50; max 200).
frequencyNoCoupons per year (optional; one of: 1, 2, 4, 12; default 2).
coupon_rateYesAnnual coupon rate % (number; required; min 0; max 100).

Output Schema

NameRequiredDescriptionDefault
priceNo
periodsNo
convexityNo
yield_percentNo
macaulay_durationNo
modified_durationNo
current_yield_percentNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • addedInput schema / properties / coupon_rate / examples
      Added value: +[
      +  5
      +]
    • addedInput schema / properties / years / examples
      Added value: +[
      +  2
      +]
  2. Changed1 schema field changed
    • addedInput schema / description
      Added value: +"EN: Prices a fixed-coupon bond on a coupon date: price from yield or yield to maturity from price (bisection), plus Macaulay and modified duration, convexity and current yield. Rates in percent per year; no accrued interest or day count. When: a money, tax or financial-math result has to be exact and reproducible (rounding, cents, rates). Not for: pricing a European call and put with the Black-Scholes-Merton model (fin-option-price). Side effects: none (read-only, no network access, no stored state). Deterministic: the same input gives the same output. Limits: JSON input up to 64 KB, 1 s per call, result up to 1 MB."
  3. First observed

TDQS

A4.6/5.0
Behavior4/5

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

Annotations already declare read-only, idempotent, non-destructive, closed-world, so the safety profile is covered. The description nonetheless adds substantive context beyond them: valuation is on a coupon date only, no accrued interest or day-count convention, rates in percent per year, deterministic output, and hard limits (64 KB input, 1 s, 1 MB result). Slight redundancy on 'no side effects' with the annotations keeps it off a 5.

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?

Front-loaded with the core operation, then when/not-for, then effects and limits — a scannable structure. The bilingual ES/EN duplication inflates length, though the parallel text is deliberate.

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?

An output schema exists so return values need not be described, annotations cover safety, and the schema documents all six parameters. The description fills the remaining gaps: valuation date convention, rate units, determinism, and execution limits.

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?

Schema coverage is 100%, so baseline is 3; the description adds real semantics by clarifying that yield/rates are percent per year and that price and yield are alternative inputs to the same calculation rather than independent options. It does not explain the interplay of face/frequency, which the schema handles.

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 (value a fixed-coupon bond on a coupon date) and enumerates both directions of computation (price from yield, yield from price via bisection) plus the derived metrics returned. An agent can distinguish it from fin-option-price or fin-tvm without opening the schema.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Has an explicit 'Cuándo' clause (money/tax/financial-math results needing exactness and reproducibility) and an explicit 'No para' clause routing European option pricing to fin-option-price. Both the positive and negative conditions are named.

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