Skip to main content
Glama

calcular_plazo

Calculates the final day of administrative or judicial deadlines from a notification date, applying legal computation rules and excluding holidays step by step.

Instructions

Último día de un plazo, con el cómputo paso a paso (art. 30 LPAC; arts. 46 y 128 LJCA; art. 183 LOPJ).

Use tipo para los plazos habituales: reposicion, reclamacion_economico_administrativa, alzada_ordinaria, anulacion, extraordinario_revision, contencioso_administrativo, alegaciones_acta, alegaciones_tramite_audiencia, alegaciones_propuesta_sancion, requerimiento_informacion, tasacion_pericial_contradictoria, o pago_liquidacion (plazo de ingreso en voluntaria de una liquidación, art. 62.2 LGT). O un plazo libre con cantidad + unidad (dias_habiles, dias_naturales, meses, años) + ambito («administrativo» o «judicial»: este excluye agosto y del 24/12 al 6/1).

Args: fecha_notificacion: fecha de notificación o publicación, AAAA-MM-DD. festivos_adicionales: festivos autonómicos o locales (AAAA-MM-DD) a excluir además de los nacionales.

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": {
      "fecha_notificacion": "<fecha_notificacion>"
    },
    "name": "calcular_plazo"
  }
}

Input Schema

NameRequiredDescriptionDefault
tipoNo
ambitoNoadministrativo
unidadNo
cantidadNo
fecha_notificacionYes
festivos_adicionalesNo

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.2.0

TDQS

A4.2/5.0
Behavior4/5

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

With no annotations provided, the description carries the full behavioral burden and does disclose the substantive computation rules: the `ambito` value «judicial» excludes August and 24/12–6/1, and `festivos_adicionales` are applied on top of national holidays. Legal bases are cited per article. It stops short of stating what happens if neither `tipo` nor `cantidad` is supplied, or how the step-by-step result is shaped (partly mitigated by the output schema).

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?

The purpose and legal basis are front-loaded in one sentence, then the mode selection, then an Args block, which is a sensible order. The tipo value list is long but earns its place since the schema has no enum. There is minor redundancy between the inline prose about `festivos_adicionales` and its Args restatement.

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 six-parameter legal-calculation tool with an output schema, the description covers domain, mode selection, holiday rules and date format — everything needed to invoke it. What is missing is the edge case of supplying neither `tipo` nor the free-form triple, and whether `festivos_adicionales` are required to fall within the computed window.

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

Parameters5/5

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

Schema description coverage is 0%, so the description must compensate, and it does: all six parameters are given meaning. `tipo` receives a concrete 13-value vocabulary that is absent from the schema (which is a bare string), `ambito` gets its two permitted values plus the substantive effect of «judicial», `unidad` gets dias_habiles/dias_naturales/meses/años, `fecha_notificacion` gets the AAAA-MM-DD format, and `festivos_adicionales` is defined as autonómicos/locales dates excluded in addition to national ones.

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 opening line states a specific verb+resource: the last day of a legal deadline, computed step by step, with the governing articles cited (art. 30 LPAC, arts. 46/128 LJCA, art. 183 LOPJ). That is far more specific than a generic 'calculate' tool. It does not explicitly name a sibling such as calcular_prescripcion or calcular_duracion_procedimiento, so differentiation relies on the reader inferring that 'plazo' is the procedural deadline concept.

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 clear operational guidance on the two mutually exclusive modes: use `tipo` for the enumerated common deadlines, or a free deadline with `cantidad` + `unidad` + `ambito`. The enumerated list of 13 tipo values is effectively a selection guide. The gap is that it never says when NOT to use this tool or which sibling handles prescription/interest/duration instead.

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