Skip to main content
Glama

calcular_sancion

Calculates Spanish tax penalties by qualifying the infringement and applying statutory graduation, aggravating factors, and reductions under LGT articles 187, 188, and 191–195.

Instructions

Califica la infracción y calcula la sanción con graduación y reducciones (arts. 187, 188 y 191-195 LGT).

Args: base: base de la sanción (cuantía no ingresada / devuelta indebidamente / partidas improcedentes). articulo: 191 (dejar de ingresar), 192 (no presentar), 193 (devoluciones indebidas), 194, 195. ocultacion, medios_fraudulentos, facturas_falsas: hechos según art. 184 LGT. porcentaje_llevanza_incorrecta: incidencia de la llevanza incorrecta de libros sobre la base (%). porcentaje_retenciones_no_ingresadas: si se trata de retenciones practicadas y no ingresadas, su % sobre la base. cuantia_total_debida: lo que debió ingresarse en total, para el perjuicio económico (art. 187.1.b). comision_repetida: «leve», «grave» o «muy grave» si hay sanción firme previa en 4 años (art. 187.1.a). reduccion: «conformidad» (30 %) o «acuerdo» (acta con acuerdo, 65 %). pronto_pago: reducción del 40 % del art. 188.3 LGT. fecha_sancion: AAAA-MM-DD; antes del 11/07/2021 se aplican los porcentajes anteriores (50 % y 25 %).

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": {
      "base": "<base>"
    },
    "name": "calcular_sancion"
  }
}

Input Schema

NameRequiredDescriptionDefault
baseYes
articuloNo191
reduccionNo
ocultacionNo
pronto_pagoNo
fecha_sancionNo
facturas_falsasNo
comision_repetidaNo
devolucion_indebidaNo
medios_fraudulentosNo
cuantia_total_debidaNo
porcentaje_llevanza_incorrectaNo
porcentaje_retenciones_no_ingresadasNo

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?

With no annotations, the description must carry the behavioral burden; it does disclose meaningful non-trivial behavior, notably that fecha_sancion changes the applicable percentages (50%/25% before 11/07/2021 vs the current regime). However, it never states that this is a pure deterministic calculation with no persistence or side effects, and it does not say whether reduccion values are mutually exclusive or cumulative with pronto_pago.

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?

Purpose is front-loaded in a single sentence, followed by a compact parameter block where each line adds distinct information, which is justified given the absent schema descriptions. The docstring-style "Args:" formatting is serviceable but not optimized for an agent reader, and a few lines (e.g. base restating three overlapping concepts) could be tightened.

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?

An output schema exists, so explaining return values is unnecessary, and the description is nearly complete for a 13-parameter legal calculator. The remaining gaps are interaction rules between parameters (articulo vs devolucion_indebida, conformidad vs pronto_pago compatibility) rather than missing core information, which keeps it at 4 rather than 5.

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%, so the description must supply all semantics, and it documents 12 of 13 parameters with real domain meaning: allowed literals for comision_repetida ("leve", "grave", "muy grave"), what each reduction means with its percentage (30%, 65%, 40%), the date format, and the article enumerations. It falls short of 5 because devolucion_indebida is never mentioned and articulo values 194/195 are listed without explanation.

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 sentence states a specific verb and resource ("Califica la infracción y calcula la sanción con graduación y reducciones") and anchors it to concrete legal articles (187, 188, 191-195 LGT). This is clearly distinguishable from numeric siblings like calcular_intereses or calcular_recargo, though the description never names an alternative explicitly, so the differentiation is inferred rather than stated.

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

Usage Guidelines3/5

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

There is no explicit when-to-use/when-not-to-use section and no routing to or away from sibling calculators. Usage context is only implied through per-parameter notes such as "si se trata de retenciones practicadas y no ingresadas" and the article mapping, which tells an agent which situation each input covers but not when to pick this tool over another.

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