Skip to main content
Glama

reprice_with

Apply request-field edits or basis-point bumps to user-supplied market data, then price again to compare base and changed results and test hypotheses.

Instructions

Test a hypothesis: change one or more request fields and reprice.

Args: result_or_request: a previous pricing tool result (its endpoint and echoed request are used; its response is the base unless reprice_base), or an explicit {"endpoint": "/price-swaption", "body": {...}}. market_data_source: where the market numbers in the request come from. A previous tool result carries its own declaration and it is reused (the argument may be omitted or must agree); for an explicit {endpoint, body} or a result without one it is required: 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. changes: [{path, value}] or [{path, bump_bp}]; path is dotted / indexed into the request body (swaptions[0].swaption.settlement_method, pricing.rates.curves[0].points[2].point.rate, pricing.as_of_date, pricing.rates.curves[0].interpolator). bump_bp adds bump_bp / 10000 to a numeric field. reprice_base: also reprice the unchanged request now (default: reuse the given result's response). validate: check the changed body against the vendored schema before sending.

Returns changes_applied (before / after per change), request_diff (every leaf that differs between the two requests), base and changed (complete uniform results, each replayable from its request) and differences: the numeric top-level fields of the first priced item with difference = changed - base. Nothing else is computed. The engine's error, if any, is verbatim.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
changesYes
validateNo
request_idNo
reprice_baseNo
result_or_requestYes
market_data_sourceNo

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?

With no annotations, the description carries the full burden and discharges it well: it states that the engine's error is verbatim, that 'Nothing else is computed,' how the base response is reused vs. re-priced, and the provenance rules for market numbers. It omits any note on failure modes beyond engine errors or on what validate does when it fails.

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-loaded with a one-sentence purpose followed by a clearly labeled Args/Returns structure, so it scans well. It is dense and long, and the Returns paragraph partly restates what the output schema already exposes, but nearly every line carries usable detail.

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 6-parameter nested tool with an output schema, the description is close to complete: argument semantics, reuse behavior, and return shape are all covered, and return-value detail is legitimately omitted-lite since an output schema exists. The undocumented request_id and lack of sibling routing are the remaining gaps.

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

Parameters5/5

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

Schema coverage is 0% for the top-level arguments, so the description must compensate and largely does: it defines result_or_request's two accepted shapes, spell out each market_data_source enum value, explains path/bump_bp syntax with concrete dotted examples, and clarifies reprice_base and validate defaults. Only request_id goes undocumented, a minor omission against otherwise thorough coverage.

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 opening line states a specific verb and goal: 'change one or more request fields and reprice,' framed as hypothesis testing. It clearly distinguishes a reprice-with-edits operation from the sibling price_* tools, though it doesn't explicitly name which sibling (e.g. scenario, compare_results) to use instead.

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?

Strong conditional guidance: the market_data_source section enumerates exactly when each provenance value applies and states the exclusion 'If you would have to invent numbers, do not call this tool: ask the user for the data.' It also constrains engine_example to explicit user requests. It does not, however, contrast this tool against siblings like scenario or compare_results.

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