Skip to main content
Glama

Fair Value MCP Server

Structured product and derivative pricing

calculate_structured_product
Read-onlyIdempotent

Structured-product engine. Value HKEX-listed and OTC structures: CBBCs, derivative and inline warrants, equity-linked notes and investments, autocallables, accumulators and decumulators, credit-linked notes, TRS, and CFDs. Use this for equity-linked and credit-linked payoff structures; for a plain option or warrant use calculate_option, for a convertible or exchangeable bond use calculate_convertible_bond, and for a vanilla bond or term structure use calculate_fixed_income. Methods: cbbc: notional, spot, strike, barrier, barrier_type, maturity, risk_free, volatility, option_type; cbbc_residual: notional, spot, call_price, entitlement, barrier, barrier_type, maturity, risk_free, volatility, option_type; derivative_warrant: notional, spot, strike, maturity, risk_free, volatility, average_type, option_type; inline_warrant: notional, spot, lower_strike, upper_strike, maturity, risk_free, volatility, payout; inline_warrant_avg: notional, spot, lower_strike, upper_strike, maturity, risk_free, volatility, payout, fixing_days; eli/eln: notional, spot, strike, maturity, risk_free, volatility, coupon_rate; autocallable: notional, spot, knock_out_level, observation_dates, coupon_rate_structured, maturity, risk_free, volatility; credit_linked_note: notional, credit_spread, recovery, maturity, risk_free, coupon_rate_structured; accumulator/decumulator: notional, spot, strike, knock_out_level, observation_dates, risk_free, volatility; trs: notional, spot, maturity, risk_free, dividend_yield; cfd: notional, spot, strike, maturity, risk_free. 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
spotNoSpot price of the underlying (or FX rate for garman_kohlhagen).
methodYesFormula to apply; the tool description lists the exact inputs each value requires.
payoutNoFixed payout when the range condition is met.
strikeNoStrike or exercise price in the same currency as spot.
barrierNoKnock level for barrier_first_passage.
maturityNoTime to expiry in years (0.5 = six months); > 0.
notionalNoContract notional/face amount in reporting currency.
recoveryNoRecovery rate in [0,1].
risk_freeNoContinuously-compounded risk-free rate (decimal).
call_priceNoCBBC call price (mandatory-call trigger level).
volatilityNoAnnualized volatility (decimal, 0.30 = 30%); > 0.
coupon_rateNoAnnual coupon rate (decimal).
entitlementNoCBBC entitlement: units of underlying per contract.
fixing_daysNoNumber of closing fixings averaged for settlement (>=1).
option_typeNoOption right.
average_typeNoAveraging convention.
barrier_typeNoBarrier direction.
lower_strikeNoLower strike of the range.
upper_strikeNoUpper strike of the range.
credit_spreadNoCredit spread over the risk-free rate (decimal).
dividend_yieldNoContinuous dividend yield (decimal).
knock_out_levelNoKnock-out level for autocallables and accumulators.
observation_datesNoObservation dates in years for path-dependent products.
coupon_rate_structuredNoConditional coupon rate (decimal).

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.8/5.0
Behavior5/5

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

Annotations already declare readOnly/idempotent/non-destructive; the description goes further by disclosing the dispatch contract (one method, no defaults) and the failure mode ('unknown method, missing input, or extra field returns an error envelope code INVALID_ARGUMENT instead of raising'). That error-shape disclosure materially changes how an agent handles failures and is not available anywhere else.

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-loads purpose, then routing, then the method/input table — a sensible order. The method listing is dense but earns its place given 13 enum values and 24 optional fields; a small amount of repetition ('notional, spot, maturity, risk_free' recurs) keeps the per-method rows self-contained.

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 no explanation. With purpose, sibling routing, method-to-input mapping, strictness rules, and error behavior all covered, an agent has everything needed to call this 24-parameter dispatcher correctly.

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 description coverage is 100%, so per-parameter units are already documented and the baseline is 3. The description exceeds that by mapping each of the 13 method values to its exact required input set, information the flat schema cannot express (the enum description even defers to it). It stops short of a 5 because per-parameter units/edge semantics are left entirely to the schema.

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 ('Value') and enumerates the exact instrument classes it covers (CBBCs, derivative/inline warrants, ELNs/ELIs, autocallables, accumulators, CLNs, TRS, CFDs). It explicitly contrasts itself with named siblings (calculate_option, calculate_convertible_bond, calculate_fixed_income), so an agent can route 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 when-to-use ('equity-linked and credit-linked payoff structures') plus three named alternatives with the condition that selects each, and a dispatch rule ('supply exactly one method with its declared inputs'). Nothing about tool selection is left to inference.

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.