Skip to main content
Glama

Brazil Central Bank & Financial Calculators

Replaced by its MCP Registry listing

This endpoint is listed in the official MCP Registry as Brazil Central Bank & Finance Calculators (x402). If you published it, claim ownership there.

Price and SAC loan amortization simulator

br_simulate_loan_amortization
Read-onlyIdempotent

Simulates a Brazilian loan or financing under the Price (constant installment) and SAC (constant principal) systems and returns installment values, total paid, total interest and, on request, the full month-by-month table. Use it to compare financing offers, size an installment plan, or expose interest cost before a credit decision. Do not use it to restate a past amount by an inflation index (use br_correct_monetary_value) or to convert currency (use br_convert_ptax_fx). Deterministic, read-only and fully computed at the edge with no external data source, so identical input always returns identical output and a retry is always safe. Costs 0.005 USDC per call via x402 v2 on Base (eip155:8453) or a B2B X-API-Key; out-of-range input is clamped rather than rejected (term is bounded to 1..420 months and negative principal or rate becomes zero), while an unpaid call returns HTTP 402 with a PAYMENT-REQUIRED header and malformed JSON returns HTTP 400 with success:false, never an exception.

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": {
      "principal": "<principal>",
      "monthlyInterestRatePct": "<monthlyInterestRatePct>",
      "months": "<months>"
    },
    "name": "br_simulate_loan_amortization"
  }
}

Input Schema

NameRequiredDescriptionDefault
monthsYesTerm in months. Values are floored and clamped to the 1..420 range (420 months is the 35-year ceiling of Brazilian mortgage practice).
systemNoAmortization system to compute. PRICE keeps the installment constant and back-loads principal; SAC keeps principal constant so installments start higher and fall, with less total interest. BOTH (the default) returns the two side by side for comparison and costs the same single call.BOTH
aiSummaryNoWhen true (the default), appends aiExecutiveBrief, a one-sentence Portuguese summary. Set false to cut roughly 80 ms of latency.
principalYesFinanced amount in BRL, as a plain number (50000 means R$ 50.000,00). Negative values are clamped to zero.
includeScheduleNoWhen true, each requested system also returns its full schedule array. With BOTH and a long term this can mean hundreds of rows, so leave it false when only totals matter.
monthlyInterestRatePctYesNominal monthly interest rate in percent, not a decimal fraction: 1.49 means 1,49% per month, roughly 19,4% per year. Pass 0 for an interest-free plan, in which case Price splits the principal evenly.

Output Schema

NameRequiredDescriptionDefault
errorNoStable machine-readable failure code. Common values: 'bad_request' (malformed JSON or missing operation), 'invalid_payment' / 'settlement_failed' (x402 verification or settlement refused, returned with HTTP 402), 'B2B_KEY_INVALID' and 'B2B_QUOTA_EXCEEDED' (B2B X-API-Key path).
messageNoHuman-readable explanation of the failure, in Portuguese. Safe to log or surface to a human operator.
successYesfalse when the call was rejected before any calculation ran. Absent on success paths that return success:true.
loanSimulationNoSimulation result. The price and sac blocks appear only for the requested system.
aiExecutiveBriefNoOne-sentence Portuguese summary of the result. Omitted when aiSummary is false.
processingTimeMsNoEdge processing time in milliseconds, excluding payment settlement.
suggestedNextStepsNoChaining hints for autonomous agents: sibling paid APIs in the same suite that are commonly called right after this one. Purely advisory, never required.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.4/5.0
Behavior4/5

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

Annotations already declare read-only, idempotent, closed-world and non-destructive, yet the description adds real value beyond them: edge-computed with no external data source, safe retry, clamping instead of rejection, and concrete failure modes (HTTP 402 with PAYMENT-REQUIRED, HTTP 400 with success:false, never an exception). The only deduction is mild overlap with idempotentHint in the 'retry is always safe' claim.

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 and alternatives are front-loaded in the first two sentences, with operational details trailing. The single dense paragraph is efficient, though the pricing and HTTP-code clauses could be split or trimmed for scanability.

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 6-parameter tool with an output schema, the definition covers what the agent still needs: determinism, payment model and price, clamping semantics, and error behavior. Return values are only summarized, which is appropriate given the output schema exists.

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 the schema already explains months clamping, PRICE vs SAC vs BOTH, aiSummary latency, and the percent-not-fraction rate convention. The description only restates the clamping rule (1..420 months, negatives to zero) rather than adding new parameter meaning, so the baseline 3 applies.

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 ('simulates a Brazilian loan or financing under the Price and SAC systems') plus the outputs returned, and explicitly names the two sibling tools it is not (br_correct_monetary_value, br_convert_ptax_fx). An agent can route correctly without opening any schema.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Gives three concrete positive use cases (compare financing offers, size an installment plan, expose interest cost before a credit decision) and two explicit exclusions with the alternative named for each. Nothing 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.

Resources