Skip to main content
Glama

calcular_duracion_procedimiento

Calculates the maximum duration and expiry deadline for Spanish tax procedures from a start date, adjusting for dilation, suspension, and extension days, and reports non-compliance effects.

Instructions

Fecha de vencimiento de la duración máxima de un procedimiento y efectos de su incumplimiento.

Args: tipo: inspeccion (18 meses), inspeccion_27 (27 meses, art. 150.1.b LGT), comprobacion_limitada, verificacion_datos, sancionador (6 meses). fecha_inicio: notificación del inicio, AAAA-MM-DD. dias_dilacion / dias_suspension / dias_extension: días que no computan o amplían el plazo (arts. 104.2 y 150.3-5 LGT). fecha_referencia: «hoy» del caso. fecha_terminacion: notificación de la liquidación, si ya terminó.

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": {
      "tipo": "<tipo>",
      "fecha_inicio": "<fecha_inicio>"
    },
    "name": "calcular_duracion_procedimiento"
  }
}

Input Schema

NameRequiredDescriptionDefault
tipoYes
fecha_inicioYes
dias_dilacionNo
dias_extensionNo
dias_suspensionNo
fecha_referenciaNo
fecha_terminacionNo

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.2.0

TDQS

A3.6/5.0
Behavior3/5

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

No annotations are supplied, so the description carries the burden; it does disclose meaningful behavior beyond the schema, notably that fecha_referencia is the case's "hoy" and that fecha_terminacion is the liquidation notification date if the procedure already ended. However, it says nothing about what the result looks like when the deadline is exceeded (despite advertising "efectos de su incumplimiento"), whether the calculation is pure/read-only, or how incomputable cases are handled.

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?

A single front-loaded purpose sentence followed by a compact Args block where each entry adds non-redundant legal meaning. Slightly dense with statutory citations and the tipo enumeration is long, but nothing is padding and the structure is easy to scan.

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?

With an output schema present, return values need not be explained, and all seven inputs including the optional date parameters are documented, so the agent can call it correctly. The remaining gap is the absence of sibling disambiguation, which matters given several other date/amount calculators in the same catalog.

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% with 7 parameters, and the description compensates for all of them: it enumerates tipo values with their durations (inspeccion 18 months, inspeccion_27 27 months per art. 150.1.b LGT, sancionador 6 months), specifies fecha_inicio format and meaning (AAAA-MM-DD, notification of start), and explains that the dilación/suspension/extension days are days that either do not count or extend the term under arts. 104.2 and 150.3-5 LGT. This is exactly the semantic value the schema lacks.

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 names a specific output ("Fecha de vencimiento de la duración máxima de un procedimiento") and adds the legal consequence it reports ("efectos de su incumplimiento"), so the agent knows this computes a statutory deadline plus its effects. It does not explicitly contrast itself with close siblings such as calcular_plazo or calcular_prescripcion, and the purpose is phrased as a noun phrase rather than an action verb.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

There is no explicit when-to-use or when-not-to-use guidance and no mention of alternatives among calcular_plazo, calcular_prescripcion or calcular_sancion, which overlap in the "compute a legal date" space. The only routing signal is implicit in the tipo values, which imply the tool is for tax procedure duration rather than other deadlines.

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