Skip to main content
Glama

Comparar com uma conta de referência

calculo_comparar_referencia
Read-onlyIdempotent

Compare a labor calculation against a reference account at the same base date to identify differences per occurrence and in the bridge from nominal to net, without altering either.

Instructions

Compara o cálculo com uma conta de referência (perito, parte, outro cenário) na mesma data-base. Cada lado é um cálculo do PJe-Calc (id) ou um .PJC exportado depois de liquidar (arquivo). Compara primeiro quantidades e valores nominais por ocorrência (com a causa local de cada diferença: quantidade, base, divisor, multiplicador, pago), depois a ponte por verba (nominal -> corrigido -> juros -> total, com o resíduo em relação ao bruto) e a ponte bruto -> FGTS/depósito/INSS/IR -> líquido. Não altera os cálculos. Igualdade de totais não substitui igualdade das ocorrências. Veja pjecalc://docs/modulos/referencia.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
data_baseNoData-base da referência (AAAA-MM-DD) quando o relatório não a mostra.
id_calculoNoCálculo a conferir (no PJe-Calc, já liquidado).
toleranciaNoTolerância em reais (padrão 0,01).
id_referenciaNoConta de referência no PJe-Calc (liquidada na mesma data).
arquivo_calculoNoAlternativa: .PJC exportado do cálculo liquidado.
referencia_manualNoAlternativa: conta de referência transcrita (perito, planilha): { dataLiquidacao, verbas: [{ descricao, valorCorrigido, juros, total }], brutoDevidoAoReclamante, totalDescontos, liquidoDevidoAoReclamante, totalDevidoPeloReclamado, composicao: [{ descricao, valor }], origem }.
arquivo_referenciaNoAlternativa: .PJC da conta de referência, ou o relatório do PJe-Calc da referência em PDF, HTML ou texto copiado (só o resumo é comparado).

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv2.16.0-mcp.13

TDQS

A3.9/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 the description reinforces this ('Não altera os cálculos') while adding a non-obvious behavioral rule: equality of totals does not substitute equality of occurrences. That methodology caveat is genuine context beyond the annotations, though return shape/limits aren't detailed.

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 the core comparison purpose, then layered methodology, then a docs pointer. The sentences are dense but each carries real information (occurrence-level diffing, the causal factors, the gross-to-net bridge), so little is wasted despite the length.

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?

With no output schema and 7 params including a nested object, the description carries the return-value burden and does reasonably: it spells out the comparison layers and the residual/residue notion. It stops short of describing the exact response shape or remediation of found differences, but is sufficient to call correctly.

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 documents every parameter including the nested referencia_manual structure. The description adds only high-level framing (the two-sided id/arquivo model, same base-date constraint), which is useful but not meaningfully beyond the schema.

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+resource (compare a calculation against a reference account) and immediately scopes it: same base date, each side being a PJe-Calc id or an exported .PJC. It also enumerates the comparison layers (occurrences then the verba/gross-to-net bridges), which cleanly separates it from siblings like calculo_validar or calculo_liquidar.

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?

It explains how to populate each side (id vs arquivo vs referencia_manual) and points to pjecalc://docs/modulos/referencia, so usage is implied and constructible. However, it never states when to reach for this over calculo_validar or other comparison-adjacent tools, so no explicit when/when-not guidance is given.

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