Skip to main content
Glama

Market Wizardry OTC Rates & XVA

Compute CVA, DVA, FVA, COLVA & MVA Waterfall Under ISDA/CSA Terms

compute_xva_waterfall
Read-onlyIdempotent

Use whenever calculating CVA, DVA, FVA, COLVA, or MVA (in dollars and running bps), quoting an all-in XVA-adjusted client swap rate, or quantifying XVA savings across ISDA CSA terms (Uncollateralized, 1-Way/2-Way VM, Thresholds, MTA, MPOR, Initial Margin/SIMM).

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": {
      "swap": "<swap>",
      "csa": "<csa>"
    },
    "name": "compute_xva_waterfall"
  }
}

Input Schema

NameRequiredDescriptionDefault
csaYesRequested ISDA Credit Support Annex (CSA) configuration.
seedNoDeterministic integer PRNG seed (default 42).
swapYesUnderlying IRS or CCS trade specification.
pathsNoNumber of Monte Carlo exposure paths for XVA integration (default 2000).
bankRecoveryNoBank/dealer default recovery rate in decimal [0, 0.95] (defaults to regime 0.40).
colvaSlippageBpsNoOptional CSA collateral remuneration / CTD optionality spread in bps for COLVA; omit to use regime default.
bankHazardSpreadBpsNoBank/dealer senior 5Y CDS spread in bps; omit to use active regimeId dealerSeniorCdsBps5Y.
bankFundingSpreadBpsNoBank unsecured funding spread over OIS in bps for FVA; omit to use active regimeId dealerFundingSpreadBps.
counterpartyRecoveryNoCounterparty default recovery rate R in decimal [0, 0.95] (defaults to regime 0.40).
counterpartyCreditProfileNoDefault counterparty credit tier used when counterpartyHazardSpreadBps is omitted ("IG_CORPORATE" or "CROSSOVER_CORPORATE").IG_CORPORATE
mvaInitialMarginSpreadBpsNoOptional funding spread in bps on segregated Initial Margin for MVA; omit to use regime default.
counterpartyHazardSpreadBpsNoOptional counterparty flat 5Y CDS par spread in bps (e.g. 58 or 275); omit to use active regimeId creditAndFunding spread.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A3.8/5.0
Behavior4/5

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

Annotations already establish readOnly, idempotent, non-destructive, closed-world behavior, so the safety profile is covered. The description adds genuinely useful behavior beyond that: outputs are reported in dollars and running bps and an all-in XVA-adjusted rate is produced, which matters because there is no output schema. It omits that the call runs a Monte Carlo simulation (2000 paths default) and that results are seed-deterministic, both relevant to cost and repeatability.

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?

A single dense sentence with no filler, front-loaded with 'Use whenever' so the triggering condition is the first thing read. The enumerated list inside parentheses is long but each item earns its place as a distinct use case.

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?

For a 12-parameter tool with nested swap and CSA objects and no output schema, the description covers what triggers the call but not what comes back structurally (component breakdown, path count, runtime). The exceptionally rich schema compensates for most input-side gaps, but return-value shape is left entirely implicit.

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

Parameters3/5

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

Schema description coverage is 100%, so every parameter (including the nested swap legs and CSA fields) is already documented in the schema. The description reinforces which CSA terms matter (Thresholds, MTA, MPOR, Initial Margin/SIMM) but adds no syntax, units, or defaults beyond what the schema states, so the baseline 3 applies.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description names the exact resource (CVA, DVA, FVA, COLVA, MVA waterfall) and the derived outputs (dollar amounts and running bps, all-in XVA-adjusted client swap rate), which is far more specific than the title alone. It is phrased as a usage trigger rather than an explicit 'computes X and returns Y' statement, but an agent can still tell this apart from pricing or exposure tools.

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?

Three concrete triggering scenarios are given: calculating the XVA components, quoting an all-in XVA-adjusted client rate, and quantifying XVA savings across CSA terms. No when-not conditions or named alternatives (e.g. simulate_exposure_profile for raw exposure, price_swap for clean PV) are provided, so routing away from siblings 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.