Skip to main content
Glama

price_cds

Compute the NPV, fair spread, and upfront of a single-name CDS from user-provided market data and trade parameters.

Instructions

Price a single-name CDS (POST /price-cds).

Args: market_data_source: where the market numbers in this call come from. user_pasted (the user pasted or typed the numbers in this conversation), user_file (the user attached a file/screenshot the numbers were read from), engine_example (an engine example's pricing block, only when the user explicitly asked to run an example), session (a market previously stored in this session, which itself came from one of the above). There is no value for estimated, recalled or placeholder data. If you would have to invent numbers, do not call this tool: ask the user for the data. side: Buyer (buy protection) or Seller. notional: > 0. running_coupon: decimal (0.01 = 100bp). credit_curve: {par_spreads: [{tenor, spread}], recovery_rate?, id?} (bootstrapped by the engine with the preset's helper conventions), {hazard_rate, recovery_rate?, id?} (flat) or a credit curve id in the market. preset: a preset with a cds block (default EUR_CDS: quarterly TwentiethIMM, Following, Actual360, MidPoint). start: effective date YYYY-MM-DD or as_of (default). maturity: YYYY-MM-DD; or tenor (engine-resolved, Unadjusted). recovery_rate: for a curve the tool builds (default: preset, 0.4). model: MidPoint | ISDA (CdsModelSpec added, id cds_<type>) or a model id in the market. upfront / upfront_date, protection_start (default = start), trade_date (default = as_of), frequency, day_counter, business_day_convention, cash_settlement_days, schedule_overrides: optional; defaults noted.

summary.cds_list: npv, fair_spread, fair_upfront, leg npvs.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
sideYes
as_ofNo
modelNoMidPoint
startNoas_of
tenorNo
marketYes
presetNoEUR_CDS
upfrontNo
maturityNo
notionalYes
frequencyNo
request_idNo
trade_dateNo
day_counterNo
credit_curveYes
upfront_dateNo
recovery_rateNo
running_couponYes
protection_startNo
additional_tradesNo
discounting_curveYes
calendar_overridesNo
market_data_sourceYes
schedule_overridesNo
cash_settlement_daysNo
business_day_conventionNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.4

TDQS

A4.2/5.0
Behavior4/5

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

No annotations are supplied, so the description must carry the behavioral load; it discloses the default preset and its conventions, that par-spread curves are bootstrapped by the engine, default recovery rate, the CdsModelSpec id pattern (cds_<type>), and defaults for optional dates. It says nothing about permissions/auth, but for a pure compute endpoint that gap is minor.

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 the one-line purpose followed by a structured args block; given 26 parameters, most lines earn their place by supplying defaults or accepted value forms. Slightly long, but not padded.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/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 needn't be re-explained (the brief summary.cds_list note is a bonus). Against 26 params, 7 required, zero schema coverage and no annotations, leaving the required 'market' object and 'discounting_curve' id undocumented is a real gap for correct invocation.

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 0% at the top level, so the args list does the heavy lifting and explains most parameters (market_data_source in depth, side, notional, running_coupon units, the three credit_curve forms, preset, start/maturity/tenor, recovery_rate, model, and the optional schedule fields). However, required parameters 'market' and 'discounting_curve', plus as_of, additional_trades and calendar_overrides, are left entirely unexplained, so it doesn't fully compensate for the coverage gap.

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?

Opens with a specific verb+resource ('Price a single-name CDS') plus the underlying route POST /price-cds, which cleanly separates it from the many sibling pricing tools (price_vanilla_swap, price_swaption, price_ois_swap, etc.). An agent can identify the tool's scope 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 Guidelines4/5

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

The market_data_source enumeration gives explicit provenance rules (user_pasted/user_file/engine_example/session) and a clear when-not-to-use rule: 'If you would have to invent numbers, do not call this tool: ask the user for the data.' It does not name sibling tools or say when to prefer related tools, so it falls short of the 5 bar.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.