get_regime_fiscale_codes
Retrieve the complete list of Italian fiscal regime codes (RF01–RF19) with descriptions to select the correct regime code for your seller before validation.
Instructions
Return the complete list of RegimeFiscale codes (RF01–RF19) with descriptions.
Call this to look up the correct fiscal regime code before calling validate_cedente_prestatore(). Every Italian seller must declare a regime: RF01 (ordinary) covers most companies; RF19 (forfettario) covers flat-rate sole traders; all other codes cover specialised VAT regimes.
Always succeeds. Returns {'codes': [{'code': str, 'description': str}, ...], 'total': int}.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- tools/header_tools.py:366-378 (handler)The MCP tool handler for get_regime_fiscale_codes. It returns a list of all RegimeFiscale codes (RF01–RF19) with descriptions from the REGIME_FISCALE dict, plus a total count.
@mcp.tool() def get_regime_fiscale_codes() -> dict: """Return the complete list of RegimeFiscale codes (RF01–RF19) with descriptions. Call this to look up the correct fiscal regime code before calling validate_cedente_prestatore(). Every Italian seller must declare a regime: RF01 (ordinary) covers most companies; RF19 (forfettario) covers flat-rate sole traders; all other codes cover specialised VAT regimes. Always succeeds. Returns {'codes': [{'code': str, 'description': str}, ...], 'total': int}. """ codes = [{"code": code, "description": desc} for code, desc in REGIME_FISCALE.items()] return {"codes": codes, "total": len(codes)} - tools/header_tools.py:51-51 (registration)Registration function that registers all header tools (including get_regime_fiscale_codes) on the FastMCP instance via the @mcp.tool() decorator.
def register_header_tools(mcp: FastMCP) -> None: - tools/header_tools.py:25-44 (schema)The data dict mapping all RegimeFiscale codes to their Italian descriptions (RF01–RF19, note: RF03 intentionally omitted per specs). This is the data source for get_regime_fiscale_codes.
REGIME_FISCALE: dict[str, str] = { "RF01": "Regime ordinario", "RF02": "Regime contribuenti minimi (art. 1, c.96-117, L. 244/2007)", "RF04": "Agricoltura e attività connesse e pesca (artt. 34 e 34-bis, DPR 633/72)", "RF05": "Vendita sali e tabacchi (art. 74, c.1, DPR. 633/72)", "RF06": "Commercio fiammiferi (art. 74, c.1, DPR. 633/72)", "RF07": "Editoria (art. 74, c.1, DPR. 633/72)", "RF08": "Gestione servizi telefonia pubblica (art. 74, c.1, DPR. 633/72)", "RF09": "Rivendita documenti di trasporto pubblico e di sosta (art. 74, c.1, DPR. 633/72)", "RF10": "Intrattenimenti, giochi e altre attività (art. 74, c.6, DPR. 633/72)", "RF11": "Agenzie viaggi e turismo (art. 74-ter, DPR. 633/72)", "RF12": "Agriturismo (art. 5, c.2, L. 413/91)", "RF13": "Vendite a domicilio (art. 25-bis, c.6, DPR. 600/73)", "RF14": "Rivendita beni usati, oggetti d'arte, d'antiquariato o da collezione (art. 36, DL 41/95)", "RF15": "Agenzie di vendite all'asta di oggetti d'arte, antiquariato o da collezione (art. 40-bis, DL 41/95)", "RF16": "IVA per cassa P.A. (art. 6, c.5, DPR. 633/72)", "RF17": "IVA per cassa (art. 32-bis, DL 83/2012)", "RF18": "Altro", "RF19": "Regime forfettario (art. 1, c.54-89, L. 190/2014)", } - tests/test_header_tools.py:263-265 (helper)Unit test verifying get_regime_fiscale_codes returns all 18 codes (RF03 excluded) and includes RF01 and RF19.
def test_returns_all_codes(self): result = call("get_regime_fiscale_codes") assert result["total"] == len(REGIME_FISCALE) # 18 codes (RF03 does not exist in official specs) - Integration test verifying get_regime_fiscale_codes returns 18 codes when called via MCP.
async def test_get_regime_fiscale_codes_returns_codes(self): """get_regime_fiscale_codes returns all valid fiscal regime codes (RF03 does not exist).""" async with Client(mcp) as client: result = await client.call_tool("get_regime_fiscale_codes", {}) data = _parse(result) assert data["total"] == 18 # RF03 does not exist in the official FatturaPA specs codes = {c["code"] for c in data["codes"]} assert "RF01" in codes assert "RF19" in codes