Skip to main content
Glama

Apurar o cartão de ponto (jornadas) de um cálculo

calculo_apurar_cartao_ponto

Calculates timecard records in PJe-Calc by saving entries, running Apurar Cartão de Ponto to create hours columns, and optionally linking payroll items to columns; returns the monthly table.

Instructions

Para um cálculo já no PJe-Calc com apurações de cartão de ponto cadastradas: salva cada apuração (o PJe-Calc gera as jornadas pela programação/escala, respeitando feriados, férias e faltas), clica em Apurar Cartão de Ponto (cria as colunas Hs EXT, Hs Trabalhadas, Hs Noturnas...) e, se pedido, liga verbas às colunas (quantidade ou divisor importados do cartão). Devolve o quadro mensal apurado. O botão Apurar só existe enquanto o cálculo não tem cartões; para refazer, exclua os cartões em Cartão de Ponto > Visualizar Cartão.

Input Schema

NameRequiredDescriptionDefault
regerarNoRegera as ocorrências das verbas no fim (padrão true).
vinculosNoVerbas a ligar às colunas apuradas (quantidade ou divisor importados do cartão).
id_calculoYesNúmero do cálculo no PJe-Calc.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changedv2.16.0-mcp.14
    • addedInput schema / properties / id_calculo / description
      Added value: +"Número do cálculo no PJe-Calc."
    • addedInput schema / properties / vinculos / description
      Added value: +"Verbas a ligar às colunas apuradas (quantidade ou divisor importados do cartão)."
  2. First observedv2.16.0-mcp.13

TDQS

A4.3/5.0
Behavior4/5

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

Annotations already declare the mutation/safety profile (readOnlyHint=false, idempotentHint=false, destructiveHint=false), and the description adds real context beyond them: it explains that jornadas are generated from the programação/escala respecting feriados, férias e faltas, that columns are created, and that the operation is effectively one-shot (button disappears once cards exist). It does not detail what happens to existing apurações or permission requirements, so it falls just short of full disclosure.

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 precondition, then the operational steps and the redo caveat; every sentence carries information. It is a dense single paragraph that could be broken into steps, but there is little waste.

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 complex, non-idempotent mutation with no output schema, the description covers preconditions, side effects, and the return value ('Devolve o quadro mensal apurado'). It omits only peripheral details like required state/permissions, so it is essentially complete for correct invocation.

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 id_calculo, regerar, and the vinculos array down to nested verba/cartao/tipo. The description restates the vinculos concept (ligar verbas às colunas, quantidade ou divisor importados do cartão) but adds no syntax or format beyond the schema, 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 (apurar/salvar cada apuração) and resource (cartão de ponto / jornadas de um cálculo já no PJe-Calc), and names the concrete artifacts it produces (colunas Hs EXT, Hs Trabalhadas, Hs Noturnas). This clearly separates it from siblings like cartoes_para_jornadas and calculo_regerar_ocorrencias.

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 an explicit precondition ('Para um cálculo já no PJe-Calc com apurações de cartão de ponto cadastradas') and an explicit when-not/how-to-undo rule ('O botão Apurar só existe enquanto o cálculo não tem cartões; para refazer, exclua os cartões em Cartão de Ponto > Visualizar Cartão'). An agent knows exactly when this tool applies and how to repeat it.

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