Skip to main content
Glama

calcular_prescripcion

Calculates Spanish tax prescription periods and declaration deadlines, including start dates, interruptions, and the date tax rights expire for VAT, IRPF, IS, ISD, ITP, and wealth tax.

Instructions

Prescripción del derecho a liquidar (arts. 66-68 LGT): fin del plazo de declaración, inicio, interrupciones y fecha en que prescribe. Calcula el fin del plazo de declaración para: iva_trimestral / retenciones_trimestral (periodo «1T»…«4T»), iva_mensual (periodo «1»…«12»), irpf, patrimonio (ejercicio), is (ejercicio o fecha_devengo = cierre del periodo), isd_mortis_causa, isd_inter_vivos, itp (fecha_devengo). Para otros casos pase fin_plazo directamente.

Args: interrupciones: fechas (AAAA-MM-DD) de actuaciones que interrumpen (art. 68 LGT). No incluya las actuaciones inspectoras realizadas dentro de un plazo de inspección incumplido (art. 150.6.a LGT). fecha_referencia: fecha «de hoy» para decir si está prescrito (por defecto, hoy). Use la del caso si la da. anios: 4 por defecto (art. 66 LGT).

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "calcular_prescripcion"
  }
}

Input Schema

NameRequiredDescriptionDefault
tipoNo
aniosNo
periodoNo
ejercicioNo
fin_plazoNo
fecha_devengoNo
interrupcionesNo
fecha_referenciaNo

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.2.0

TDQS

A4.3/5.0
Behavior4/5

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

With no annotations, the description carries the burden and does reasonably well: it discloses legal defaults (anios=4 per art. 66, fecha_referencia defaults to today), the legal basis for interruptions, and an important exclusion caveat (actuaciones inspectoras in an expired inspection period, art. 150.6.a). It never explicitly says this is a side-effect-free computation, but the verb 'calcula' plus the citation make that inferable.

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?

Front-loaded with the purpose and the supported-type list, then a structured Args block; nearly every sentence carries information. It is dense and a couple of clauses repeat the deadline concept, but nothing is padding.

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 an 8-parameter, annotation-free calculator with an output schema, the description covers scope, defaults, legal basis and the fallback path, which is most of what an agent needs. Minor omissions are date-format consistency across parameters and any note on validation or inclusive-day behavior.

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 description coverage is 0% for 8 parameters, yet the description compensates substantially by mapping each tipo to the parameters it consumes (periodo format «1T»-«4T» vs «1»-«12», ejercicio for irpf/patrimonio, fecha_devengo for itp/is) and by documenting interrupciones, fecha_referencia and anios in an Args block. Gaps remain: date formats are only given for interrupciones, and 'otros casos' leaves the tipo vocabulary open-ended.

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?

States a specific computation (prescription deadline, arts. 66-68 LGT) and enumerates exactly which tax types and period formats it accepts, so an agent can match a case to the tool without opening the schema. The literal identifiers (iva_trimestral, isd_mortis_causa, etc.) make it operationally distinct from generic plazo calculators among the siblings.

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?

Provides a clear routing rule for out-of-scope cases ('Para otros casos pase `fin_plazo` directamente') and tells the agent to prefer the case's own date for `fecha_referencia`. It lacks explicit 'when not to use' guidance relative to siblings such as calcular_plazo or calcular_intereses, but the type enumeration implicitly draws that boundary.

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