Skip to main content
Glama

swap_dv01

Reprice a swap with each quote on selected curves bumped to calculate parallel DV01 and measure interest-rate sensitivity.

Instructions

Parallel DV01 of a swap: reprice with every quote of the selected curve(s) bumped.

Args: market: as in the pricing tools (session, engine pricing block or build_curve results). 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. trade: the swap: product (vanilla_swap | ois_swap), preset, discounting_curve, forwarding_curve and the price_vanilla_swap / price_ois_swap economics (swap_type, notional, fixed_rate, effective_date 'spot' | date, tenor | termination_date, spread, index_id, overrides). bump_bp: size of the bump in basis points (default 1, positive; added to every helper rate / spread; futures prices move by -bp/100; the method sets the sign). method: centered (default) = (NPV(+bp) - NPV(-bp)) / 2, three engine calls; up = NPV(+bp) - NPV(base); down = NPV(base) - NPV(-bp). scope: all (discounting and forwarding curves together), discounting or forwarding. as_of: required unless market is a pricing block.

Result: base_npv, npvs (every per-call NPV: base, up, down), dv01, dv01_definition (the exact difference taken for the method), bumped_quotes (every quote moved per side, from/to) and calls = the complete pricing results (each with its echoed request). Nothing else is computed; the arithmetic is cited at quantra://methodology/connector-analytics.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
as_ofNo
scopeNoall
tradeYes
marketYes
methodNocentered
bump_bpNo
request_idNo
calendar_overridesNo
market_data_sourceYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.4

TDQS

A4.3/5.0
Behavior4/5

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

With no annotations, the description carries the full burden and does well: it discloses that centered costs three engine calls, how bump signs are applied (positive, futures move by -bp/100), what the returned fields are, and where the arithmetic is documented. Auth/rate-limit behavior is not covered, but that is peripheral for a pure computation tool.

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?

Purpose is front-loaded in the first sentence and each subsequent block maps to an argument, so the length is mostly earned. Still, the trade block inventory is somewhat verbose and could defer more to the pricing-tool docs.

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

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a complex 9-parameter tool with nested objects, the description covers the decision-critical pieces (data provenance, method, scope, output fields). Minor omissions (request_id, calendar_overrides) and the output schema already existing keep it from a 5.

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?

Top-level schema description coverage is effectively 0%, so the description must compensate and largely does: it explains market, market_data_source, trade, bump_bp sign/units, method formulas, scope values, and the as_of requirement. Only request_id and calendar_overrides go undocumented, leaving a modest 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?

States a specific verb and resource with precision: 'Parallel DV01 of a swap: reprice with every quote of the selected curve(s) bumped.' This clearly separates it from sibling analytics tools like key_rate_ladder (key-rate ladders) and scenario (generic shocks).

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?

Gives strong in-tool guidance on the market_data_source values and explicitly forbids inventing data ('If you would have to invent numbers, do not call this tool: ask the user for the data'). It does not, however, name alternative siblings (key_rate_ladder, reprice_with) or say when this tool is preferred over them.

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