Skip to main content
Glama

Fair Value MCP Server

Fixed income and term structure analytics

calculate_fixed_income
Read-onlyIdempotent

Fixed-income engine. Price plain coupon bonds, solve for yield to maturity, measure interest-rate sensitivity via Macaulay and modified duration and convexity, and build a HIBOR/HKD-style term structure: bootstrap a zero curve from par rates, infer forward rates, and discount cash flows on the curve. Use this for vanilla bonds, rate risk and discount curves; for convertibles use calculate_convertible_bond and for structured payoffs use calculate_structured_product. Methods: bond_price/duration/convexity: face, coupon_rate, years, ytm, frequency; bond_yield: face, coupon_rate, years, price, frequency; matrix_pricing: target_tenor, benchmark_tenors, benchmark_yields; discount_factor: rate, years, frequency; zero_curve: par_rates, tenors, frequency; forward_rate: zero_rates, tenors, t1, t2; pv_curve: cash_flows, times, zero_rates, tenors. Supply exactly one method with its declared inputs (no defaults). An unknown method, a missing input, or an extra field returns an error envelope (code INVALID_ARGUMENT) instead of raising.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
t1NoForward period start in years (>=0).
t2NoForward period end in years (> t1).
ytmNoYield to maturity (decimal, annualised).
faceNoBond face value.
rateNoA single interest/zero rate (decimal).
priceNoDirty price of the instrument in reporting currency.
timesNoCash-flow times in years, aligned with cash_flows.
yearsNoNumber of projection years n; equal len(cash_flows) when both are supplied.
methodYesFormula to apply; the tool description lists the exact inputs each value requires.
tenorsNoTenors in years, aligned with par_rates or zero_rates.
frequencyNoCoupon payments per year (1=annual, 2=semi-annual).
par_ratesNoPar (coupon) rates per tenor, aligned with tenors (decimal).
cash_flowsNoProjected cash flows in reporting currency, indexed t=1..n.
zero_ratesNoZero (spot) rates per tenor, decimal, annual compounding.
coupon_rateNoAnnual coupon rate (decimal).
target_tenorNoTarget tenor in years for matrix pricing (interpolated).
benchmark_tenorsNoBenchmark tenors in years, sorted, aligned with benchmark_yields.
benchmark_yieldsNoBenchmark yields (decimal) at each benchmark tenor.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
errorNoError detail, present only when status='error'.
stepsNoOrdered computation steps, when the method reports them.
valueNoPrimary result: a number for scalar methods, an object for valuation methods.
methodNoMethod or tool name that produced the result.
statusYes'ok' on success, 'error' on failure.
tickerNoTicker the result pertains to, when applicable.
assumptionsNoInputs and assumptions used, echoed for traceability.
formula_refNoFormula or standards reference for the method.
data_timestampNoISO-8601 UTC timestamp of the underlying data, when fetched.

Schema Changelog

Changes observed during successful MCP inspections.

  1. 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 readOnly, idempotent, non-destructive, so the safety profile is covered. The description adds genuinely useful behavioral contract beyond that: the exactly-one-method dispatch rule, 'no defaults' enforcement, and the error-envelope behavior (INVALID_ARGUMENT returned rather than raised) for unknown methods, missing inputs, or extra fields. It doesn't discuss numerical edge cases (e.g., non-convergence in yield solving) or output shape, which keeps it from 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?

Dense but front-loaded: purpose first, then sibling routing, then the per-method input contract, then the error contract. The method-input enumeration is long but every element earns its place given the 9-way method enum. Slightly cramped as one unbroken paragraph, which costs it a point.

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?

Output schema exists, so return values need not be described, and the description covers the remaining agent-critical surface: which method to pick, what inputs each method requires, same-call constraints, and error semantics. For an 18-parameter, single-method-dispatch tool, nothing needed to invoke it correctly is missing.

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, but the description adds real value the schema cannot: an explicit method-to-input mapping (bond_yield takes price instead of ytm; matrix_pricing takes target/benchmark tenors; pv_curve takes cash_flows plus times plus zero_rates). This tells the agent which of the 18 optional parameters to populate for a given method, which the flat schema does not convey.

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 domain engine with enumerated capabilities (bond pricing, YTM solving, duration/convexity, zero-curve bootstrap, forwards, curve discounting) and names the exact sibling alternatives for convertible and structured payoffs. An agent can distinguish it from calculate_convertible_bond and calculate_structured_product without opening any 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?

Explicit routing guidance: 'Use this for vanilla bonds, rate risk and discount curves; for convertibles use calculate_convertible_bond and for structured payoffs use calculate_structured_product.' Both the when-to-use and the when-not-to-use (with named alternatives) are stated.

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.