Multi-service MCP server system for contract risk analysis, market data, and risk job submission with agent orchestration
This is a well-structured contract risk MCP server with 10 tools covering contract search, risk calculations, and market data. Strong points: all tools have action-verb names (search_, get_, write_, run_, simulate_), comprehensive descriptions (average 180 chars), and complete input schemas with typed parameters. Notable gaps: output schemas are not documented in source code (cannot verify what fields are returned), error handling guidance is minimal, and tool annotations (readOnlyHint, destructiveHint) are absent. Risk classification is implicit in tool names and descriptions but not formally declared. The domain model is clear (FX forwards vs IRS contracts), and parameter descriptions include enum-like guidance (e.g., 'Options: interest_rate_swap, fx_forward'), but formal enum constraints are not visible in the schema definitions provided. Parameter descriptions are generally good (50 - 150 chars), though a few could be more prescriptive about valid ranges and formats.
Retrieve full details for a specific contract by ID. Use this tool to: - Get contract type before deciding which risk calculation to use - Retrieve contract terms (notional, rates, maturity, etc.) - Check contract details before risk submission
Get the current FX spot rate for a currency pair. Use this tool to: - Get current market prices for risk context - Check if market data is available before submitting risk jobs - Assess market conditions for breach analysis
Get the current annualized FX volatility for a currency pair. Use this tool to: - Understand current market volatility for risk assessment - Compare volatility across currency pairs - Assess market stress (volatility spikes indicate market stress)
Get a complete snapshot of all available market data (all currency pairs, rates, volatilities). Use this tool to: - Assess overall market conditions in one call - Check which currency pairs have available data - Identify which currency pairs are experiencing volatility spikes - Get comprehensive market context for portfolio risk assessment
Poll for the result of a submitted risk calculation job. Use this tool to: - Check if a risk calculation (run_fx_var or run_ir_dv01) has completed - Retrieve the computed risk metrics (VaR or DV01 value) - Detect failures and get error messages
No output schemas documented. Tool descriptions do not specify what fields are returned or their types. For example, search_contracts should document that it returns a list of contract objects with fields (contract_id, contract_type, counterparty, currency_pair, notional, maturity). This forces LLMs to infer output structure, risking parsing errors and invalid downstream tool calls.
Missing formal enum constraints in input schemas. contract_type guidance is inline in description ('Options: interest_rate_swap, fx_forward') but not as a JSON Schema enum. Similarly, memo_type guidance is descriptive only. LLMs cannot reliably parse text-only constraints; formal enums are machine-parseable and prevent hallucinated values.
| Scored | Grade | Overall | Spec posture | Rubric |
|---|---|---|---|---|
| 2026-09-23 | C | 67 | 2026-07-28+ | v2 |
Submit an FX Value-at-Risk (VaR) calculation job. USE ONLY FOR FX CONTRACTS. This tool calculates the maximum potential loss in an FX position under normal market conditions. Use this tool ONLY for: - FX forward contracts (contract_type='fx_forward') - Currency exposure analysis DO NOT use for: - Interest Rate Swap (IRS) contracts → use run_ir_dv01() instead - Other derivative types
Submit an Interest Rate DV01 (Dollar Value of 1 basis point) calculation job. USE ONLY FOR IRS CONTRACTS. This tool calculates the price sensitivity of an interest rate swap to 1bp (0.01%) rate movement. Use this tool ONLY for: - Interest Rate Swap (IRS) contracts (contract_type='interest_rate_swap') - IR curve exposure analysis DO NOT use for: - FX forward contracts → use run_fx_var() instead - Other derivative types
Search for contracts by type, counterparty, or currency pair. Empty strings skip filters. Use this tool to: - Find all contracts of a specific type (e.g., 'interest_rate_swap', 'fx_forward') - Identify contracts exposed to specific currency pairs - Find contracts with specific counterparties
Simulate a shock scenario for a currency pair. Returns the shocked value without persisting it.
Write a risk memo documenting analysis, recommendations, or breach alerts for a contract. Use this tool to: - Document risk assessment findings - Record threshold breach details and recommended actions - Create audit trail of risk decisions - Alert on market conditions affecting contract
Missing parameter value constraints. Numeric parameters lack explicit min/max ranges: horizon_days has a default of 1 and example of 10, but no stated maximum; shift_bps has a default of 1.0 but no valid range; shock_pct has an example of -3.0 but no constraints (is -500% or +1000% allowed?). Unbounded numeric parameters let LLMs pass invalid values that break risk calculations.
Minimal error handling guidance. No tool descriptions explain what happens when a contract is not found, a currency pair is unavailable, or a risk calculation times out. Error responses will lack recovery guidance, preventing LLMs from retrying intelligently or suggesting alternatives.
Tool annotations absent. No tools declare readOnlyHint, destructiveHint, or idempotentHint. write_risk_memo is clearly non-idempotent (audit trail means repeats create duplicates), and run_fx_var / run_ir_dv01 are write operations. These annotations help agents understand retry safety and transaction semantics.
Missing result pagination and size limits. get_market_snapshot returns 'all available market data' with no guidance on result count or pagination. search_contracts does not document result set size. Large unbounded result sets exhaust context windows and degrade LLM reasoning.
Implicit dependencies not documented. run_fx_var and run_ir_dv01 require that get_contract be called first to validate contract_type (to ensure FX forward vs IRS match). This dependency is hinted in descriptions ('Get contract type before deciding which risk calculation to use') but not formalized. Undocumented dependencies cause silent misuse.