Skip to main content
Glama

simulate_redemption

Read-onlyIdempotent

Simulates an early redemption: a historical acquisition lot (lot) and a hypothetical sell (sell), returning gross sale pricing plus netReturns (IOF, regressive IR, B3 custody) and annualized gross/net rates (du/252).

USE THIS for "quanto recebo líquido se vender?", IR/IOF/custódia on a held lot, or comparing gross vs net redemption proceeds.

lot takes exactly one of price (exact PU — preferred, from the B3 statement) or rate (decimal string; engine derives PU). sell takes rate only (sell by price is not supported). Optional per-leg IPCA scenario: vnaBase/vniBase/ipcaMonthlyRate. For a future-dated sell (redemption months/years ahead), also pass sell.ipcaForwardMonthlyRate (assumed monthly IPCA) to project the VNA/VNI base forward over the whole-month gap — otherwise the base stays frozen at the last published day-15 and an IPCA_FORWARD_GAP_NOT_COMPOUNDED warning is emitted. lot settles D+1; sell uses Tesouro sell-back conventions (D+0 when tradeDate >= 2021-09-13).

Coupons/installments between lot and sell are NOT tax-modeled (INTERMEDIATE_FLOWS_TAX_NOT_MODELED). On Tesouro Selic the custody fee is always charged in full: B3 waives it up to R$ 10,000.00 of Selic holdings, but that depends on the investor's total position rather than on this lot (CUSTODY_EXEMPTION_NOT_MODELED). Tax/fee estimate — not investment or tax advice. Bulk: up to 10 items.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
itemsYesEarly-redemption scenarios (max 10 per request).

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • changedInput schema / properties / items / items / properties / bondType / enum
      Previous value: -[
      -  "prefixado",
      -  "prefixado-com-juros-semestrais",
      -  "ipca-mais",
      -  "ipca-mais-com-juros-semestrais",
      -  "renda-mais",
      -  "educa-mais"
      -]New value: +[
      +  "prefixado",
      +  "prefixado-com-juros-semestrais",
      +  "ipca-mais",
      +  "ipca-mais-com-juros-semestrais",
      +  "renda-mais",
      +  "educa-mais",
      +  "selic"
      +]
    • changedInput schema / properties / items / items / properties / maturityDate / description
      Previous value: -"Bond maturity YYYY-MM-DD. Required for date-identified bonds (prefixado, IPCA+)."New value: +"Bond maturity YYYY-MM-DD. Required for date-identified bonds (prefixado, IPCA+, Selic)."
  2. Changed1 schema field changed
    • addedInput schema / properties / items / items / properties / sell / properties / ipcaForwardMonthlyRate
      Added value: +{
      +  "description": "Assumed monthly IPCA to project the VNA/VNI base FORWARD over the whole months between the last published day-15 and this leg's settlement, before the sub-month pro-rata. Use for a future-dated sell (settlement months/years ahead); omit for near-term. Ignored when vnaBase/vniBase is overridden. Distinct from ipcaMonthlyRate (the current-month pro-rata).",
      +  "pattern": "^-?\\d+(\\.\\d+)?$",
      +  "type": "string"
      +}
  3. Added

TDQS

A4.6/5.0
Behavior5/5

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

Beyond the annotations (readOnly/idempotent/destructive hints), the description discloses substantial behavior: D+1 lot settlement vs the D+0 Tesouro sell-back convention post-2021-09-13, the IPCA_FORWARD_GAP_NOT_COMPOUNDED warning when a future-dated sell omits the forward rate, the INTERMEDIATE_FLOWS_TAX_NOT_MODELED gap for coupons, the CUSTODY_EXEMPTION_NOT_MODELED limitation with its R$ 10,000.00 cause, and a tax-advice disclaimer. These are real interpretive contexts, not just restatements of the read-only annotation.

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?

The description is roughly 220 words — long — but the tool is complex (nested legs, settlement conventions, IPCA scenarios, modeling warnings) and each sentence carries distinct information. It is well-structured: purpose first, then usage triggers, per-leg field guidance, modeling caveats, disclaimer, and bulk limit, with the core purpose front-loaded.

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

Completeness5/5

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

For a tool with an output schema and a fully described parameter schema, the description fills every remaining behavioral gap: settlement conventions, known tax-modeling blind spots by warning code, forward-IPCA projection behavior, the 10-item bulk limit, and the estimate disclaimer. An agent has everything needed to invoke it correctly and interpret warnings without missing context.

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 coverage is 100% and the schema already documents the price/rate exclusivity and forward-IPCA field, so the baseline is 3. The description adds meaningful interpretation beyond it: which input to prefer (exact PU from the B3 statement), the explicit constraint that the sell leg is rate-only ('sell by price is not supported'), and the conditional rule for when `ipcaForwardMonthlyRate` is required. That extra layer justifies a 4.

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?

The opening sentence states a specific verb ('Simulates an early redemption'), names the exact inputs (a historical acquisition `lot` vs a hypothetical `sell`), and the return shape (gross sale pricing, `netReturns` with IOF/IR/custody, annualized gross/net rates). This scope is clearly distinct from the sibling `simulate_bond`, which is about bond simulation rather than redemption net-of-tax analysis.

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 description gives explicit usage triggers prefixed with 'USE THIS' — Portuguese queries ('quanto recebo líquido se vender?'), the IR/IOF/custódia-on-a-held-lot scenario, and gross-vs-net comparison. What it lacks is an explicit exclusion or named alternative (e.g., 'use simulate_bond instead when...'), so the when-not-to-use guidance is implied rather than stated.

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.

Resources