Skip to main content
Glama

Calcular dias úteis

calcular_dias_uteis
Read-onlyIdempotent

Counts business days between two dates, inclusive, excluding weekends and Brazilian national holidays to support deadline, SLA, and payment due date calculations.

Instructions

Conta os dias úteis entre duas datas (inclusive), descontando fins de semana e feriados nacionais. Útil para prazos, SLAs e boletos. 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>",
      "data_fim": "<data_fim>"
    },
    "name": "calcular_dias_uteis"
  }
}

Input Schema

NameRequiredDescriptionDefault
data_fimYesData final, AAAA-MM-DD
data_inicioYesData inicial, AAAA-MM-DD

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.2/5.0
Behavior4/5

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

The annotations already cover safety (readOnlyHint, idempotentHint), so the description's added value is domain behavior: the count is inclusive of both endpoints and only national holidays are discounted. The one thing left unsaid is which national holiday calendar or source is used and what a boundary case such as data_fim before data_inicio does, which matters for an openWorldHint tool.

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, no filler, with the core operation front-loaded and the exclusion caveat placed last where it reads as a qualifier. Every clause carries information an agent needs.

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 two-parameter read-only calculation with a fully described schema, the definition covers purpose, scope, and the national-only holiday limitation, which is enough to call it correctly. With no output schema, it could have stated that a single integer day count is returned and which holiday calendar backs the exclusion, both minor but real gaps.

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% and both date parameters already document the AAAA-MM-DD format and their role, so the baseline is 3. The description does add one interpretive detail – that the range is counted inclusive, so data_inicio and data_fim are both counted – but adds nothing about format or validation 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?

The description gives a specific verb and resource ("Conta os dias úteis entre duas datas") and pins the scope down further: weekends and national holidays are excluded, and state/municipal holidays are not. An agent can distinguish it from the sibling feriados_nacionais (which lists holidays rather than counting business days) without opening either schema.

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?

"Útil para prazos, SLAs e boletos" names concrete contexts where the tool fits, and "Não considera feriados estaduais ou municipais" sets a boundary an agent can use to decide against applying it for local-calendar questions. It stops short of naming an alternative or saying explicitly when not to use it, so it is clear context rather than a full routing rule.

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