Skip to main content
Glama

Atualizar débito

debt_calculate
Read-onlyIdempotent

Atualiza um débito parcela por parcela com os índices oficiais do Banco Central: débito do contrato (índice, juros e multa do contrato), juros legais do art. 406 do CC antes e depois da Lei 14.905/2024, crédito trabalhista (TST, ADC 58), condenação da Fazenda Pública (EC 113/2021) e cumprimento de sentença (art. 523 do CPC). Aceita pagamentos parciais ou em atraso. Devolve a memória de cálculo de cada parcela, os totais, as parcelas a confirmar em pending (fora dos totais), as premissas e, se faltarem vencimentos depois da última parcela, um aviso em notice.

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": {
      "referenceDate": "<referenceDate>",
      "installments": "<installments>",
      "finePercent": "<finePercent>",
      "monthlyInterestPercent": "<monthlyInterestPercent>",
      "correctionIndex": "<correctionIndex>",
      "regime": "<regime>",
      "interestRule": "<interestRule>",
      "legalInterestBefore2024": "<legalInterestBefore2024>",
      "correctionIndexBefore2024": "<correctionIndexBefore2024>",
      "interestStartDate": "<interestStartDate>",
      "filingDate": "<filingDate>",
      "laborPreJudicialIndex": "<laborPreJudicialIndex>",
      "treasuryNature": "<treasuryNature>",
      "enforcement": "<enforcement>"
    },
    "name": "debt_calculate"
  }
}

Input Schema

NameRequiredDescriptionDefault
regimeYescivil (nulo): débito entre particulares; labor: crédito trabalhista, pelo critério do TST; public_treasury: condenação da Fazenda Pública (EC 113/2021).
filingDateYesAjuizamento da reclamação trabalhista; obrigatório no regime labor.
enforcementYestrue no cumprimento de sentença sem pagamento voluntário em 15 dias: acrescenta multa e honorários de 10% sobre o débito (art. 523, § 1º, do CPC).
finePercentYesMulta moratória do contrato, em %. Nulo se não houver.
installmentsYes
interestRuleYescontract: juros do contrato (monthlyInterestPercent); legal: juros legais do art. 406 do CC (sem taxa no contrato, indenização, condenação); none: sem juros. Nulo: os do contrato, se houver taxa.
referenceDateYesData do cálculo, AAAA-MM-DD; em geral, a DATA LOCAL do contexto.
treasuryNatureYesRegime public_treasury: general (Tema 810 do STF), pension (benefício previdenciário, Tema 905 do STJ) ou tax (indébito tributário). Nulo: general.
correctionIndexYesÍndice do contrato ou do título; sem índice, IPCA (art. 389, parágrafo único, do CC). none só se a pessoa pedir sem correção. Ignorado nos regimes labor e public_treasury, que têm índices próprios.
interestStartDateYesInício dos juros quando não é cada vencimento: citação (art. 405 do CC) ou evento danoso (Súmula 54 do STJ). Nulo: cada vencimento.
laborPreJudicialIndexYesRegime labor: índice antes do ajuizamento, depois de 29/08/2024. Nulo: IPCA-E (TST).
monthlyInterestPercentYesJuros de mora do contrato, % ao mês. Nulo se o contrato não fixar.
legalInterestBefore2024YesJuros legais antes de 30/08/2024: selic (STJ, Tema 1.368) ou one_percent (1% ao mês, só se o título ou a pessoa fixarem). Nulo: selic.
correctionIndexBefore2024YesÍndice até 08/2024 quando o título ou a tabela do tribunal usava outro antes do IPCA da Lei 14.905/2024 (ex.: INPC). Nulo: o mesmo de correctionIndex.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • addedInput schema / properties / installments / items / properties / toConfirm
      Added value: +{
      +  "description": "true só na parcela que venceu depois do último relato da cliente e ninguém disse se foi paga: sai calculada com os encargos, fora de totals, em pending. Nulo nas demais.",
      +  "type": [
      +    "boolean",
      +    "null"
      +  ]
      +}
    • changedInput schema / properties / installments / items / required
      Previous value: -[
      -  "description",
      -  "dueDate",
      -  "amount",
      -  "payments"
      -]New value: +[
      +  "description",
      +  "dueDate",
      +  "amount",
      +  "toConfirm",
      +  "payments"
      +]
  2. First observed

TDQS

A3.7/5.0
Behavior4/5

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

Annotations already declare readOnly, idempotent, non-destructive and closed-world, so safety is covered; the description adds the non-obvious output contract instead — per-installment calculation memory, totals, pending installments excluded from totals, assumptions, and a notice when due dates are missing. That is real behavioral value beyond the annotations, though it says nothing about rounding, index-data availability, or failure modes.

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 purpose is front-loaded in the first clause, followed by the regime enumeration and the return summary, so the agent gets the essentials first. The legal citations are dense but each clause carries distinct information; only the long parenthetical regime list verges on over-packing.

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 14-required-parameter, legally intricate calculator with no output schema, the description does the important work: it describes what is returned (memory of calculation, totals, pending, premises, notice) and which regimes are supported. It leaves gaps around input validation expectations and how conflicting regime/index settings are resolved, but the schema covers most parameter detail.

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 93%, so nearly every one of the 14 parameters is already explained in the schema, including defaults and legal citations. The description only echoes high-level concepts (regimes, partial/late payments) without adding syntax, precedence, or interaction rules between parameters such as regime versus correctionIndex — the baseline 3 applies.

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 description opens with a concrete verb and resource ("Atualiza um débito parcela por parcela com os índices oficiais do Banco Central") and then enumerates the legal regimes it covers, which makes the tool's scope tangible. It stops short of naming the sibling tools it overlaps with (alimony_debt_calculate, sentence_execution_calculate, labor_calculate), so an agent still has to infer the boundary from regime names.

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

Usage Guidelines3/5

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

Usage is only implied: the regime list (civil, labor, public_treasury, enforcement) tells the agent roughly which scenarios are in scope, and "Aceita pagamentos parciais ou em atraso" signals partial-payment support. There is no explicit statement of when to pick this tool over the many adjacent calculators, nor any prerequisite or exclusion guidance.

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