Skip to main content
Glama

Validar especificação do cálculo

calculo_validar
Read-onlyIdempotent

Validates labor calculation specifications and audits their data contract, returning blocking errors, warnings, and a build summary without generating files or touching PJe-Calc.

Instructions

Validação técnica + auditoria, SEM gerar arquivo nem tocar no PJe-Calc. A auditoria (campo "auditoria") confere o contrato de dados: cada verba, reflexo, histórico e abatimento ligado a decisões e documentos, pagamento usado duas vezes, salário fora da vigência, trabalho em afastamento, ciclo de escala, base duplicada etc.; sem contrato fica "não verificado". Validação técnica: datas, número CNJ (dígito verificador), CPF/CNPJ, município, nomes de verbas e reflexos do catálogo, históricos usados como base, enums. Devolve erros (impedem gerar), avisos e um resumo do que será montado (verbas ativas, férias calculadas etc.).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
arquivo_jsonNoAlternativa: caminho de um arquivo .json com a especificação.
especificacaoNoEspecificação do cálculo (JSON). Formato em calculo_modelo_json.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv2.16.0-mcp.13

TDQS

A4.3/5.0
Behavior5/5

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

Annotations already cover the safety profile (readOnly, idempotent, non-destructive), yet the description adds substantial extra context: the two validation layers, the concrete audit checks (payment used twice, salary outside validity, work during leave, duplicate base), the 'não verificado' fallback, and the fact that it returns errors/warnings/summary without side effects.

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 key scope statement, and the detailed audit-check enumeration is informative rather than redundant. It is dense and somewhat long, but every clause conveys a distinct validation behavior.

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 a nested-object parameter, the description carries the burden well, explaining the audit field, the error/warning distinction, and the summary of what will be assembled. Return-shape detail is at a useful high level rather than fully specified.

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 both parameters (arquivo_json and especificacao) are already documented in the schema. The description does not add syntax or mutual-exclusivity detail beyond noting the spec format source, so 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 (validate) and resource (calculation specification), and immediately delineates scope by declaring it does NOT generate a file nor touch PJe-Calc, which cleanly separates it from siblings like calculo_gerar_pjc and calculo_criar.

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 opening clause 'SEM gerar arquivo nem tocar no PJe-Calc' establishes the pre-generation validation context and implicitly routes the agent away from generation tools. However, it never names the alternative (e.g., calculo_gerar_pjc) or states an explicit when-not condition, so a slight gap remains.

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