Skip to main content
Glama
cmendezs

mcp-fattura-elettronica-it

check_ritenuta_acconto

Compute withholding tax (ritenuta d'acconto) for professional invoices. Supports multiple tax types and optional rate or amount overrides.

Instructions

Compute ritenuta d'acconto (withholding tax) for professional invoices.

Use this when issuing professional service invoices (TD01 or TD06) that are subject to withholding tax — typically for self-employed professionals, agents, or freelancers. Also mark the relevant line items with ritenuta='SI' in add_linea_dettaglio(), and pass the returned 'DatiRitenuta' dict to generate_fattura_xml() as dati_ritenuta.

tipo_ritenuta determines the rate: RT01/RT02 = 20% (ritenuta d'acconto, natural/legal persons), RT03 = 26.23% indicative (INPS gestione separata; verify current year), RT04 = 8.50% indicative (ENASARCO seller portion; verify current rates), RT05 = 10.00% indicative (ENPAM; rate varies by category), RT06 = variable rate — aliquota_override or importo_override is required. causale_pagamento: income category code for Mod. 770 (e.g. 'A' professional fees, 'O' occasional). aliquota_override: supply the actual rate (%) for RT06 or to override indicative rates for RT03–RT05. importo_override: supply the exact withholding amount when rate-based computation is imprecise.

Validates: tipo_ritenuta must be in RT01–RT06. RT06 requires aliquota_override or importo_override.

On success returns {'DatiRitenuta': {...}, 'importo_ritenuta': str, 'aliquota_applicata': str, 'imponibile_ritenuta': str, 'description': str, 'legal_ref': str}. On failure returns {'error': ''}.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
imponibileYesTaxable base amount subject to withholding tax (imponibile della ritenuta). Usually equals the net invoice total for professional services.
tipo_ritenutaYesRitenuta/contributo type code: RT01 (persone fisiche, 20%), RT02 (persone giuridiche, 20%), RT03 (contributo INPS gestione separata, ~26.23%), RT04 (contributo ENASARCO, ~8.50% seller portion), RT05 (contributo ENPAM, ~10% indicative), RT06 (altro contributo previdenziale, rate=0 — compute amount directly).
causale_pagamentoYesIncome category code for withholding tax (CausalePagamento). Common values: A (professional fees), B (agent commissions), L (employment), O (occasional work), Q (commissions). See Agenzia delle Entrate Mod. 770 for the complete list.
aliquota_overrideNoOverride the withholding rate as a percentage (e.g. 4.0 for 4%). Required for RT06 (variable rate). Optional override for RT01–RT05 when the statutory rate differs from the indicative table value. When provided, the table rate is ignored.
importo_overrideNoOverride the withholding amount directly (e.g. 200.00). Use when the exact amount is known rather than computing from the rate. When both aliquota_override and importo_override are provided, importo_override takes precedence for the amount; aliquota_override is used for the AliquotaRitenuta field.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Behavior4/5

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

With no annotations provided, the description fully carries the burden. It explains the computation, validation rules (e.g., 'RT06 requires aliquota_override or importo_override'), and the return format (on success returns a dict with specific fields; on failure returns an error). It also describes the precedence when both overrides are provided. There is no contradiction with annotations.

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 description is fairly long but every sentence adds important information. It is front-loaded with the purpose and then organized by parameter details. It could be slightly more concise, but the density of useful information justifies the length.

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?

Given the complexity of Italian withholding tax, the description covers all necessary aspects: purpose, usage context, parameter details with rate codes and overrides, validation rules, return values, and integration with other tools. The output schema is effectively described in the return fields. This provides a complete guide for an agent to use the tool correctly.

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 100%, and the description adds significant value beyond the schema. It explains the meanings of each tipo_ritenuta code (RT01-RT06) with indicative rates, clarifies when to use overrides, and describes the relationship between importo_override and aliquota_override. This helps an agent understand the nuances beyond the schema's basic descriptions.

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?

The description starts with a clear statement of the tool's purpose: 'Compute ritenuta d'acconto (withholding tax) for professional invoices.' It specifies the verb 'compute' and the resource 'withholding tax', and it is easily distinguished from sibling tools like add_linea_dettaglio and generate_fattura_xml.

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?

The description explicitly states when to use the tool: 'when issuing professional service invoices (TD01 or TD06) that are subject to withholding tax — typically for self-employed professionals, agents, or freelancers.' It also explains how to integrate with other tools (marking line items with ritenuta='SI' and passing the result to generate_fattura_xml). It does not explicitly state when not to use it or compare to alternatives, but the context is clear.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/cmendezs/mcp-fattura-elettronica-it'

If you have feedback or need assistance with the MCP directory API, please join our Discord server