Skip to main content
Glama

calcular_prazo

Read-onlyIdempotent

Calculates Brazilian CPC/2015 procedural due dates in business days, skipping weekends, national holidays and court recess, and returns a step-by-step calculation memo.

Instructions

Calcula o vencimento de um prazo processual contado em dias úteis (CPC/2015).

Exclui o dia do começo e inclui o do vencimento; pula sábados, domingos, feriados nacionais (inclusive Carnaval, Sexta-feira Santa e Corpus Christi) e o recesso de 20/12 a 20/01. Devolve a memória de cálculo com cada dia pulado e o motivo. NÃO considera feriados estaduais/municipais nem suspensões decretadas pelo tribunal: avise o usuário disso.

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": {
      "data_intimacao": "<data_intimacao>",
      "dias_uteis": "<dias_uteis>"
    },
    "name": "calcular_prazo"
  }
}

Input Schema

NameRequiredDescriptionDefault
dias_uteisYesTamanho do prazo em dias úteis (ex.: 15 para contestação ou apelação).
data_intimacaoYesData da intimação no formato AAAA-MM-DD.

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.7/5.0
Behavior5/5

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

Beyond the annotations, the description discloses the exact counting rule, which days are skipped, the national holiday list, the year-end recess, and the return format with a calculation memory. It also explicitly flags unsupported holiday and suspension cases, which is valuable behavioral context for a read-only calculator.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is front-loaded with the core purpose, then follows with calculation rules and important limitations. It is appropriately sized for a deadline calculator and contains no redundant or empty phrasing.

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?

Given the tool's moderate complexity, two fully documented parameters, and the presence of an output schema, the description is complete. It explains the calculation logic, exclusions, output nature, and user-facing caveats without needing to repeat schema details.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so the parameter descriptions already document the expected format and example. The description adds meaningful interpretation by specifying that the start date is excluded and the due date is included, which directly affects how data_intimacao should be understood.

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?

The description names a specific calculation verb and resource: calculating the due date of a procedural deadline in business days under CPC/2015. It clearly distinguishes this from the sibling tools, which handle process lookup, KPIs, deadline alerts, progress records, and CNJ validation.

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 description gives clear context for when the tool applies: procedural deadlines counted in business days under CPC/2015. It also states important limitations—it does not consider state/municipal holidays or court-ordered suspensions—and tells the agent to warn the user, though it does not name alternative tools for those cases.

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