Skip to main content
Glama

calcular_recargo

Calculates Spanish tax surcharges under LGT articles 27 and 28 for late filing without prior request or executive assessment, using the provided amount, dates, and enforcement status.

Instructions

Recargos de los arts. 27 y 28 LGT.

Args: tipo: «extemporaneo» (presentación fuera de plazo sin requerimiento previo, art. 27: necesita fin_plazo y fecha_presentacion; aplica el régimen vigente en la fecha y compara con el de la Ley 11/2021) o «ejecutivo» (art. 28: necesita situacion_apremio = «ejecutivo» (5 %), «reducido» (10 %) u «ordinario» (20 %)).

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": {
      "importe": "<importe>"
    },
    "name": "calcular_recargo"
  }
}

Input Schema

NameRequiredDescriptionDefault
tipoNoextemporaneo
importeYes
fin_plazoNo
situacion_apremioNo
fecha_presentacionNo

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.2.0

TDQS

A4/5.0
Behavior3/5

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

With no annotations supplied, the description carries the full behavioral burden. It does add real behavior for the art. 27 branch — it applies the regime in force at the filing date and compares it against the Ley 11/2021 regime — but says nothing about what happens when the conditionally required fields are missing (error vs default), and never states that this is a side-effect-free calculation. The existence of an output schema excuses it from explaining return values.

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?

The legal basis is front-loaded in one line, then each mode is described in a single compact clause containing only the branch-specific requirements and rates. The Args-style layout is dense but every sentence carries parameter or selection information.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a 5-parameter, 0%-schema-coverage calculation tool, the description pairs each mode with the exact fields it needs and the rates it applies. Importe is self-evident as the base amount, and since an output schema exists, return values need no explanation.

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 coverage is 0% and the schema declares tipo and situacion_apremio as bare strings with no enums, so the description is doing essential work: it supplies the valid values «extemporaneo»/«ejecutivo», the apremio levels and their rates (5%, 10%, 20%), and the conditional dependency of fin_plazo/fecha_presentacion on the extemporáneo branch. It leaves importe undefined (base amount? quota?) and gives no date format for fin_plazo/fecha_presentacion, which keeps it below a 5.

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 resource — the surcharges of arts. 27 and 28 LGT — and splits them into two named regimes (extemporáneo vs ejecutivo), which distinguishes it from siblings like calcular_intereses or calcular_sancion by subject matter. It stops short of stating the output plainly ('calcula el importe del recargo'), leaning on the tool name and on the reader knowing what arts. 27/28 LGT are.

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 selection context: use «extemporaneo» for late filing without prior requerimiento (requiring fin_plazo and fecha_presentacion), and «ejecutivo» for art. 28 with the apremio level determining the percentage. It does not tell the agent when to prefer a sibling tool (e.g. calcular_intereses for interest alongside a recargo), so there are no explicit exclusions or alternatives.

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