Skip to main content
Glama

Calcular prazo / vencimento

calcular_prazo
Read-onlyIdempotent

Calculates deadline end dates by adding business days (skipping weekends and national holidays) or calendar days, rolling to the next business day. Use for due dates, SLAs, and contracts.

Instructions

Calcula a data final de um prazo: soma N dias úteis a uma data (pulando fins de semana e feriados nacionais, sem contar o dia inicial) ou N dias corridos (prorrogando para o próximo dia útil se cair em fim de semana ou feriado). Use para vencimentos, SLAs e prazos contratuais. Não considera feriados estaduais ou municipais.

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_inicio": "<data_inicio>",
      "dias": "<dias>"
    },
    "name": "calcular_prazo"
  }
}

Input Schema

NameRequiredDescriptionDefault
diasYesQuantidade de dias do prazo
tipoNoDias úteis (padrão) ou corridos
data_inicioYesData inicial, AAAA-MM-DD (não entra na contagem)

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.2.0

TDQS

A3.8/5.0
Behavior3/5

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

Annotations already declare readOnly, idempotent and open-world, so the safety profile is covered. The description still adds real behavioral rules beyond them: weekends and national holidays are skipped, the start day is excluded from the count, and calendar-day mode rolls forward to the next business day. It does not state the return format (date string vs object) and the rollover rule for business-day mode hitting a holiday is only implied.

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?

Two sentences with zero filler; the computational rule is front-loaded and the limitation sentence lands last where it is easy to catch. Every clause carries new information about 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?

For a three-parameter calculation tool with read-only annotations and no output schema, the description covers modes, counting conventions, holiday scope and use cases. The only real gap is that it never says what is returned (a single date string), which an agent must guess for chaining.

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 baseline is 3. The description does add value on the `dias` convention ("sem contar o dia inicial") and on what `tipo=corridos` does when the result lands on a non-business day, but the default `uteis` and the 1-3650 ceiling are only in the schema.

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 specific verb and result object ("Calcula a data final de um prazo") and then defines the two computation modes precisely, so an agent knows it returns an end date rather than a day count. It never names a sibling tool (e.g. calcular_dias_uteis, feriados_nacionais) to sharpen the boundary, so differentiation is left to inference from the described semantics.

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?

It gives concrete use cases ("vencimentos, SLAs e prazos contratuais") and a clear negative scope ("Não considera feriados estaduais ou municipais"), which is meaningful guidance for a legal/deadline context. It stops short of explicit when-not-to-use routing or recommending an alternative tool for state/municipal holiday cases.

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